Module: EventedSpec::SpecHelper::AMQPHelpers::GroupMethods
- Included in:
- GroupMethods
- Defined in:
- lib/evented-spec/spec_helper/amqp_helpers.rb
Instance Method Summary collapse
-
#amqp_after(scope = :each) { ... } ⇒ Object
Adds after hook that will run inside AMQP connection (AMQP.start loop) after example finishes.
-
#amqp_before(scope = :each) { ... } ⇒ Object
Adds before hook that will run inside AMQP connection (AMQP.start loop) before example starts.
Instance Method Details
#amqp_after(scope = :each) { ... } ⇒ Object
Adds after hook that will run inside AMQP connection (AMQP.start loop) after example finishes
20 21 22 23 |
# File 'lib/evented-spec/spec_helper/amqp_helpers.rb', line 20 def amqp_after(scope = :each, &block) raise ArgumentError, "amqp_after only supports :each scope" unless :each == scope evented_spec_hooks_for(:amqp_after).unshift block end |
#amqp_before(scope = :each) { ... } ⇒ Object
Adds before hook that will run inside AMQP connection (AMQP.start loop) before example starts
10 11 12 13 |
# File 'lib/evented-spec/spec_helper/amqp_helpers.rb', line 10 def amqp_before(scope = :each, &block) raise ArgumentError, "amqp_before only supports :each scope" unless :each == scope evented_spec_hooks_for(:amqp_before) << block end |