aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/validations
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-01-09 00:17:16 +0100
committerJosé Valim <jose.valim@gmail.com>2010-01-09 00:18:07 +0100
commit017f5d5308098438da0b8c44163af4ecb422f1e7 (patch)
treeb16f8fceb09cb0273fd6d5c5f2277754ab79c3c7 /activemodel/test/cases/validations
parent93898b389bafebc4d1b30a95330b4bb7d000c92d (diff)
downloadrails-017f5d5308098438da0b8c44163af4ecb422f1e7.tar.gz
rails-017f5d5308098438da0b8c44163af4ecb422f1e7.tar.bz2
rails-017f5d5308098438da0b8c44163af4ecb422f1e7.zip
Fix typo by renaming :genre to :gender.
Diffstat (limited to 'activemodel/test/cases/validations')
-rw-r--r--activemodel/test/cases/validations/validates_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/activemodel/test/cases/validations/validates_test.rb b/activemodel/test/cases/validations/validates_test.rb
index 966690d75f..d15fb4a524 100644
--- a/activemodel/test/cases/validations/validates_test.rb
+++ b/activemodel/test/cases/validations/validates_test.rb
@@ -70,20 +70,20 @@ class ValidatesTest < ActiveModel::TestCase
end
def test_validates_with_array
- Person.validates :genre, :inclusion => %w(m f)
+ Person.validates :gender, :inclusion => %w(m f)
person = Person.new
assert person.invalid?
- assert_equal ['is not included in the list'], person.errors[:genre]
- person.genre = "m"
+ assert_equal ['is not included in the list'], person.errors[:gender]
+ person.gender = "m"
assert person.valid?
end
def test_validates_with_range
- Person.validates :password, :length => 6..20
+ Person.validates :karma, :length => 6..20
person = Person.new
assert person.invalid?
- assert_equal ['is too short (minimum is 6 characters)'], person.errors[:password]
- person.password = '123456'
+ assert_equal ['is too short (minimum is 6 characters)'], person.errors[:karma]
+ person.karma = 'something'
assert person.valid?
end