# Run Coverage report require 'codeclimate-test-reporter' CodeClimate::TestReporter.start # Configure Rails Environment ENV['RAILS_ENV'] = 'test' require File.expand_path('../dummy/config/environment.rb', __FILE__) require 'rspec/rails' require 'database_cleaner' require 'ffaker' # 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 solidus_core require 'spree/testing_support/authorization_helpers' require 'spree/testing_support/capybara_ext' require 'spree/testing_support/controller_requests' require 'spree/testing_support/factories' require 'spree/testing_support/url_helpers' require 'solidus_br_common/factories' require 'solidus_pagseguro_oficial/factories' RSpec.configure do |config| config.include FactoryGirl::Syntax::Methods config.include Spree::TestingSupport::UrlHelpers config.include Spree::TestingSupport::AuthorizationHelpers::Controller config.include Spree::TestingSupport::ControllerRequests, :type => :controller config.mock_with :rspec config.color = true config.fixture_path = "#{::Rails.root}/spec/fixtures" config.fail_fast = ENV['FAIL_FAST'] || false config.order = 'random' config.infer_spec_type_from_file_location! end