Sha256: 0aa12dcfbe5e73ba0786f2a195650b0a74ae75143f0586889bc86c1115817860

Contents?: true

Size: 1.65 KB

Versions: 1

Compression:

Stored size: 1.65 KB

Contents

When /^the client acks a message by ID "([^"]*)"$/ do |message_id|
  @connection.ack message_id
end

When /^the client acks the last MESSAGE$/ do
  @connection.ack @received_frames.select { |f| f.command == "MESSAGE" }.last
end

Then /^the client nacking the last MESSAGE should raise an unsupported command error$/ do
  lambda { @connection.nack @received_frames.select { |f| f.command == "MESSAGE" }.last }.should raise_error(Stomper::Errors::UnsupportedCommandError)
end

When /^the client acks a message by ID "([^"]*)" and subscription "([^"]*)"$/ do |message_id, subscription|
  @connection.ack message_id, subscription
end

When /^the client nacks the last MESSAGE$/ do
  @connection.nack @received_frames.select { |f| f.command == "MESSAGE" }.last
end

When /^the client nacks a message by ID "([^"]*)" and subscription "([^"]*)"$/ do |message_id, subscription|
  @connection.nack message_id, subscription
end

Then /^the client acking a message by ID "([^"]*)" should raise an argument error$/ do |message_id|
  lambda { @connection.ack message_id }.should raise_error(ArgumentError)
end

Then /^the client nacking a message by ID "([^"]*)" should raise an argument error$/ do |message_id|
  lambda { @connection.nack message_id }.should raise_error(ArgumentError)
end

Then /^the client acking the last MESSAGE should raise an argument error$/ do
  lambda { @connection.ack @received_frames.select { |f| f.command == "MESSAGE" }.last }.should raise_error(ArgumentError)
end

Then /^the client nacking the last MESSAGE should raise an argument error$/ do
  lambda { @connection.nack @received_frames.select { |f| f.command == "MESSAGE" }.last }.should raise_error(ArgumentError)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stomper-2.0.0 features/steps/acking_messages_steps.rb