aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/validations
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-08-14 02:13:00 -0300
committerXavier Noria <fxn@hashref.com>2010-08-14 13:17:32 +0200
commitb95d6e84b00bd926b1118f6a820eca7a870b8c35 (patch)
tree0753080f3b0dabbe0b2f62abe044c24d6b4ed5c4 /activemodel/test/cases/validations
parent36a84a4f15f29b41c7cac2f8de410055006a8a8d (diff)
downloadrails-b95d6e84b00bd926b1118f6a820eca7a870b8c35.tar.gz
rails-b95d6e84b00bd926b1118f6a820eca7a870b8c35.tar.bz2
rails-b95d6e84b00bd926b1118f6a820eca7a870b8c35.zip
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
Diffstat (limited to 'activemodel/test/cases/validations')
-rw-r--r--activemodel/test/cases/validations/validates_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activemodel/test/cases/validations/validates_test.rb b/activemodel/test/cases/validations/validates_test.rb
index b85e491a9c..db023f6169 100644
--- a/activemodel/test/cases/validations/validates_test.rb
+++ b/activemodel/test/cases/validations/validates_test.rb
@@ -26,7 +26,7 @@ class ValidatesTest < ActiveModel::TestCase
person.valid?
assert_equal ['my custom message'], person.errors[:salary]
end
-
+
def test_validates_with_validator_class
Person.validates :karma, :email => true
person = Person.new
@@ -93,18 +93,18 @@ class ValidatesTest < ActiveModel::TestCase
person.valid?
assert_equal ['my custom message'], person.errors[:karma]
end
-
+
def test_validates_with_unknown_validator
assert_raise(ArgumentError) { Person.validates :karma, :unknown => true }
end
-
+
def test_validates_with_included_validator
PersonWithValidator.validates :title, :presence => true
person = PersonWithValidator.new
person.valid?
assert_equal ['Local validator'], person.errors[:title]
end
-
+
def test_validates_with_included_validator_and_options
PersonWithValidator.validates :title, :presence => { :custom => ' please' }
person = PersonWithValidator.new