diff options
author | lvl0nax <lvl0nax@gmail.com> | 2016-04-28 15:18:51 +0300 |
---|---|---|
committer | Jeremy Daer <jeremydaer@gmail.com> | 2016-04-29 13:43:15 -0700 |
commit | 517cf249c369d4bca40b1f590ca641d8b717985e (patch) | |
tree | 445acaf994f8ebed290ccee2bf14840b33dd1825 /activejob | |
parent | 3136b17b7f5c3acd52248c65ebbd9e2bfcf5ac19 (diff) | |
download | rails-517cf249c369d4bca40b1f590ca641d8b717985e.tar.gz rails-517cf249c369d4bca40b1f590ca641d8b717985e.tar.bz2 rails-517cf249c369d4bca40b1f590ca641d8b717985e.zip |
Chomp: prefer String#chomp where we can for a clarity boost
Closes #24766, #24767
Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
Diffstat (limited to 'activejob')
-rw-r--r-- | activejob/test/support/integration/test_case_helpers.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activejob/test/support/integration/test_case_helpers.rb b/activejob/test/support/integration/test_case_helpers.rb index 9897f76fd0..fdf25c67a1 100644 --- a/activejob/test/support/integration/test_case_helpers.rb +++ b/activejob/test/support/integration/test_case_helpers.rb @@ -1,4 +1,5 @@ require 'active_support/concern' +require 'active_support/core_ext/string/inflections' require 'support/integration/jobs_manager' module TestCaseHelpers @@ -28,7 +29,8 @@ module TestCaseHelpers end def adapter_is?(*adapter_class_symbols) - adapter_class_symbols.map(&:to_s).include?(ActiveJob::Base.queue_adapter.class.name.split("::").last.gsub(/Adapter$/, '').underscore) + adapter = ActiveJob::Base.queue_adapter.class.name.demodulize.chomp('Adapter').underscore + adapter_class_symbols.map(&:to_s).include? adapter end def wait_for_jobs_to_finish_for(seconds=60) |