diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2016-11-18 18:20:48 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2016-11-18 18:20:48 +0900 |
commit | 5b825c55fea48c7c32921a62e4d10a99fdbe8a87 (patch) | |
tree | 9be17e13644a3c97c145353ec1619192681a0f36 | |
parent | 796049ef3e0c526a2c97418d4ba266050bc38c0a (diff) | |
download | rails-5b825c55fea48c7c32921a62e4d10a99fdbe8a87.tar.gz rails-5b825c55fea48c7c32921a62e4d10a99fdbe8a87.tar.bz2 rails-5b825c55fea48c7c32921a62e4d10a99fdbe8a87.zip |
remove Ruby warning from Active Job test helper methods
This removes the following warnings.
```
/home/travis/build/rails/rails/activejob/lib/active_job/test_helper.rb:241: warning: shadowing outer local variable - job
/home/travis/build/rails/rails/activejob/lib/active_job/test_helper.rb:265: warning: shadowing outer local variable - job
```
-rw-r--r-- | activejob/lib/active_job/test_helper.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activejob/lib/active_job/test_helper.rb b/activejob/lib/active_job/test_helper.rb index 9e45c0da24..e6334d14ea 100644 --- a/activejob/lib/active_job/test_helper.rb +++ b/activejob/lib/active_job/test_helper.rb @@ -238,8 +238,8 @@ module ActiveJob 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) @@ -262,8 +262,8 @@ module ActiveJob 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) |