mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
fix some typos found in activemodel
This commit is contained in:
parent
c4a7c31581
commit
233737706c
3 changed files with 4 additions and 4 deletions
|
@ -107,7 +107,7 @@ class CallbacksTest < ActiveModel::TestCase
|
|||
test "after_create callbacks with both callbacks declared in one line" do
|
||||
assert_equal ["callback1", "callback2"], Violin1.new.create.history
|
||||
end
|
||||
test "after_create callbacks with both callbacks declared in differnt lines" do
|
||||
test "after_create callbacks with both callbacks declared in different lines" do
|
||||
assert_equal ["callback1", "callback2"], Violin2.new.create.history
|
||||
end
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ class ValidatesWithTest < ActiveModel::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
test "vaidation with class that adds errors" do
|
||||
test "validation with class that adds errors" do
|
||||
Topic.validates_with(ValidatorThatAddsErrors)
|
||||
topic = Topic.new
|
||||
assert topic.invalid?, "A class that adds errors causes the record to be invalid"
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue