We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec1b222 commit 5d9d3b0Copy full SHA for 5d9d3b0
snippets/include_activesupport_testing_tagged_logger.rb
@@ -57,11 +57,12 @@ class TestError < StandardError; end
57
it 'raises the explicitly thrown error' do
58
allow_any_instance_of(TestJob).to receive(:perform).and_raise(TestError)
59
60
+ test_error = TestError.new('foo')
61
# Rails 6.1+ wraps unexpected errors in tests
62
expected_error = if Rails::VERSION::STRING.to_f >= 6.1
- Minitest::UnexpectedError.new(TestError)
63
+ Minitest::UnexpectedError.new(test_error)
64
else
- TestError
65
+ test_error
66
end
67
68
expect { perform_enqueued_jobs { TestJob.perform_later } }
0 commit comments