Skip to content

Commit 1cedd98

Browse files
benoittgtpirj
authored andcommitted
Add a regression test for a removed method in 6.1
This method has been moved in rails/rails@3cece0b We do not include ActiveSupport::Testing::Assertion. This resulted in failures when `perform_enqueued_jobs do` was called from specs. Method was added back in rails/rails#40780, and was released in Rails 6.1.1
1 parent 3ddfb3a commit 1cedd98

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

spec/rspec/rails/matchers/active_job_spec.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,4 +702,16 @@ def self.name; "LoggingJob"; end
702702
}.to raise_error(/expected to perform exactly 1 jobs, but performed 0/)
703703
end
704704
end
705+
706+
describe 'Active Job test helpers' do
707+
include ActiveJob::TestHelper
708+
709+
it 'does not raise that "assert_nothing_raised" is undefined' do
710+
expect {
711+
perform_enqueued_jobs do
712+
:foo
713+
end
714+
}.to_not raise_error
715+
end
716+
end
705717
end

0 commit comments

Comments
 (0)