diff options
Diffstat (limited to 'railties/test/isolation/abstract_unit.rb')
-rw-r--r-- | railties/test/isolation/abstract_unit.rb | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb index 4fb5e6a4eb..ac4c2abfc8 100644 --- a/railties/test/isolation/abstract_unit.rb +++ b/railties/test/isolation/abstract_unit.rb @@ -116,7 +116,12 @@ module TestHelpers end end - add_to_config 'config.secret_token = "3b7cd727ee24e8444053437c36cc66c4"; config.session_store :cookie_store, :key => "_myapp_session"; config.active_support.deprecation = :log' + add_to_config <<-RUBY + config.secret_token = "3b7cd727ee24e8444053437c36cc66c4" + config.session_store :cookie_store, :key => "_myapp_session" + config.active_support.deprecation = :log + config.action_controller.allow_forgery_protection = false + RUBY end def teardown_app @@ -245,9 +250,11 @@ module TestHelpers def use_frameworks(arr) to_remove = [:actionmailer, :activemodel, - :activerecord, - :activeresource] - arr - remove_from_config "config.active_record.dependent_restrict_raises = false" if to_remove.include? :activerecord + :activerecord] - arr + if to_remove.include? :activerecord + remove_from_config "config.active_record.whitelist_attributes = true" + remove_from_config "config.active_record.dependent_restrict_raises = false" + end $:.reject! {|path| path =~ %r'/(#{to_remove.join('|')})/' } end |