Module: ChaoticJob::Helpers::ClassMethods
- Defined in:
- lib/chaotic_job.rb
Instance Method Summary collapse
Instance Method Details
#test_simulation(job, variations: nil, callstack: nil, perform_only_jobs_within: nil, &block) ⇒ Object
88 89 90 91 92 93 94 95 96 |
# File 'lib/chaotic_job.rb', line 88 def test_simulation(job, variations: nil, callstack: nil, perform_only_jobs_within: nil, &block) seed = defined?(RSpec) ? RSpec.configuration.seed : Minitest.seed kwargs = {test: self, seed: seed} kwargs[:variations] = variations if variations kwargs[:callstack] = callstack if callstack kwargs[:perform_only_jobs_within] = perform_only_jobs_within if perform_only_jobs_within Simulation.new(job, **kwargs).define(&block) end |