aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib/active_job/test_helper.rb
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-05-01 08:53:18 +0200
committerYves Senn <yves.senn@gmail.com>2015-05-01 08:59:58 +0200
commit4d4950fae9e2a6970b5f1793aadc56a0b44e28a3 (patch)
tree934bb07ac5052a6ec4768fb489c1d5f285f00eeb /activejob/lib/active_job/test_helper.rb
parent8fd46330095b3c1a5d7461c194028e22d9b77b97 (diff)
parent915086669834a5e238aafab4e41547ccfe175f34 (diff)
downloadrails-4d4950fae9e2a6970b5f1793aadc56a0b44e28a3.tar.gz
rails-4d4950fae9e2a6970b5f1793aadc56a0b44e28a3.tar.bz2
rails-4d4950fae9e2a6970b5f1793aadc56a0b44e28a3.zip
Merge pull request #19969 from y-yagi/fix_job_helper_method
match a expected value with message of `assert_equal` in AJ helper methods
Diffstat (limited to 'activejob/lib/active_job/test_helper.rb')
-rw-r--r--activejob/lib/active_job/test_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activejob/lib/active_job/test_helper.rb b/activejob/lib/active_job/test_helper.rb
index 4efb4b72d2..9b307e8dc8 100644
--- a/activejob/lib/active_job/test_helper.rb
+++ b/activejob/lib/active_job/test_helper.rb
@@ -68,7 +68,7 @@ module ActiveJob
original_count = enqueued_jobs_size(only: only)
yield
new_count = enqueued_jobs_size(only: only)
- assert_equal original_count + number, new_count, "#{number} jobs expected, but #{new_count - original_count} were enqueued"
+ assert_equal number, new_count - original_count, "#{number} jobs expected, but #{new_count - original_count} were enqueued"
else
actual_count = enqueued_jobs_size(only: only)
assert_equal number, actual_count, "#{number} jobs expected, but #{actual_count} were enqueued"
@@ -164,7 +164,7 @@ module ActiveJob
original_count = performed_jobs.size
perform_enqueued_jobs(only: only) { yield }
new_count = performed_jobs.size
- assert_equal original_count + number, new_count,
+ assert_equal number, new_count - original_count,
"#{number} jobs expected, but #{new_count - original_count} were performed"
else
performed_jobs_size = performed_jobs.size