diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index e639980df..8255083ce 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -16,6 +16,22 @@ def setup_command_line(*options) end end + def test_display_exception_details + begin + raise 'test' + rescue => ex + end + + out, err = capture_io do + @app.display_error_message ex + end + + assert_empty out + + assert_match 'rake aborted!', err + assert_match __method__.to_s, err + end + def test_display_tasks @app.options.show_tasks = :tasks @app.options.show_task_pattern = //