aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-08-01 11:42:00 +0200
committerXavier Noria <fxn@hashref.com>2011-08-13 16:22:26 -0700
commitb6b6e81a5c29d4adb3007659ca30e02444ad0c9c (patch)
treee8e2a931f597a2ff64e910d5f924219a952fe0ac /activemodel/test/cases
parent30ef55de66decbbcf6475917c741c42fb738718b (diff)
downloadrails-b6b6e81a5c29d4adb3007659ca30e02444ad0c9c.tar.gz
rails-b6b6e81a5c29d4adb3007659ca30e02444ad0c9c.tar.bz2
rails-b6b6e81a5c29d4adb3007659ca30e02444ad0c9c.zip
Rename new method to_path to to_partial_path to avoid conflicts with File#to_path and similar.
Diffstat (limited to 'activemodel/test/cases')
-rw-r--r--activemodel/test/cases/conversion_test.rb6
-rw-r--r--activemodel/test/cases/naming_test.rb8
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