features/support/env.rb in remi-0.2.35 vs features/support/env.rb in remi-0.2.36
- old
+ new
@@ -4,14 +4,23 @@
require 'bundler/setup'
require 'remi'
require 'remi/cucumber'
Remi::Settings.log_level = Logger::ERROR
+Remi::Settings.jobs_dir = File.join(__dir__, '../../jobs')
Before do
# Restart the random number generator prior to each scenario to
# ensure we have reproducibility of random output
Kernel.srand(35983958269835333)
+
+ # Monkey patch faker gem so that dummy random dates and ranges are generated consistently
+ class Faker::Base
+ def self.rand_in_range(from, to)
+ from, to = to, from if to < from
+ Random.rand(from..to)
+ end
+ end
end
After do
Kernel.srand
end