features/step_definitions/steps.rb in message-driver-0.4.0 vs features/step_definitions/steps.rb in message-driver-0.5.0

- old
+ new

@@ -57,18 +57,18 @@ end Then(/^I expect to find (#{NUMBER}) messages? on (#{STRING_OR_SYM})$/) do |count, destination| expect(test_runner).to have_no_errors messages = test_runner.fetch_messages(destination) - expect(messages).to have(count).items, "expected #{count} messages, but got these instead: #{messages.map(&:body)}" + expect(messages.size).to eq(count), "expected #{count} messages, but got these instead: #{messages.map(&:body)}" end Then(/^I expect to find the following (#{NUMBER}) messages? on (#{STRING_OR_SYM})$/) do |count, destination, table| expect(test_runner).to have_no_errors messages = test_runner.fetch_messages(destination) expect(messages).to match_message_table(table) - expect(messages).to have(count).items + expect(messages.size).to eq(count) end Then(/^I expect to find the following message on (#{STRING_OR_SYM})$/) do |destination, table| dest = destination.is_a?(Symbol) ? destination.inspect : destination.to_s step "I expect to find the following 1 message on #{dest}", table @@ -96,6 +96,14 @@ step 'I expect to have no errors' end Before do |current_scenario| test_runner.current_feature_file = current_scenario.feature.file +end + +Before '@read_queues_directly' do + test_runner.provider.read_queues_directly = true +end + +After '@read_queues_directly' do + test_runner.provider.read_queues_directly = false end