# Setup for test coverage instrumentation (e.g. simplecov, codeclimate)
# MUST happen before any other code is loaded
require 'simplecov'
SimpleCov.start 'test_frameworks'

require 'codeclimate-test-reporter'
CodeClimate::TestReporter.start

require 'pry'

# Load rails dummy application
ENV['RAILS_ENV'] = 'test'
require File.expand_path('../dummy/config/environment.rb',  __FILE__)

require 'rspec/rails'
require 'capybara/rspec'
require 'webmock/rspec'
require 'shoulda-matchers'
require 'factory_girl_rails'

# Load support files
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

RSpec.configure do |config|
  config.include FactoryGirl::Syntax::Methods

  config.use_transactional_fixtures = true

  config.treat_symbols_as_metadata_keys_with_true_values = true
  config.run_all_when_everything_filtered = true
  config.filter_run :focus

  # 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'

  # The integration tests can be run with:
  # rspec -t type:feature
  config.filter_run_excluding type: 'feature'

  config.after(:suite) { WebMock.disable! }
end

# Setup for test coverage instrumentation (e.g. simplecov, codeclimate)
# MUST happen before any other code is loaded
require 'simplecov'
SimpleCov.start 'test_frameworks'

require 'codeclimate-test-reporter'
CodeClimate::TestReporter.start

require 'pry'

# Load rails dummy application
ENV['RAILS_ENV'] = 'test'
require File.expand_path('../dummy/config/environment.rb',  __FILE__)

require 'rspec/rails'
require 'capybara/rspec'
require 'webmock/rspec'
require 'shoulda-matchers'
require 'factory_girl_rails'

# Load support files
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

RSpec.configure do |config|
  config.include FactoryGirl::Syntax::Methods

  config.use_transactional_fixtures = true

  config.treat_symbols_as_metadata_keys_with_true_values = true
  config.run_all_when_everything_filtered = true
  config.filter_run :focus

  # 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'

  # The integration tests can be run with:
  # rspec -t type:feature
  # config.filter_run_excluding type: 'feature'

  config.after(:suite) { WebMock.disable! }
end

Enable feature specs in default test suite
Enable feature specs in default test suite
