diff options
author | Oliver Jakubiec <ojakubiec@gmail.com> | 2013-04-02 18:45:28 -0700 |
---|---|---|
committer | Oliver Jakubiec <ojakubiec@gmail.com> | 2013-04-02 18:45:28 -0700 |
commit | b13789c30cc991e2c0b20f16705a88e45c91dcad (patch) | |
tree | a7dd94d14b8d62c4c48fb89d9a089eeac079a9b1 /activemodel/test/cases/validations_test.rb | |
parent | 8917a5b949856f8ef44d03d98470614c8cf8bbee (diff) | |
parent | 919c86d2d5e7b74b96305c0bfb0482bbe61d99f2 (diff) | |
download | rails-b13789c30cc991e2c0b20f16705a88e45c91dcad.tar.gz rails-b13789c30cc991e2c0b20f16705a88e45c91dcad.tar.bz2 rails-b13789c30cc991e2c0b20f16705a88e45c91dcad.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'activemodel/test/cases/validations_test.rb')
-rw-r--r-- | activemodel/test/cases/validations_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activemodel/test/cases/validations_test.rb b/activemodel/test/cases/validations_test.rb index a9d32808da..2934e70c2f 100644 --- a/activemodel/test/cases/validations_test.rb +++ b/activemodel/test/cases/validations_test.rb @@ -26,11 +26,11 @@ class ValidationsTest < ActiveModel::TestCase def test_single_field_validation r = Reply.new r.title = "There's no content!" - assert r.invalid?, "A reply without content shouldn't be saveable" + assert r.invalid?, "A reply without content shouldn't be savable" assert r.after_validation_performed, "after_validation callback should be called" r.content = "Messa content!" - assert r.valid?, "A reply with content should be saveable" + assert r.valid?, "A reply with content should be savable" assert r.after_validation_performed, "after_validation callback should be called" end @@ -213,7 +213,7 @@ class ValidationsTest < ActiveModel::TestCase assert_equal 'is too short (minimum is 2 characters)', t.errors[key][0] end - def test_validaton_with_if_and_on + def test_validation_with_if_and_on Topic.validates_presence_of :title, :if => Proc.new{|x| x.author_name = "bad"; true }, :on => :update t = Topic.new(:title => "") @@ -361,7 +361,7 @@ class ValidationsTest < ActiveModel::TestCase def test_dup_validity_is_independent Topic.validates_presence_of :title - topic = Topic.new("title" => "Litterature") + topic = Topic.new("title" => "Literature") topic.valid? duped = topic.dup |