Sha256: c5118245d3c5740b6e640839f620d13ae34ae534c49c3c0c15613a675e2e4ec6

Contents?: true

Size: 812 Bytes

Versions: 1

Compression:

Stored size: 812 Bytes

Contents

# frozen_string_literal: true

ENV["RAILS_ENV"] ||= "test"

require "confset"

Dir["./spec/support/**/*.rb"].each { |f| require f }

RSpec.configure do |config|
  # Turn the deprecation warnings into errors, giving you the full backtrace
  config.raise_errors_for_deprecations!

  config.before(:suite) do
    Confset.module_eval do
      # Extend Confset module with ability to reset configuration to the default values
      def self.reset
        self.const_name           = "Settings"
        self.use_env              = false
        self.knockout_prefix      = nil
        self.overwrite_arrays     = true
        self.schema               = nil
        self.validation_contract  = nil
        self.fail_on_missing      = false
        instance_variable_set(:@_ran_once, false)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
confset-1.0.0 spec/spec_helper.rb