lib/deimos/test_helpers.rb in deimos-ruby-1.8.1.pre.beta8 vs lib/deimos/test_helpers.rb in deimos-ruby-1.8.1.pre.beta9
- old
+ new
@@ -28,21 +28,22 @@
Deimos.configure do |d_config|
d_config.logger = Logger.new(STDOUT)
d_config.consumers.reraise_errors = true
d_config.kafka.seed_brokers ||= ['test_broker']
d_config.schema.backend = Deimos.schema_backend_class.mock_backend
+ d_config.producers.backend = :test
end
end
- end
- prepend_before(:each) do
- client = double('client').as_null_object
- allow(client).to receive(:time) do |*_args, &block|
- block.call
+ config.before(:each) do
+ client = double('client').as_null_object
+ allow(client).to receive(:time) do |*_args, &block|
+ block.call
+ end
+ Deimos::Backends::Test.sent_messages.clear
end
- Deimos.configure { |c| c.producers.backend = :test }
- Deimos::Backends::Test.sent_messages.clear
end
+
end
# @deprecated
def stub_producers_and_consumers!
warn('stub_producers_and_consumers! is no longer necessary and this method will be removed in 3.0')