Created
July 2, 2012 01:47
-
-
Save rurounijones/3030423 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- encoding : utf-8 -*- | |
# This file is copied to spec/ when you run 'rails generate rspec:install' | |
# Simplecov is disabled until this issue has been fixed | |
# https://github.com/colszowka/simplecov/issues/86 | |
#require 'simplecov' | |
#SimpleCov.start 'rails' do | |
# add_filter "/app/views" | |
# add_group "Jobs", "app/jobs" | |
# add_group "Services", "app/services" | |
#end | |
ENV["RAILS_ENV"] ||= 'test' | |
require File.expand_path("../../config/environment", __FILE__) | |
require 'rspec/rails' | |
require 'database_cleaner' | |
require 'capybara/rspec' | |
require 'webmock/rspec' | |
require 'rspec/autorun' | |
# Requires supporting ruby files with custom matchers and macros, etc, | |
# in spec/support/ and its subdirectories. | |
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f} | |
DatabaseCleaner.strategy = :truncation, {:except => %w[system]} | |
RSpec.configure do |config| | |
config.mock_with :rspec | |
config.include Devise::TestHelpers, :type => :controller | |
config.extend ControllerMacros, :type => :controller | |
config.fixture_path = "#{::Rails.root}/spec/fixtures" | |
config.before :each do | |
DatabaseCleaner.clean | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment