From 99cf77be270e71408a14f0c00472517adb5981b2 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 8 Jun 2009 17:58:14 -0700 Subject: Add #element and #collection to ModelName --- activesupport/test/core_ext/module/model_naming_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'activesupport/test/core_ext/module') 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 -- cgit v1.2.3