Skip to content

Commit 5d9d3b0

Browse files
committed
Maybe this will fix the jRuby error
1 parent ec1b222 commit 5d9d3b0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

snippets/include_activesupport_testing_tagged_logger.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,12 @@ class TestError < StandardError; end
5757
it 'raises the explicitly thrown error' do
5858
allow_any_instance_of(TestJob).to receive(:perform).and_raise(TestError)
5959

60+
test_error = TestError.new('foo')
6061
# Rails 6.1+ wraps unexpected errors in tests
6162
expected_error = if Rails::VERSION::STRING.to_f >= 6.1
62-
Minitest::UnexpectedError.new(TestError)
63+
Minitest::UnexpectedError.new(test_error)
6364
else
64-
TestError
65+
test_error
6566
end
6667

6768
expect { perform_enqueued_jobs { TestJob.perform_later } }

0 commit comments

Comments
 (0)