Skip to content

Commit

Permalink
Test display_exception_details
Browse files Browse the repository at this point in the history
Part of #272
  • Loading branch information
drbrain committed May 13, 2014
1 parent 67018c7 commit 92f4492
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/test_rake_application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 = //
Expand Down

0 comments on commit 92f4492

Please sign in to comment.