Skip to content

Commit

Permalink
Test that errors get raised, not swallowed
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahramadan committed Jan 23, 2024
1 parent 2968b6c commit 95b5a58
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,10 @@ def test_metric_path_falsey
def test_metric_path_unknown_file_pattern
assert(FAKE_CLASS.metric_path('nothing_to_see_here'), 'unknown')
end

def test_error_raised
NewRelic::Agent::Tracer.stub(:start_segment, proc { |_args| raise 'kaboom' }) do
assert_equal(500, get('/view_components'))
end
end
end

0 comments on commit 95b5a58

Please sign in to comment.