diff options
| -rw-r--r-- | test/app_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/app_test.rb b/test/app_test.rb index 7f7ae28..65e3982 100644 --- a/test/app_test.rb +++ b/test/app_test.rb @@ -29,4 +29,19 @@ class AppTest < Test::Unit::TestCase app.expects(:show).when(throttled.is(true)) app.process_args('show').run end + + def test_report_generic_failure + app = HCl::App.new + app.expects(:show).raises(RuntimeError) + app.expects(:exit).with(1) + app.process_args('show').run + end + + def test_report_socket_error + app = HCl::App.new + app.expects(:show).raises(SocketError) + app.expects(:exit).with(1) + app.process_args('show').run + end + end |
