OSDN Git Service

fix test
[pettanr/pettanr.git] / spec / spec_helper.rb
index ff72142..19d27e0 100644 (file)
@@ -7,7 +7,7 @@ require 'rspec/autorun'
 # 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}
-require File.expand_path(File.dirname(__FILE__) + '/factories.rb')\r
+Dir.glob(File.dirname(__FILE__) + '/factories/*.rb').each {|f| require f }
 
 RSpec.configure do |config|
   # == Mock Framework
@@ -31,7 +31,8 @@ RSpec.configure do |config|
   # automatically. This will be the default behavior in future versions of
   # rspec-rails.
   config.infer_base_class_for_anonymous_controllers = false
-  config.include Devise::TestHelpers, :type => :controller\r
-#  config.extend ControllerMacros, :type => :controller\r
-
+  config.include Devise::TestHelpers, :type => :controller
+#  config.extend ControllerMacros, :type => :controller
+  config.infer_spec_type_from_file_location!
+  config.raise_errors_for_deprecations!
 end