diff options
author | Yuki Nishijima <mail@yukinishijima.net> | 2014-06-22 19:06:44 -0700 |
---|---|---|
committer | Yuki Nishijima <mail@yukinishijima.net> | 2014-06-22 19:14:25 -0700 |
commit | 10adc2ee90c34003edb5850b63c6cae321c09008 (patch) | |
tree | 97f8f3d5a8fafc2f13c3047cbd23ba62385d41cf /activemodel/test | |
parent | 04b6ae4d186195008b7801df19ebba295f042288 (diff) | |
download | rails-10adc2ee90c34003edb5850b63c6cae321c09008.tar.gz rails-10adc2ee90c34003edb5850b63c6cae321c09008.tar.bz2 rails-10adc2ee90c34003edb5850b63c6cae321c09008.zip |
Delegate #model_name method to self.class
Diffstat (limited to 'activemodel/test')
-rw-r--r-- | activemodel/test/cases/naming_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activemodel/test/cases/naming_test.rb b/activemodel/test/cases/naming_test.rb index aa683f4152..7b8287edbf 100644 --- a/activemodel/test/cases/naming_test.rb +++ b/activemodel/test/cases/naming_test.rb @@ -272,3 +272,9 @@ class NameWithAnonymousClassTest < ActiveModel::TestCase assert_equal "Anonymous", model_name end end + +class NamingMethodDelegationTest < ActiveModel::TestCase + def test_model_name + assert_equal Blog::Post.model_name, Blog::Post.new.model_name + end +end |