diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2015-10-03 13:33:50 +0200 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2015-10-03 13:33:50 +0200 |
commit | 55ac94cec45328657c579024bb835fe18bb2d32b (patch) | |
tree | 547e17f9737898808d2fa4fdb1f039fd12a29f1b /activejob/lib | |
parent | 1b00c36d8535e88ffcc6e4401f3c91acd6138ba3 (diff) | |
parent | 8a67c56efbb4824cd693b47a48520932b0b84b70 (diff) | |
download | rails-55ac94cec45328657c579024bb835fe18bb2d32b.tar.gz rails-55ac94cec45328657c579024bb835fe18bb2d32b.tar.bz2 rails-55ac94cec45328657c579024bb835fe18bb2d32b.zip |
Merge pull request #21852 from morgoth/support-array-in-assert_enqueued_jobs-for-only-option
Support passing array to `assert_enqueued_jobs` in `:only` option
Diffstat (limited to 'activejob/lib')
-rw-r--r-- | activejob/lib/active_job/test_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activejob/lib/active_job/test_helper.rb b/activejob/lib/active_job/test_helper.rb index 476d681eed..666e984fe0 100644 --- a/activejob/lib/active_job/test_helper.rb +++ b/activejob/lib/active_job/test_helper.rb @@ -300,7 +300,7 @@ module ActiveJob def enqueued_jobs_size(only: nil) # :nodoc: if only - enqueued_jobs.select { |job| job.fetch(:job) == only }.size + enqueued_jobs.select { |job| Array(only).include?(job.fetch(:job)) }.size else enqueued_jobs.size end |