Module: AMQP::Spec

Defined in:
lib/amqp-spec/rspec.rb,
lib/version.rb

Overview

If you include AMQP::Spec module into your example group, each example of this group will run inside AMQP.start loop without the need to explicitly call ‘amqp’. In order to provide options to AMQP loop, default_options class method is defined. Remember, when using AMQP::Specs, you’ll have a single set of AMQP.start options for all your examples.

Constant Summary collapse

VERSION_FILE =

:nodoc:

Pathname.new(__FILE__).dirname + '../VERSION'
VERSION =
VERSION_FILE.exist? ? VERSION_FILE.read.strip : nil

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(example_group) ⇒ Object



183
184
185
# File 'lib/amqp-spec/rspec.rb', line 183

def self.included(example_group)
  example_group.send(:include, SpecHelper)
end

Instance Method Details

#instance_eval(&block) ⇒ Object



189
190
191
192
193
# File 'lib/amqp-spec/rspec.rb', line 189

def instance_eval(&block)
  amqp do
    super(&block)
  end
end

#instance_eval_without_event_loopObject



187
# File 'lib/amqp-spec/rspec.rb', line 187

alias instance_eval_without_event_loop instance_eval