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.rb17
1 files changed, 8 insertions, 9 deletions
diff --git a/activejob/test/support/integration/test_case_helpers.rb b/activejob/test/support/integration/test_case_helpers.rb
index fdf25c67a1..41bf9c89d1 100644
--- a/activejob/test/support/integration/test_case_helpers.rb
+++ b/activejob/test/support/integration/test_case_helpers.rb
@@ -1,6 +1,5 @@
-require 'active_support/concern'
-require 'active_support/core_ext/string/inflections'
-require 'support/integration/jobs_manager'
+require "active_support/core_ext/string/inflections"
+require "support/integration/jobs_manager"
module TestCaseHelpers
extend ActiveSupport::Concern
@@ -18,7 +17,7 @@ module TestCaseHelpers
end
end
- protected
+ private
def jobs_manager
JobsManager.current_manager
@@ -29,11 +28,11 @@ module TestCaseHelpers
end
def adapter_is?(*adapter_class_symbols)
- adapter = ActiveJob::Base.queue_adapter.class.name.demodulize.chomp('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)
+ def wait_for_jobs_to_finish_for(seconds = 60)
begin
Timeout.timeout(seconds) do
while !job_executed do
@@ -48,7 +47,7 @@ module TestCaseHelpers
Dummy::Application.root.join("tmp/#{id}")
end
- def job_executed(id=@id)
+ def job_executed(id = @id)
job_file(id).exist?
end
@@ -56,11 +55,11 @@ module TestCaseHelpers
Marshal.load(File.binread(job_file(id)))
end
- def job_executed_at(id=@id)
+ def job_executed_at(id = @id)
job_data(id)["executed_at"]
end
- def job_executed_in_locale(id=@id)
+ def job_executed_in_locale(id = @id)
job_data(id)["locale"]
end
end