Sha256: 7fca879a9e9bd4977084dcfa249179f587812174ece72d9ca03816f9d9c157c2

Contents?: true

Size: 1.7 KB

Versions: 13

Compression:

Stored size: 1.7 KB

Contents

if ENV["COVERAGE"]
  # Run Coverage report
  require 'simplecov'
  SimpleCov.start do
    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
end

# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'

begin
  require File.expand_path("../dummy/config/environment", __FILE__)
rescue LoadError
  puts "Could not load dummy application. Please ensure you have run `bundle exec rake test_app`"
  exit
end

require 'rspec/rails'
require 'rspec/autorun'
require 'ffaker'

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each {|f| require f}

require 'spree/testing_support/factories'
require 'spree/testing_support/preferences'

require 'spree/api/testing_support/caching'
require 'spree/api/testing_support/helpers'
require 'spree/api/testing_support/setup'

RSpec.configure do |config|
  config.backtrace_exclusion_patterns = [/gems\/activesupport/, /gems\/actionpack/, /gems\/rspec/]
  config.color = true
  config.infer_spec_type_from_file_location!

  config.include FactoryGirl::Syntax::Methods
  config.include Spree::Api::TestingSupport::Helpers, :type => :controller
  config.extend Spree::Api::TestingSupport::Setup, :type => :controller
  config.include Spree::TestingSupport::Preferences, :type => :controller

  config.fail_fast = ENV['FAIL_FAST'] || false

  config.before do
    Spree::Api::Config[:requires_authentication] = true
  end

  config.use_transactional_fixtures = true
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
spree_api-2.2.14 spec/spec_helper.rb
spree_api-2.2.13 spec/spec_helper.rb
spree_api-2.2.12 spec/spec_helper.rb
spree_api-2.2.11 spec/spec_helper.rb
spree_api-2.2.10 spec/spec_helper.rb
spree_api-2.2.9 spec/spec_helper.rb
spree_api-2.2.8 spec/spec_helper.rb
spree_api-2.2.7 spec/spec_helper.rb
spree_api-2.4.0.rc2 spec/spec_helper.rb
spree_api-2.4.0.rc1 spec/spec_helper.rb
spree_api-2.3.4 spec/spec_helper.rb
spree_api-2.2.6 spec/spec_helper.rb
spree_api-2.3.3 spec/spec_helper.rb