diff options
| author | Zack Hobson | 2013-11-30 08:46:36 -0800 |
|---|---|---|
| committer | Zack Hobson | 2013-11-30 08:46:36 -0800 |
| commit | 390d75de4688071cc4ce6ddc25c665f4b77effd4 (patch) | |
| tree | c46f9a75ec24d9e15fdf6957295b1b70c6096d97 /test | |
| parent | cfd20ff0ad010f81c437e9514141b7a67de85175 (diff) | |
| download | hcl-390d75de4688071cc4ce6ddc25c665f4b77effd4.tar.bz2 | |
add tests
Diffstat (limited to 'test')
| -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 |
