Sha256: 0c49ecfd44febb41c40a8517a036dbcd45a7e277ff4794daaf735a4072c0924f
Contents?: true
Size: 689 Bytes
Versions: 1
Compression:
Stored size: 689 Bytes
Contents
# encoding: utf-8 module ConfigurationHelper def configure(&block) HireFire.configure(&block) end def with_configuration(&block) old_configuration = HireFire.configuration HireFire.configuration = HireFire::Configuration.new yield(HireFire.configuration) ensure HireFire.configuration = old_configuration end def with_max_workers(workers, &block) with_configuration do |config| config.max_workers = workers yield end end def with_min_workers(workers, &block) with_configuration do |config| config.min_workers = workers yield end end end RSpec.configure do |config| config.include ConfigurationHelper end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hirefire-0.1.4 | spec/support/configuration_helper.rb |