diff options
| author | Mike McQuaid | 2016-05-08 17:12:31 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2016-05-08 17:12:31 +0100 |
| commit | 0158fc6da8482b5aae140fbef68b20c095b32079 (patch) | |
| tree | 4c67991e24a129519598d0d34644188a6eb888b1 /Library/Homebrew | |
| parent | bb7226060681d287619981940a78302beed1c1d6 (diff) | |
| download | brew-0158fc6da8482b5aae140fbef68b20c095b32079.tar.bz2 | |
test_integration_cmds: print output on failure. (#213)
Makes it easy to debug what’s gone wrong.
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/test/test_integration_cmds.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Library/Homebrew/test/test_integration_cmds.rb b/Library/Homebrew/test/test_integration_cmds.rb index ff1771974..601e511c2 100644 --- a/Library/Homebrew/test/test_integration_cmds.rb +++ b/Library/Homebrew/test/test_integration_cmds.rb @@ -65,13 +65,17 @@ class IntegrationCommandTests < Homebrew::TestCase def cmd(*args) output = cmd_output(*args) - assert_equal 0, $?.exitstatus + status = $?.exitstatus + puts "\n#{output}" if status != 0 + assert_equal 0, status output end def cmd_fail(*args) output = cmd_output(*args) - assert_equal 1, $?.exitstatus + status = $?.exitstatus + $stderr.puts "\n#{output}" if status != 1 + assert_equal 1, status output end |
