Skip to content

Commit

Permalink
Show command and its stdout when be_reachable fails
Browse files Browse the repository at this point in the history
  • Loading branch information
mizzy committed May 5, 2013
1 parent 890678c commit 4d5c158
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/serverspec/matchers/be_reachable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@

backend.check_reachable(example, host, port, proto, timeout)
end

chain :with do |attr|
@attr = attr
end

failure_message_for_should do |host|
message = "#{example.metadata[:command]}\n"
message += "#{example.metadata[:stdout]}"
message
end
end

0 comments on commit 4d5c158

Please sign in to comment.