Sha256: 8656eb272f58c5ae353718c9547b4849adb107b9e1e8d966453b51d0e1d29ebf
Contents?: true
Size: 1.96 KB
Versions: 2
Compression:
Stored size: 1.96 KB
Contents
# Run Coverage report require 'simplecov' require 'coveralls' SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter ] SimpleCov.start do add_filter 'spec/dummy' add_group 'Controllers', 'app/controllers' add_group 'Helpers', 'app/helpers' add_group 'Mailers', 'app/mailers' add_group 'Models', 'app/models' add_group 'Views', 'app/views' add_group 'Libraries', 'lib' end # Configure Rails Environment ENV['RAILS_ENV'] = 'test' require File.expand_path('../dummy/config/environment.rb', __FILE__) require 'rspec/rails' require 'database_cleaner' require 'ffaker' require 'pry' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require f } # Requires factories defined in spree_core require 'spree/testing_support/factories' require 'spree/testing_support/controller_requests' require 'spree/testing_support/authorization_helpers' require 'spree/testing_support/url_helpers' # Requires factories defined in lib/spree_cpf/factories.rb require 'spree_cpf/factories' RSpec.configure do |config| config.include FactoryGirl::Syntax::Methods config.include Spree::TestingSupport::UrlHelpers config.mock_with :rspec config.color = true config.use_transactional_fixtures = false # Ensure Suite is set to use transactions for speed. config.before :suite do DatabaseCleaner.strategy = :transaction DatabaseCleaner.clean_with :truncation end # Before each spec check if it is a Javascript test and switch between using database transactions or not where necessary. config.before :each do DatabaseCleaner.strategy = example.metadata[:js] ? :truncation : :transaction DatabaseCleaner.start end # After each spec clean the database. config.after :each do DatabaseCleaner.clean end config.fail_fast = ENV['FAIL_FAST'] || false end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
spree_cpf-2.1.7 | spec/spec_helper.rb |
spree_cpf-2.1.3 | spec/spec_helper.rb |