Sha256: 0940890795f037ca68b94e5405c4e32043823b7003e2ece8bf42b53b3fce2025

Contents?: true

Size: 1.22 KB

Versions: 5

Compression:

Stored size: 1.22 KB

Contents

require 'simplecov'
SimpleCov.start

require 'codecov'
SimpleCov.formatter = SimpleCov::Formatter::Codecov if ENV['CI']

require 'webmock/rspec'
require 'dotenv'
require 'pry'
Dotenv.overload('.env.test')

# This file was generated by the `rspec --init` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# Require this file using `require "spec_helper"` to ensure that it is only
# loaded once.
#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
RSpec.configure do |config|
  config.run_all_when_everything_filtered = true
  config.raise_errors_for_deprecations!

  config.before(:each) do
    Materialist.reset_configuration!
    
    # clear database
    ActiveRecord::Base.descendants.each(&:delete_all)
  end

  # Run specs in random order to surface order dependencies. If you find an
  # order dependency and want to debug it, you can fix the order by providing
  # the seed, which is printed after each run.
  #     --seed 1234
  config.order = 'random'
end

# active record
require 'active_record'

ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:"

load File.dirname(__FILE__) + '/schema.rb'
load File.dirname(__FILE__) + '/models.rb'

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
materialist-3.4.0 spec/spec_helper.rb
materialist-3.3.0 spec/spec_helper.rb
materialist-3.2.0 spec/spec_helper.rb
materialist-3.1.0 spec/spec_helper.rb
materialist-3.0.0 spec/spec_helper.rb