begin
  require 'simplecov'
  SimpleCov.start do
    add_filter "spec/"
  end
rescue LoadError
  puts "Skipping SimpleCov"
end

require File.expand_path("../dummy/config/environment.rb",  __FILE__)

require 'rspec/rails'
require 'delorean'
require 'json_spec'
require 'uuid'
require "crash_log"

# require File.expand_path("../dummy/config/environment.rb",  __FILE__)

Dir[File.expand_path("../support/*.rb", __FILE__)].each { |file| require file }

RSpec.configure do |config|
  config.mock_with :rspec
  config.include Delorean
  config.include DefinesConstants

  config.before(:each) do
    setup_constants
  end

  config.after(:each) do
    teardown_constants
  end
end

begin
  require 'simplecov'
  SimpleCov.start do
    add_filter "spec/"
  end
rescue LoadError
  puts "Skipping SimpleCov"
end

# require File.expand_path("../dummy/config/environment.rb",  __FILE__)

# require 'rspec/rails'
require 'delorean'
require 'json_spec'
require 'uuid'
require "crash_log"

# require File.expand_path("../dummy/config/environment.rb",  __FILE__)

Dir[File.expand_path("../support/*.rb", __FILE__)].each { |file| require file }

RSpec.configure do |config|
  config.mock_with :rspec
  config.include Delorean
  config.include DefinesConstants

  config.before(:each) do
    setup_constants
  end

  config.after(:each) do
    teardown_constants
    CrashLog.reset_configuration!
  end
end

Reset configuration after tests so we can use a real configuration for testing
Reset configuration after tests so we can use a real configuration for testing
