# Auto-generated by Remi. # Add user-customizations to env_app.rb 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 Before '~@fails' do def expect_cucumber(&block) block.call end end Before '@fails' do def expect_cucumber(&block) begin block.call rescue RSpec::Expectations::ExpectationNotMetError => err puts "Expected error: #{err}" end end end # Fix current time to the first time it is called in a test module TimeTesting def current @current_time ||= super end end class Time class << Time prepend TimeTesting end end # Include user-defined environment require_relative 'env_app.rb'