1 # This file is copied to spec/ when you run 'rails generate rspec:install'
2 ENV["RAILS_ENV"] ||= 'test'
3 require File
.expand_path("../../config/environment", __FILE__
)
5 require 'rspec/autorun'
6 require 'capybara/rspec'
8 # Requires supporting ruby files with custom matchers and macros, etc,
9 # in spec/support/ and its subdirectories.
10 Dir
[Rails
.root
.join("spec/support/**/*.rb")].each
{ |f
| require f
}
12 # Checks for pending migrations before tests are run.
13 # If you are not using ActiveRecord, you can remove this line.
14 ActiveRecord
::Migration.check_pending
! if defined?(ActiveRecord
::Migration)
16 RSpec
.configure
do |config
|
19 # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
21 # config.mock_with :mocha
22 # config.mock_with :flexmock
23 # config.mock_with :rr
25 # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
26 config
.fixture_path
= "#{::Rails.root}/spec/fixtures"
28 # If you're not using ActiveRecord, or you'd prefer not to run each of your
29 # examples within a transaction, remove the following line or assign false
31 config
.use_transactional_fixtures
= true
33 # If true, the base class of anonymous controllers will be inferred
34 # automatically. This will be the default behavior in future versions of
36 config
.infer_base_class_for_anonymous_controllers
= false
38 # Run specs in random order to surface order dependencies. If you find an
39 # order dependency and want to debug it, you can fix the order by providing
40 # the seed, which is printed after each run.
42 config
.order
= "random"