class Shokkenki::Consumer::RSpec::Hooks
Public Class Methods
after_each()
click to toggle source
# File lib/shokkenki/consumer/rspec/hooks.rb, line 21 def self.after_each Shokkenki.consumer.assert_all_requests_matched! Shokkenki.consumer.assert_all_interactions_used! end
after_suite()
click to toggle source
# File lib/shokkenki/consumer/rspec/hooks.rb, line 26 def self.after_suite Shokkenki.consumer.print_tickets Shokkenki.consumer.close end
before_each(example_group)
click to toggle source
# File lib/shokkenki/consumer/rspec/hooks.rb, line 14 def self.before_each example_group name = ConsumerName.from example_group Shokkenki.consumer.add_consumer(Shokkenki::Consumer::Model::Role.new(:name => name)) unless Shokkenki.consumer.consumer(name) Shokkenki.consumer.set_current_consumer name Shokkenki.consumer.clear_interaction_stubs end
before_suite()
click to toggle source
# File lib/shokkenki/consumer/rspec/hooks.rb, line 10 def self.before_suite Shokkenki.consumer.start end
Private Class Methods
name_from(example_group)
click to toggle source
# File lib/shokkenki/consumer/rspec/hooks.rb, line 33 def self.name_from example_group example_group end