|
|
@ -1,14 +1,17 @@
|
|
|
|
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
|
|
|
require 'spork'
|
|
|
|
ENV["RAILS_ENV"] ||= 'test'
|
|
|
|
|
|
|
|
require File.expand_path("../../config/environment", __FILE__)
|
|
|
|
|
|
|
|
require 'rspec/rails'
|
|
|
|
|
|
|
|
require 'rspec/autorun'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Requires supporting ruby files with custom matchers and macros, etc,
|
|
|
|
Spork.prefork do
|
|
|
|
# in spec/support/ and its subdirectories.
|
|
|
|
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
|
|
|
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
|
|
|
|
ENV["RAILS_ENV"] ||= 'test'
|
|
|
|
|
|
|
|
require File.expand_path("../../config/environment", __FILE__)
|
|
|
|
|
|
|
|
require 'rspec/rails'
|
|
|
|
|
|
|
|
require 'rspec/autorun'
|
|
|
|
|
|
|
|
|
|
|
|
RSpec.configure do |config|
|
|
|
|
# Requires supporting ruby files with custom matchers and macros, etc,
|
|
|
|
|
|
|
|
# in spec/support/ and its subdirectories.
|
|
|
|
|
|
|
|
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RSpec.configure do |config|
|
|
|
|
# == Mock Framework
|
|
|
|
# == Mock Framework
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
|
|
|
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
|
|
@ -30,4 +33,12 @@ RSpec.configure do |config|
|
|
|
|
# automatically. This will be the default behavior in future versions of
|
|
|
|
# automatically. This will be the default behavior in future versions of
|
|
|
|
# rspec-rails.
|
|
|
|
# rspec-rails.
|
|
|
|
config.infer_base_class_for_anonymous_controllers = false
|
|
|
|
config.infer_base_class_for_anonymous_controllers = false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ActiveSupport::Dependencies.clear
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Spork.each_run do
|
|
|
|
|
|
|
|
load Rails.root.join("config/routes.rb")
|
|
|
|
|
|
|
|
Dir[Rails.root.join("app/**/*.rb")].each { |f| load f }
|
|
|
|
end
|
|
|
|
end
|
|
|
|