diff options
author | José Valim <jose.valim@gmail.com> | 2011-08-01 11:42:00 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-08-01 11:42:00 +0200 |
commit | dc8773b19f61af2ba818d66923fc65e17bad6c20 (patch) | |
tree | bfc4089cd48db0caeddd550dc56db49b799ee1e0 /activemodel/test | |
parent | d701b3fa470b53a56da131cf64b96e411178bc08 (diff) | |
download | rails-dc8773b19f61af2ba818d66923fc65e17bad6c20.tar.gz rails-dc8773b19f61af2ba818d66923fc65e17bad6c20.tar.bz2 rails-dc8773b19f61af2ba818d66923fc65e17bad6c20.zip |
Rename new method to_path to to_partial_path to avoid conflicts with File#to_path and similar.
Diffstat (limited to 'activemodel/test')
-rw-r--r-- | activemodel/test/cases/conversion_test.rb | 6 | ||||
-rw-r--r-- | activemodel/test/cases/naming_test.rb | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/activemodel/test/cases/conversion_test.rb b/activemodel/test/cases/conversion_test.rb index 2eccc4e56d..24552bcaf2 100644 --- a/activemodel/test/cases/conversion_test.rb +++ b/activemodel/test/cases/conversion_test.rb @@ -25,8 +25,8 @@ class ConversionTest < ActiveModel::TestCase end test "to_path default implementation returns a string giving a relative path" do - assert_equal "contacts/contact", Contact.new.to_path - assert_equal "helicopters/helicopter", Helicopter.new.to_path, - "ActiveModel::Conversion#to_path caching should be class-specific" + assert_equal "contacts/contact", Contact.new.to_partial_path + assert_equal "helicopters/helicopter", Helicopter.new.to_partial_path, + "ActiveModel::Conversion#to_partial_path caching should be class-specific" end end diff --git a/activemodel/test/cases/naming_test.rb b/activemodel/test/cases/naming_test.rb index bafe4f3c0c..1777ce2aae 100644 --- a/activemodel/test/cases/naming_test.rb +++ b/activemodel/test/cases/naming_test.rb @@ -26,7 +26,7 @@ class NamingTest < ActiveModel::TestCase end def test_partial_path - assert_deprecated(/#partial_path.*#to_path/) do + assert_deprecated(/#partial_path.*#to_partial_path/) do assert_equal 'post/track_backs/track_back', @model_name.partial_path end end @@ -58,7 +58,7 @@ class NamingWithNamespacedModelInIsolatedNamespaceTest < ActiveModel::TestCase end def test_partial_path - assert_deprecated(/#partial_path.*#to_path/) do + assert_deprecated(/#partial_path.*#to_partial_path/) do assert_equal 'blog/posts/post', @model_name.partial_path end end @@ -102,7 +102,7 @@ class NamingWithNamespacedModelInSharedNamespaceTest < ActiveModel::TestCase end def test_partial_path - assert_deprecated(/#partial_path.*#to_path/) do + assert_deprecated(/#partial_path.*#to_partial_path/) do assert_equal 'blog/posts/post', @model_name.partial_path end end @@ -142,7 +142,7 @@ class NamingWithSuppliedModelNameTest < ActiveModel::TestCase end def test_partial_path - assert_deprecated(/#partial_path.*#to_path/) do + assert_deprecated(/#partial_path.*#to_partial_path/) do assert_equal 'articles/article', @model_name.partial_path end end |