OSDN Git Service

t#31291:add stories index
[pettanr/pettanr.git] / spec / spec_helper.rb
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__)
4 require 'rspec/rails'
5 require 'rspec/autorun'
6
7 # Requires supporting ruby files with custom matchers and macros, etc,
8 # in spec/support/ and its subdirectories.
9 Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
10 require File.expand_path(File.dirname(__FILE__) + '/factories.rb')\r
11
12 RSpec.configure do |config|
13   # == Mock Framework
14   #
15   # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
16   #
17   # config.mock_with :mocha
18   # config.mock_with :flexmock
19   # config.mock_with :rr
20   config.mock_with :rspec
21
22   # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
23   config.fixture_path = "#{::Rails.root}/spec/fixtures"
24
25   # If you're not using ActiveRecord, or you'd prefer not to run each of your
26   # examples within a transaction, remove the following line or assign false
27   # instead of true.
28   config.use_transactional_fixtures = true
29
30   # If true, the base class of anonymous controllers will be inferred
31   # automatically. This will be the default behavior in future versions of
32   # rspec-rails.
33   config.infer_base_class_for_anonymous_controllers = false
34   config.include Devise::TestHelpers, :type => :controller\r
35 #  config.extend ControllerMacros, :type => :controller\r
36
37 end