Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove Ruby warning from Active Job test helper methods #27094

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions activejob/lib/active_job/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ def assert_enqueued_with(job: nil, args: nil, at: nil, queue: nil)
serialized_args = serialize_args_for_assertion(expected)
yield
in_block_jobs = enqueued_jobs.drop(original_enqueued_jobs_count)
matching_job = in_block_jobs.find do |job|
serialized_args.all? { |key, value| value == job[key] }
matching_job = in_block_jobs.find do |in_block_job|
serialized_args.all? { |key, value| value == in_block_job[key] }
end
assert matching_job, "No enqueued job found with #{expected}"
instantiate_job(matching_job)
Expand All @@ -262,8 +262,8 @@ def assert_performed_with(job: nil, args: nil, at: nil, queue: nil)
serialized_args = serialize_args_for_assertion(expected)
perform_enqueued_jobs { yield }
in_block_jobs = performed_jobs.drop(original_performed_jobs_count)
matching_job = in_block_jobs.find do |job|
serialized_args.all? { |key, value| value == job[key] }
matching_job = in_block_jobs.find do |in_block_job|
serialized_args.all? { |key, value| value == in_block_job[key] }
end
assert matching_job, "No performed job found with #{expected}"
instantiate_job(matching_job)
Expand Down