Skip to content

Commit 9253e6e

Browse files
committed
Improve #report backtrace tests
1 parent b61318b commit 9253e6e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

activesupport/test/error_reporter_test.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,10 @@ class ErrorReporterTest < ActiveSupport::TestCase
166166
assert_nil error.backtrace
167167
assert_nil error.backtrace_locations
168168

169-
assert_nil @reporter.report(error)
170-
assert_not_predicate error.backtrace, :empty?
171-
assert_not_predicate error.backtrace_locations, :empty?
169+
@reporter.report(error)
170+
171+
assert error.backtrace.first.start_with?(__FILE__)
172+
assert_equal __FILE__, error.backtrace_locations.first.path
172173
end
173174

174175
test "#record passes through the return value" do

0 commit comments

Comments
 (0)