diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-22 12:09:32 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-22 12:09:32 -0200 |
commit | e36ecf4d776023c2eeeda9abae818ae04539efa0 (patch) | |
tree | aabe018bfddef6c0888dd4d6966657f80c5c0a69 /actionview/test | |
parent | 9d519eefbc59d7784d83a7497224d2903c7b76d3 (diff) | |
parent | 3011b64184747f4d26e5c5ca32170be370bc0a1c (diff) | |
download | rails-e36ecf4d776023c2eeeda9abae818ae04539efa0.tar.gz rails-e36ecf4d776023c2eeeda9abae818ae04539efa0.tar.bz2 rails-e36ecf4d776023c2eeeda9abae818ae04539efa0.zip |
Merge pull request #18546 from brainopia/action_view_render
A shortcut to setup controller environment
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/actionpack/controller/render_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionview/test/actionpack/controller/render_test.rb b/actionview/test/actionpack/controller/render_test.rb index 563caee8a2..94f519e330 100644 --- a/actionview/test/actionpack/controller/render_test.rb +++ b/actionview/test/actionpack/controller/render_test.rb @@ -453,6 +453,10 @@ class TestController < ApplicationController render :text => "foo" end + def render_with_assigns_option + render inline: '<%= @hello %>', assigns: { hello: "world" } + end + def yield_content_for render :action => "content_for", :layout => "yield" end @@ -1102,6 +1106,11 @@ class RenderTest < ActionController::TestCase assert_equal "world", assigns["hello"] end + def test_render_text_with_assigns_option + get :render_with_assigns_option + assert_equal 'world', response.body + end + # :ported: def test_template_with_locals get :render_with_explicit_template_with_locals |