diff options
Diffstat (limited to 'activemodel/lib/active_model/lint.rb')
-rw-r--r-- | activemodel/lib/active_model/lint.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/activemodel/lib/active_model/lint.rb b/activemodel/lib/active_model/lint.rb index 49ea894150..88b730626c 100644 --- a/activemodel/lib/active_model/lint.rb +++ b/activemodel/lib/active_model/lint.rb @@ -62,9 +62,9 @@ module ActiveModel # # Returns a boolean that specifies whether the object has been persisted yet. # This is used when calculating the URL for an object. If the object is - # not persisted, a form for that object, for instance, will be POSTed to the - # collection. If it is persisted, a form for the object will be PUT to the - # URL for the object. + # not persisted, a form for that object, for instance, will route to the + # create action. If it is persisted, a form for the object will routes to + # the update action. def test_persisted? assert model.respond_to?(:persisted?), "The model should respond to persisted?" assert_boolean model.persisted?, "persisted?" @@ -78,10 +78,10 @@ module ActiveModel def test_model_naming assert model.class.respond_to?(:model_name), "The model should respond to model_name" model_name = model.class.model_name - assert_kind_of String, model_name - assert_kind_of String, model_name.human - assert_kind_of String, model_name.singular - assert_kind_of String, model_name.plural + assert model_name.respond_to?(:to_str) + assert model_name.human.respond_to?(:to_str) + assert model_name.singular.respond_to?(:to_str) + assert model_name.plural.respond_to?(:to_str) end # == Errors Testing |