Sha256: c822c6be2569a4695ede994d5953559d2a7128647f9145088d06e063fd963de7

Contents?: true

Size: 826 Bytes

Versions: 1

Compression:

Stored size: 826 Bytes

Contents

require 'bundler/setup'
require 'experiment_light'

Bundler.setup

RSpec.configure do |config|
  config.treat_symbols_as_metadata_keys_with_true_values = true
  config.expect_with(:rspec) { |c| c.syntax = :expect }
  config.order = :random

  config.before :each do
    # reset experiment.yml
    File.open('spec/config/experiment.yml', 'w') do |f|
      init_hash = HashWithIndifferentAccess.new({
        foo: {
          development: true,
          test: true,
          production: false
        },
        bar: {
          development: true,
          test: false,
          production: true
        }
      })

      f.puts init_hash.to_hash.to_yaml
    end

    allow(ExperimentLight::Experiment).to receive(:file_path).and_return('spec/config/experiment.yml')
    ExperimentLight::Experiment.send(:reload!)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
experiment_light-0.3.0 spec/spec_helper.rb