Sha256: 3ba4ab9f79899f31f3f651828d1adde9a1ce8f635b95a0bd48edd03b2dbd9f14

Contents?: true

Size: 1.24 KB

Versions: 7

Compression:

Stored size: 1.24 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')
require 'materialist'

# 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

7 entries across 7 versions & 1 rubygems

Version Path
materialist-3.8.3 spec/spec_helper.rb
materialist-3.8.2 spec/spec_helper.rb
materialist-3.8.1 spec/spec_helper.rb
materialist-3.8.0 spec/spec_helper.rb
materialist-3.7.0 spec/spec_helper.rb
materialist-3.6.0 spec/spec_helper.rb
materialist-3.5.0 spec/spec_helper.rb