aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/module/model_naming_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-06-08 17:58:14 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-06-08 19:37:50 -0700
commit99cf77be270e71408a14f0c00472517adb5981b2 (patch)
tree9a99a178948a19eaba9a85b444d36a3f5724711a /activesupport/test/core_ext/module/model_naming_test.rb
parentd9f16fafecad13cfe4ca1d4ff825de768b39b9ee (diff)
downloadrails-99cf77be270e71408a14f0c00472517adb5981b2.tar.gz
rails-99cf77be270e71408a14f0c00472517adb5981b2.tar.bz2
rails-99cf77be270e71408a14f0c00472517adb5981b2.zip
Add #element and #collection to ModelName
Diffstat (limited to 'activesupport/test/core_ext/module/model_naming_test.rb')
-rw-r--r--activesupport/test/core_ext/module/model_naming_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/module/model_naming_test.rb b/activesupport/test/core_ext/module/model_naming_test.rb
index da3b6c4932..37119f378a 100644
--- a/activesupport/test/core_ext/module/model_naming_test.rb
+++ b/activesupport/test/core_ext/module/model_naming_test.rb
@@ -14,6 +14,14 @@ class ModelNamingTest < Test::Unit::TestCase
assert_equal 'post_track_backs', @model_name.plural
end
+ def test_element
+ assert_equal 'track_back', @model_name.element
+ end
+
+ def test_collection
+ assert_equal 'post/track_backs', @model_name.collection
+ end
+
def test_partial_path
assert_equal 'post/track_backs/track_back', @model_name.partial_path
end