spec/spec_helper.rb in rabbit_feed-2.3.10 vs spec/spec_helper.rb in rabbit_feed-2.4.0
- old
+ new
@@ -29,17 +29,19 @@
config.before do
reset_environment
end
config.after(connectivity: true) do
- Thread.kill @consumer_thread if @consumer_thread.present?
+ @consumer_thread.kill if @consumer_thread.present?
+ @consumer_thread.join if @consumer_thread.present?
end
RabbitFeed::TestingSupport.include_support config
end
def reset_environment
RabbitFeed.log = RabbitFeed.default_logger
+ RabbitFeed.application = nil
RabbitFeed.environment = 'test'
RabbitFeed.configuration_file_path = 'spec/fixtures/configuration.yml'
RabbitFeed.instance_variable_set('@configuration', nil)
RabbitFeed::Consumer.event_routing = nil
RabbitFeed::Producer.event_definitions = nil