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