spec/consumer_spec.rb in deimos-ruby-1.3.0.pre.beta5 vs spec/consumer_spec.rb in deimos-ruby-1.4.0.pre.beta1

- old
+ new

@@ -43,18 +43,18 @@ it 'should fail on invalid message' do test_consume_invalid_message(MyConsumer, 'invalid' => 'key') end it 'should fail if reraise is false but fatal_error is true' do - Deimos.configure { |config| config.reraise_consumer_errors = false } + Deimos.configure { |config| config.consumers.reraise_errors = false } test_consume_invalid_message(MyConsumer, 'fatal') end it 'should fail if fatal_error is true globally' do Deimos.configure do |config| - config.fatal_error { true } - config.reraise_consumer_errors = false + config.consumers.fatal_error = proc { true } + config.consumers.reraise_errors = false end test_consume_invalid_message(MyConsumer, 'invalid' => 'key') end it 'should fail on message with extra fields' do @@ -63,11 +63,11 @@ 'some_int' => 123, 'extra_field' => 'field name') end it 'should not fail when before_consume fails without reraising errors' do - Deimos.configure { |config| config.reraise_consumer_errors = false } + Deimos.configure { |config| config.consumers.reraise_errors = false } expect { test_consume_message( MyConsumer, { 'test_id' => 'foo', 'some_int' => 123 }, @@ -75,10 +75,10 @@ ) { raise 'OH NOES' } } .not_to raise_error end it 'should not fail when consume fails without reraising errors' do - Deimos.configure { |config| config.reraise_consumer_errors = false } + Deimos.configure { |config| config.consumers.reraise_errors = false } expect { test_consume_message( MyConsumer, { 'invalid' => 'key' }, { skip_expectation: true }