aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test/support/integration/test_case_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activejob/test/support/integration/test_case_helpers.rb')
-rw-r--r--activejob/test/support/integration/test_case_helpers.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/activejob/test/support/integration/test_case_helpers.rb b/activejob/test/support/integration/test_case_helpers.rb
index 9897f76fd0..da8638895b 100644
--- a/activejob/test/support/integration/test_case_helpers.rb
+++ b/activejob/test/support/integration/test_case_helpers.rb
@@ -1,5 +1,5 @@
-require 'active_support/concern'
-require 'support/integration/jobs_manager'
+require "active_support/core_ext/string/inflections"
+require "support/integration/jobs_manager"
module TestCaseHelpers
extend ActiveSupport::Concern
@@ -28,7 +28,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)