[193] | 1 | # This file is copied to ~/spec when you run 'ruby script/generate rspec'
|
---|
| 2 | # from the project root directory.
|
---|
| 3 | ENV["RAILS_ENV"] ||= 'test'
|
---|
| 4 | require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
|
---|
| 5 | require 'spec/autorun'
|
---|
| 6 | require 'spec/rails'
|
---|
| 7 |
|
---|
| 8 | # Requires supporting files with custom matchers and macros, etc,
|
---|
| 9 | # in ./support/ and its subdirectories.
|
---|
| 10 | Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
---|
| 11 |
|
---|
| 12 | Spec::Runner.configure do |config|
|
---|
| 13 | # If you're not using ActiveRecord you should remove these
|
---|
| 14 | # lines, delete config/database.yml and disable :active_record
|
---|
| 15 | # in your config/boot.rb
|
---|
| 16 | config.use_transactional_fixtures = true
|
---|
| 17 | config.use_instantiated_fixtures = false
|
---|
| 18 | config.fixture_path = RAILS_ROOT + '/spec/fixtures/'
|
---|
| 19 |
|
---|
| 20 | # == Fixtures
|
---|
| 21 | #
|
---|
| 22 | # You can declare fixtures for each example_group like this:
|
---|
| 23 | # describe "...." do
|
---|
| 24 | # fixtures :table_a, :table_b
|
---|
| 25 | #
|
---|
| 26 | # Alternatively, if you prefer to declare them only once, you can
|
---|
| 27 | # do so right here. Just uncomment the next line and replace the fixture
|
---|
| 28 | # names with your fixtures.
|
---|
| 29 | #
|
---|
| 30 | # config.global_fixtures = :table_a, :table_b
|
---|
| 31 | #
|
---|
| 32 | # If you declare global fixtures, be aware that they will be declared
|
---|
| 33 | # for all of your examples, even those that don't use them.
|
---|
| 34 | #
|
---|
| 35 | # You can also declare which fixtures to use (for example fixtures for test/fixtures):
|
---|
| 36 | #
|
---|
| 37 | # config.fixture_path = RAILS_ROOT + '/spec/fixtures/'
|
---|
| 38 | #
|
---|
| 39 | # == Mock Framework
|
---|
| 40 | #
|
---|
| 41 | # RSpec uses it's own mocking framework by default. If you prefer to
|
---|
| 42 | # use mocha, flexmock or RR, uncomment the appropriate line:
|
---|
| 43 | #
|
---|
| 44 | # config.mock_with :mocha
|
---|
| 45 | # config.mock_with :flexmock
|
---|
| 46 | # config.mock_with :rr
|
---|
| 47 | #
|
---|
| 48 | # == Notes
|
---|
| 49 | #
|
---|
| 50 | # For more information take a look at Spec::Runner::Configuration and Spec::Runner
|
---|
| 51 | end
|
---|