From 018b79dd36d054d87fdc408d38dc9ac7f1b1500d Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sat, 3 Oct 2009 21:05:51 -0500 Subject: File extra test folders into controller, dispatch, or template --- .../controller/new_base/render_partial_test.rb | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 actionpack/test/controller/new_base/render_partial_test.rb (limited to 'actionpack/test/controller/new_base/render_partial_test.rb') diff --git a/actionpack/test/controller/new_base/render_partial_test.rb b/actionpack/test/controller/new_base/render_partial_test.rb new file mode 100644 index 0000000000..7c2c20e1c7 --- /dev/null +++ b/actionpack/test/controller/new_base/render_partial_test.rb @@ -0,0 +1,27 @@ +require 'abstract_unit' + +module RenderPartial + + class BasicController < ActionController::Base + + self.view_paths = [ActionView::FixtureResolver.new( + "render_partial/basic/_basic.html.erb" => "OMG!", + "render_partial/basic/basic.html.erb" => "<%= @test_unchanged = 'goodbye' %><%= render :partial => 'basic' %><%= @test_unchanged %>" + )] + + def changing + @test_unchanged = 'hello' + render :action => "basic" + end + end + + class TestPartial < SimpleRouteCase + testing BasicController + + test "rendering a partial in ActionView doesn't pull the ivars again from the controller" do + get :changing + assert_response("goodbyeOMG!goodbye") + end + end + +end -- cgit v1.2.3 From 61411f2aeb29edba2d8cd2008020044799ea3d61 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sat, 3 Oct 2009 23:18:32 -0500 Subject: Redraw default routes on all internal integration tests. We don't need SimpleRouteCase anymore --- actionpack/test/controller/new_base/render_partial_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/test/controller/new_base/render_partial_test.rb') diff --git a/actionpack/test/controller/new_base/render_partial_test.rb b/actionpack/test/controller/new_base/render_partial_test.rb index 7c2c20e1c7..8fddcbcd57 100644 --- a/actionpack/test/controller/new_base/render_partial_test.rb +++ b/actionpack/test/controller/new_base/render_partial_test.rb @@ -15,7 +15,7 @@ module RenderPartial end end - class TestPartial < SimpleRouteCase + class TestPartial < Rack::TestCase testing BasicController test "rendering a partial in ActionView doesn't pull the ivars again from the controller" do -- cgit v1.2.3