Sha256: f31d9b23256e31704b46b2afd106ec4efbf12d026e76cdddb93160b71b9de8ef
Contents?: true
Size: 1.07 KB
Versions: 11
Compression:
Stored size: 1.07 KB
Contents
# This file is copied to spec/ when you run 'rails generate rspec:install' ENV["RAILS_ENV"] ||= "test" require File.expand_path("../dummy/config/environment", __FILE__) require "capybara/rspec" require "database_cleaner" require "factory_girl_rails" require "rspec/rails" require "rspec/autorun" Rails.backtrace_cleaner.remove_silencers! # 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 } # Checks for pending migrations before tests are run. # If you are not using ActiveRecord, you can remove this line. ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration) RSpec.configure do |config| config.mock_with :rspec config.use_transactional_fixtures = true config.infer_base_class_for_anonymous_controllers = false config.order = "random" config.include FactoryGirl::Syntax::Methods config.before(:suite) do begin DatabaseCleaner.start FactoryGirl.lint ensure DatabaseCleaner.clean end end end
Version data entries
11 entries across 11 versions & 1 rubygems