2014-03-23 00:22:25 +00:00
|
|
|
ENV["RAILS_ENV"] ||= 'test'
|
|
|
|
|
2014-03-25 21:58:51 +00:00
|
|
|
require 'codeclimate-test-reporter'
|
2014-03-23 00:22:25 +00:00
|
|
|
require 'simplecov'
|
2014-03-25 21:58:51 +00:00
|
|
|
CodeClimate::TestReporter.start
|
2014-03-23 00:22:25 +00:00
|
|
|
SimpleCov.start 'rails'
|
|
|
|
|
|
|
|
require File.expand_path("../../config/environment", __FILE__)
|
|
|
|
require 'rspec/rails'
|
|
|
|
require 'capybara/rspec'
|
|
|
|
require 'capybara/poltergeist'
|
|
|
|
|
|
|
|
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
|
|
|
|
|
|
|
|
Capybara.javascript_driver = :poltergeist
|
|
|
|
|
|
|
|
RSpec.configure do |config|
|
|
|
|
config.include FactoryGirl::Syntax::Methods
|
2014-03-29 00:59:26 +00:00
|
|
|
config.include Controllers::JsonHelpers, :type => :controller
|
2014-03-23 00:22:25 +00:00
|
|
|
|
|
|
|
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
|
|
|
config.use_transactional_fixtures = true
|
|
|
|
config.order = "random"
|
|
|
|
end
|