aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/render_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-12-20 15:12:38 +0100
committerJosé Valim <jose.valim@gmail.com>2011-12-20 15:12:38 +0100
commit6c57177f2c7f4f934716d588545902d5fc00fa99 (patch)
treedd5fe4b2e1ab708fdc9aa4324ca382de87da9cf3 /actionpack/test/template/render_test.rb
parentcae1768c6a0e3d1cd4a2c2d836ef213438689db6 (diff)
downloadrails-6c57177f2c7f4f934716d588545902d5fc00fa99.tar.gz
rails-6c57177f2c7f4f934716d588545902d5fc00fa99.tar.bz2
rails-6c57177f2c7f4f934716d588545902d5fc00fa99.zip
Remove deprecation warnings from Action Pack.
Diffstat (limited to 'actionpack/test/template/render_test.rb')
-rw-r--r--actionpack/test/template/render_test.rb32
1 files changed, 1 insertions, 31 deletions
diff --git a/actionpack/test/template/render_test.rb b/actionpack/test/template/render_test.rb
index c29519276d..2ba86306f4 100644
--- a/actionpack/test/template/render_test.rb
+++ b/actionpack/test/template/render_test.rb
@@ -146,7 +146,7 @@ module RenderTestCases
@view.render(:partial => nil)
flunk "Render did not raise ArgumentError"
rescue ArgumentError => e
- assert_equal "'#{nil.inspect}' is not an ActiveModel-compatible object that returns a valid partial path.", e.message
+ assert_equal "'#{nil.inspect}' is not an ActiveModel-compatible object. It must implement :to_partial_path.", e.message
end
def test_render_partial_with_errors
@@ -243,36 +243,6 @@ module RenderTestCases
@controller_view.render(customers, :greeting => "Hello")
end
- class CustomerWithDeprecatedPartialPath
- attr_reader :name
-
- def self.model_name
- Struct.new(:partial_path).new("customers/customer")
- end
-
- def initialize(name)
- @name = name
- end
- end
-
- def test_render_partial_using_object_with_deprecated_partial_path
- assert_deprecated(/#model_name.*#partial_path.*#to_partial_path/) do
- assert_equal "Hello: nertzy",
- @controller_view.render(CustomerWithDeprecatedPartialPath.new("nertzy"), :greeting => "Hello")
- end
- end
-
- def test_render_partial_using_collection_with_deprecated_partial_path
- assert_deprecated(/#model_name.*#partial_path.*#to_partial_path/) do
- customers = [
- CustomerWithDeprecatedPartialPath.new("nertzy"),
- CustomerWithDeprecatedPartialPath.new("peeja")
- ]
- assert_equal "Hello: nertzyHello: peeja",
- @controller_view.render(customers, :greeting => "Hello")
- end
- end
-
# TODO: The reason for this test is unclear, improve documentation
def test_render_partial_and_fallback_to_layout
assert_equal "Before (Josh)\n\nAfter", @view.render(:partial => "test/layout_for_partial", :locals => { :name => "Josh" })