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.rb20
1 files changed, 18 insertions, 2 deletions
diff --git a/activejob/test/support/integration/test_case_helpers.rb b/activejob/test/support/integration/test_case_helpers.rb
index 7e87ede275..9897f76fd0 100644
--- a/activejob/test/support/integration/test_case_helpers.rb
+++ b/activejob/test/support/integration/test_case_helpers.rb
@@ -42,7 +42,23 @@ module TestCaseHelpers
end
end
- def job_executed
- Dummy::Application.root.join("tmp/#{@id}").exist?
+ def job_file(id)
+ Dummy::Application.root.join("tmp/#{id}")
+ end
+
+ def job_executed(id=@id)
+ job_file(id).exist?
+ end
+
+ def job_data(id)
+ Marshal.load(File.binread(job_file(id)))
+ end
+
+ def job_executed_at(id=@id)
+ job_data(id)["executed_at"]
+ end
+
+ def job_executed_in_locale(id=@id)
+ job_data(id)["locale"]
end
end