Sha256: 82cc29f56ea3caae5de05f711e6eb37b4a03e24a27ea4c096b571435152363d6

Contents?: true

Size: 1.3 KB

Versions: 1

Compression:

Stored size: 1.3 KB

Contents

Given "I am connected to the broker" do
  MessageDriver.configure(BrokerConfig.config)
end

Given "the following broker configuration:" do |src|
  step "I am connected to the broker"
  test_runner.config_broker(src)
end

When "I execute the following code:" do |src|
  test_runner.run_test_code(src)
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
end

Then(/^I expect to find (#{NUMBER}) messages? on (#{STRING_OR_SYM}) with:$/) do |count, destination, table|
  expect(test_runner).to have_no_errors
  messages = test_runner.fetch_messages(destination)
  expect(messages).to have(count).items
  expect(messages).to match_message_table(table)
end

Then(/^I expect it to raise "(.*?)"$/) do |error_msg|
  expect(test_runner.raised_error).to_not be_nil
  expect(test_runner.raised_error.to_s).to match error_msg
  test_runner.raised_error = nil
end

Then(/^I expect it to raise a (.*?) error$/) do |error_type|
  expect(test_runner.raised_error).to_not be_nil
  expect(test_runner.raised_error.class.to_s).to match error_type
  test_runner.raised_error = nil
end

Then "I expect to have no errors" do
  expect(test_runner).to have_no_errors
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
message-driver-0.1.0 features/step_definitions/steps.rb