aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/validations_test.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-04-25 17:31:26 +0100
committerJon Leighton <j@jonathanleighton.com>2012-04-25 17:52:28 +0100
commit40a711ce29505e95d5033fe02c22ba7469206f06 (patch)
tree3876fc5727f548442b2a860486e7a8ef05b91dd7 /activerecord/test/cases/validations_test.rb
parentbc7309cde337bbd56326fd1f0b38e553f64b519e (diff)
downloadrails-40a711ce29505e95d5033fe02c22ba7469206f06.tar.gz
rails-40a711ce29505e95d5033fe02c22ba7469206f06.tar.bz2
rails-40a711ce29505e95d5033fe02c22ba7469206f06.zip
remove tests for #with_scope (it's now deprecated)
Diffstat (limited to 'activerecord/test/cases/validations_test.rb')
-rw-r--r--activerecord/test/cases/validations_test.rb24
1 files changed, 0 insertions, 24 deletions
diff --git a/activerecord/test/cases/validations_test.rb b/activerecord/test/cases/validations_test.rb
index e575a98170..b11b330374 100644
--- a/activerecord/test/cases/validations_test.rb
+++ b/activerecord/test/cases/validations_test.rb
@@ -93,30 +93,6 @@ class ValidationsTest < ActiveRecord::TestCase
end
end
- def test_scoped_create_without_attributes
- WrongReply.send(:with_scope, :create => {}) do
- assert_raise(ActiveRecord::RecordInvalid) { WrongReply.create! }
- end
- end
-
- def test_create_with_exceptions_using_scope_for_protected_attributes
- assert_nothing_raised do
- ProtectedPerson.send(:with_scope, :create => { :first_name => "Mary" } ) do
- person = ProtectedPerson.create! :addon => "Addon"
- assert_equal person.first_name, "Mary", "scope should ignore attr_protected"
- end
- end
- end
-
- def test_create_with_exceptions_using_scope_and_empty_attributes
- assert_nothing_raised do
- ProtectedPerson.send(:with_scope, :create => { :first_name => "Mary" } ) do
- person = ProtectedPerson.create!
- assert_equal person.first_name, "Mary", "should be ok when no attributes are passed to create!"
- end
- end
- end
-
def test_create_without_validation
reply = WrongReply.new
assert !reply.save