1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix warning: circular argument reference

This fixes the following warnings:

```
rails/activejob/lib/active_job/test_helper.rb:119: warning: circular argument reference - except
rails/activejob/lib/active_job/test_helper.rb:166: warning: circular argument reference - except
```
This commit is contained in:
yuuji.yaginuma 2017-07-19 08:56:41 +09:00
parent a03a7ce50b
commit 2966f9598e

View file

@ -116,7 +116,7 @@ module ActiveJob
# HelloJob.perform_later('elfassy') # HelloJob.perform_later('elfassy')
# end # end
# end # end
def assert_enqueued_jobs(number, only: nil, except: except, queue: nil) def assert_enqueued_jobs(number, only: nil, except: nil, queue: nil)
if block_given? if block_given?
original_count = enqueued_jobs_size(only: only, except: except, queue: queue) original_count = enqueued_jobs_size(only: only, except: except, queue: queue)
yield yield
@ -163,7 +163,7 @@ module ActiveJob
# Note: This assertion is simply a shortcut for: # Note: This assertion is simply a shortcut for:
# #
# assert_enqueued_jobs 0, &block # assert_enqueued_jobs 0, &block
def assert_no_enqueued_jobs(only: nil, except: except, &block) def assert_no_enqueued_jobs(only: nil, except: nil, &block)
assert_enqueued_jobs 0, only: only, except: except, &block assert_enqueued_jobs 0, only: only, except: except, &block
end end