Commit 438b3b7a
Changed files (2)
spec/rails_helper.rb
@@ -1,9 +1,16 @@
# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'
+require 'simplecov'
+SimpleCov.start 'rails' do
+ add_filter '/spec/'
+ add_filter '/config/'
+ add_filter '/vendor/'
+end
require 'spec_helper'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'capybara/poltergeist'
+require "factory_girl_rails"
# Requires supporting ruby files with custom matchers and macros, etc, in
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
@@ -44,6 +51,7 @@ RSpec.configure do |config|
config.infer_spec_type_from_file_location!
config.include Authentication, type: :controller
config.include WaitForAjax, type: :feature
+ config.include FactoryGirl::Syntax::Methods
config.before(:suite) do
DatabaseCleaner.clean_with(:truncation)
spec/spec_helper.rb
@@ -1,12 +1,3 @@
-require 'simplecov'
-SimpleCov.start 'rails' do
- add_filter '/spec/'
- add_filter '/config/'
- add_filter '/vendor/'
-end
-
-require "factory_girl_rails"
-
# This file was generated by the `rails generate rspec:install` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# The generated `.rspec` file contains `--require spec_helper` which will cause this
@@ -80,6 +71,4 @@ RSpec.configure do |config|
# a real object. This is generally recommended.
mocks.verify_partial_doubles = true
end
-
- config.include FactoryGirl::Syntax::Methods
end