Permalink
Browse files

capture exit and abort run

  • Loading branch information...
1 parent a4951a3 commit 329e4a84986d22bf96a6223acb5d0ee69c8adefa @ddollar ddollar committed Feb 21, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 spec/spec_helper.rb
View
@@ -72,9 +72,16 @@ def any_instance_of(klass, &block)
end
def run(command_line)
- capture_stdout { Heroku::CLI.start(*command_line.split(" ")) }
+ capture_stdout do
+ begin
+ Heroku::CLI.start(*command_line.split(" "))
+ rescue SystemExit
+ end
+ end
end
+alias heroku run
+
def capture_stdout(&block)
original_stdout = $stdout
$stdout = fake = StringIO.new

0 comments on commit 329e4a8

Please sign in to comment.