aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-08-10 12:33:51 +0100
committerJon Leighton <j@jonathanleighton.com>2012-08-10 17:45:06 +0100
commit5ad79989ef0a015fd22cfed90b2e8a56881e6c36 (patch)
tree8840456df7fb008c3306dae389f7cd73ec531977 /railties/test
parentd1835db6b5efce31af935aa804c7b537e14764d2 (diff)
downloadrails-5ad79989ef0a015fd22cfed90b2e8a56881e6c36.tar.gz
rails-5ad79989ef0a015fd22cfed90b2e8a56881e6c36.tar.bz2
rails-5ad79989ef0a015fd22cfed90b2e8a56881e6c36.zip
Remove the dependent_restrict_raises option.
It's not really a good idea to have this as a global config option. We should allow people to specify the behaviour per association. There will now be two new values: * :dependent => :restrict_with_exception implements the current behaviour of :restrict. :restrict itself is deprecated in favour of :restrict_with_exception. * :dependent => :restrict_with_error implements the new behaviour - it adds an error to the owner if there are dependent records present See #4727 for the original discussion of this.
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/generators/app_generator_test.rb5
1 files changed, 0 insertions, 5 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index 907065f75c..0924d26041 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -367,11 +367,6 @@ class AppGeneratorTest < Rails::Generators::TestCase
assert_file "config/application.rb", /config\.active_record\.whitelist_attributes = true/
end
- def test_active_record_dependent_restrict_raises_is_present_application_config
- run_generator
- assert_file "config/application.rb", /config\.active_record\.dependent_restrict_raises = false/
- end
-
def test_pretend_option
output = run_generator [File.join(destination_root, "myapp"), "--pretend"]
assert_no_match(/run bundle install/, output)