Skip to content

Commit

Permalink
Formatted he output of the failure message a bit better.
Browse files Browse the repository at this point in the history
  • Loading branch information
lothos authored and Gordon Craig committed Sep 18, 2017
1 parent b351432 commit 887980d
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ def client.say(options = {})
true
end
failure_message do |_actual|
message = "expected to receive messages in order with text: #{expected}\n received:"
message += @messages.count.zero? ? 'No response messages received' : @messages.inspect
message = ''
expected.each do |exp|
message += "Expected text: #{exp}, got #{@messages[expected.index(exp)] || 'No Response'}"
end
message
end
end

0 comments on commit 887980d

Please sign in to comment.