diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-07-21 10:37:09 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-07-21 11:29:58 +0200 |
commit | 6807b080996ee4bd6b80abb4f5e9964632c421c8 (patch) | |
tree | 9ab10340178251987b5379b74948ba1ac6389a1b /actionpack/test | |
parent | fa8b290496789eb037d4fad89acea1cb0a534f35 (diff) | |
download | rails-6807b080996ee4bd6b80abb4f5e9964632c421c8.tar.gz rails-6807b080996ee4bd6b80abb4f5e9964632c421c8.tar.bz2 rails-6807b080996ee4bd6b80abb4f5e9964632c421c8.zip |
Moved a few methods from RecordIdentifier to ActiveModel::Naming
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/record_identifier_test.rb | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/actionpack/test/controller/record_identifier_test.rb b/actionpack/test/controller/record_identifier_test.rb index 6a84475758..835a0e970b 100644 --- a/actionpack/test/controller/record_identifier_test.rb +++ b/actionpack/test/controller/record_identifier_test.rb @@ -26,20 +26,6 @@ class Sheep end end -class Comment::Nested < Comment; end - -class Test::Unit::TestCase - protected - def comments_url - 'http://www.example.com/comments' - end - - def comment_url(comment) - "http://www.example.com/comments/#{comment.id}" - end -end - - class RecordIdentifierTest < Test::Unit::TestCase include ActionController::RecordIdentifier @@ -76,30 +62,4 @@ class RecordIdentifierTest < Test::Unit::TestCase def test_dom_class_with_prefix assert_equal "custom_prefix_#{@singular}", dom_class(@record, :custom_prefix) end - - def test_singular_class_name - assert_equal @singular, singular_class_name(@record) - end - - def test_singular_class_name_for_class - assert_equal @singular, singular_class_name(@klass) - end - - def test_plural_class_name - assert_equal @plural, plural_class_name(@record) - end - - def test_plural_class_name_for_class - assert_equal @plural, plural_class_name(@klass) - end - - def test_uncountable - assert_equal true, uncountable?(@uncountable) - assert_equal false, uncountable?(@klass) - end - - private - def method_missing(method, *args) - RecordIdentifier.send(method, *args) - end end |