blob: 3a300afe5c10987f8e1c5b9f9249b48abd1cc417 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
require File.join(File.expand_path(File.dirname(__FILE__)), "test_helper")
module RenderPartial
class BasicController < ActionController::Base
self.view_paths = [ActionView::Template::FixturePath.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
|