diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-11-09 19:57:24 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-11-09 19:57:24 +0000 |
commit | b318134c99dc3f0f639f6dd225bfc807b4e76460 (patch) | |
tree | bc29e9329aee0fb65b077811d30ee1150f556b58 /activerecord/test/base_test.rb | |
parent | 21350d226e525a70a29076b65455193a0255a5c3 (diff) | |
download | rails-b318134c99dc3f0f639f6dd225bfc807b4e76460.tar.gz rails-b318134c99dc3f0f639f6dd225bfc807b4e76460.tar.bz2 rails-b318134c99dc3f0f639f6dd225bfc807b4e76460.zip |
Kill the whiny_protected_attributes setting and kill the exception raised. Instead, just log the mass-assignment misalignment as a debug warning (closes #9966)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8120 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/base_test.rb')
-rwxr-xr-x | activerecord/test/base_test.rb | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/activerecord/test/base_test.rb b/activerecord/test/base_test.rb index 103f9f7271..e17b2a1b57 100755 --- a/activerecord/test/base_test.rb +++ b/activerecord/test/base_test.rb @@ -67,13 +67,6 @@ end class BasicsTest < Test::Unit::TestCase fixtures :topics, :companies, :developers, :projects, :computers, :accounts, :minimalistics - # whiny_protected_attributes is turned off since several tests were - # not written with it in mind, and would otherwise raise exceptions - # as an irrelevant side-effect. - def setup - ActiveRecord::Base.whiny_protected_attributes = false - end - def test_table_exists assert !NonExistentTable.table_exists? assert Topic.table_exists? @@ -861,17 +854,6 @@ class BasicsTest < Test::Unit::TestCase assert_equal [ :name, :address, :phone_number ], TightDescendant.accessible_attributes end - def test_whiny_protected_attributes - ActiveRecord::Base.whiny_protected_attributes = true - assert_raise(ActiveRecord::ProtectedAttributeAssignmentError) do - LoosePerson.create!(:administrator => true) - end - ActiveRecord::Base.whiny_protected_attributes = false - assert_nothing_raised do - LoosePerson.create!(:administrator => true) - end - end - def test_readonly_attributes assert_equal [ :title ], ReadonlyTitlePost.readonly_attributes |