Module: EventedSpec::SpecHelper::CoolioHelpers::ExampleHelpers

Included in:
EventedSpec::SpecHelper
Defined in:
lib/evented-spec/spec_helper/coolio_helpers.rb

Overview

module GroupHelpers

Instance Method Summary (collapse)

Instance Method Details

- (Object) coolio(opts = {}) { ... }

Yields to block inside cool.io loop, :spec_timeout option (in seconds) is used to force spec to timeout if something goes wrong and EM/AMQP loop hangs for some reason.

Parameters:

  • options (Hash)

    for cool.io

  • opts (Numeric) (defaults to: {})

    :spec_timeout (nil) Amount of time before spec is stopped by timeout

Yields:

  • block to execute after cool.io loop starts



32
33
34
35
36
# File 'lib/evented-spec/spec_helper/coolio_helpers.rb', line 32

def coolio(opts = {}, &block)
  opts = default_options.merge opts
  @evented_example = CoolioExample.new(opts, self, &block)
  @evented_example.run
end