diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-05-01 07:34:37 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-05-01 07:34:37 +0900 |
commit | 915086669834a5e238aafab4e41547ccfe175f34 (patch) | |
tree | 45fa9d65106096341f1e6e5fa186ec1f0712de9a | |
parent | 8fd46330095b3c1a5d7461c194028e22d9b77b97 (diff) | |
download | rails-915086669834a5e238aafab4e41547ccfe175f34.tar.gz rails-915086669834a5e238aafab4e41547ccfe175f34.tar.bz2 rails-915086669834a5e238aafab4e41547ccfe175f34.zip |
match a expected value with message of `assert_equal` in AJ helper methods
-rw-r--r-- | activejob/lib/active_job/test_helper.rb | 4 |
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 |