-
Notifications
You must be signed in to change notification settings - Fork 21.6k
Commit
…on_over_inheritance ActiveModel::Name does not inherit from string
- Loading branch information
There are no files selected for viewing
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
|
@@ -78,7 +78,7 @@ def test_persisted? | ||
def test_model_naming | def test_model_naming | ||
assert model.class.respond_to?(:model_name), "The model should respond to model_name" | assert model.class.respond_to?(:model_name), "The model should respond to model_name" | ||
model_name = model.class.model_name | model_name = model.class.model_name | ||
assert_kind_of String, model_name | assert_kind_of ActiveModel::Name, model_name | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jeremy
Member
|
|||
assert_kind_of String, model_name.human | assert_kind_of String, model_name.human | ||
assert_kind_of String, model_name.singular | assert_kind_of String, model_name.singular | ||
assert_kind_of String, model_name.plural | assert_kind_of String, model_name.plural | ||
|
1 comment
on commit e8b5c8e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huzzah! Another win for OOP!
Is this necessary? Seems like we could just let the model_name be duck-typed. We're already asserting that
human
,singular
, etc. areString
s.