diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2012-03-28 18:25:06 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2012-03-28 18:25:06 +0200 |
commit | c82fd8fc2ac9f8273825fc272a0bf17e5c583d71 (patch) | |
tree | 75c530d044fb4e17b5c48ffc7d91a2d435a4e497 /activemodel | |
parent | 5a5ca14cb2f636b9edf03b56bd9aae4cef5c7200 (diff) | |
download | rails-c82fd8fc2ac9f8273825fc272a0bf17e5c583d71.tar.gz rails-c82fd8fc2ac9f8273825fc272a0bf17e5c583d71.tar.bz2 rails-c82fd8fc2ac9f8273825fc272a0bf17e5c583d71.zip |
Allow ActiveModel::Name to duck type
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/lib/active_model/lint.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activemodel/lib/active_model/lint.rb b/activemodel/lib/active_model/lint.rb index 210f9a9468..88b730626c 100644 --- a/activemodel/lib/active_model/lint.rb +++ b/activemodel/lib/active_model/lint.rb @@ -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 ActiveModel::Name, 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 |