Sha256: 38d07aababf9478d8ead2d1d6476d7f7e1f6293122adc26bcb4bd6883e76a33c

Contents?: true

Size: 1.05 KB

Versions: 35

Compression:

Stored size: 1.05 KB

Contents

# frozen_string_literal: true

require 'spec_helper'

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

require 'spree/testing_support/dummy_app'
DummyApp.setup(
  gem_root: File.expand_path('..', __dir__),
  lib_name: 'solidus_core'
)

require 'rspec/rails'
require 'rspec-activemodel-mocks'
require 'database_cleaner'

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

require 'spree/testing_support/factories'
require 'spree/testing_support/preferences'
require 'cancan/matchers'

ActiveJob::Base.queue_adapter = :test

RSpec.configure do |config|
  config.fixture_path = File.join(__dir__, "fixtures")

  config.infer_spec_type_from_file_location!

  # If you're not using ActiveRecord, or you'd prefer not to run each of your
  # examples within a transaction, comment the following line or assign false
  # instead of true.
  config.use_transactional_fixtures = true

  config.before :suite do
    DatabaseCleaner.clean_with :truncation
  end

  config.before :each do
    Rails.cache.clear
  end

  config.include ActiveJob::TestHelper
  config.include FactoryBot::Syntax::Methods
end

Version data entries

35 entries across 35 versions & 2 rubygems

Version Path
solidus_core-2.8.6 spec/rails_helper.rb
solidus_core-2.6.6 spec/rails_helper.rb
solidus_core-2.7.4 spec/rails_helper.rb
solidus_core-2.8.5 spec/rails_helper.rb
solidus_core-2.7.3 spec/rails_helper.rb
solidus_core-2.6.5 spec/rails_helper.rb
solidus_core-2.9.0.rc.1 spec/rails_helper.rb
solidus_core-2.8.4 spec/rails_helper.rb
solidus_core-2.8.3 spec/rails_helper.rb
solidus_core-2.7.2 spec/rails_helper.rb
solidus_core-2.6.4 spec/rails_helper.rb
solidus_core-2.8.2 spec/rails_helper.rb
solidus_core-2.8.1 spec/rails_helper.rb
solidus_core-2.6.3 spec/rails_helper.rb
solidus_core-2.8.0 spec/rails_helper.rb
solidus_core-2.7.1 spec/rails_helper.rb
solidus_core-2.6.2 spec/rails_helper.rb
solidus_core_devise_token_auth-2.8.0.alpha.14 spec/rails_helper.rb
solidus_core_devise_token_auth-2.8.0.alpha.13 spec/rails_helper.rb
solidus_core_devise_token_auth-2.8.0.alpha.12 spec/rails_helper.rb