Sha256: 6bd4e9a76c3452db9a29df7e879cb6ab0f9a4361852899583c66c5cf3fa7602d
Contents?: true
Size: 1.07 KB
Versions: 5
Compression:
Stored size: 1.07 KB
Contents
Given /^a header scope with headers$/ do |table| headers = table_to_headers table @scope = @connection.with_headers(headers) end Given /^a transaction scope named "([^"]*)"$/ do |tx| @scope = @connection.with_transaction(:transaction => tx) end When /^the client begins the transaction scope$/ do @scope.begin end When /^the client aborts the transaction scope$/ do @scope.abort end When /^the client executes a successful transaction block named "([^"]*)"$/ do |tx| @connection.with_transaction(:transaction => tx) do |t| t.ack "message-id", "subscription-id" t.send "/queue/transaction/test", "message" t.nack "message-id-2", "subscription-id-2" end end When /^the client executes an unsuccessful transaction block named "([^"]*)"$/ do |tx| lambda do @connection.with_transaction(:transaction => tx) do |t| t.ack "message-id", "subscription-id" t.send "/queue/transaction/test", "message" t.nack "message-id-2", "subscription-id-2" raise "transaction will now fail" end end.should raise_error("transaction will now fail") end
Version data entries
5 entries across 5 versions & 1 rubygems