aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/actionpack
diff options
context:
space:
mode:
authorbrainopia <brainopia@evilmartians.com>2015-01-15 16:52:46 +0300
committerbrainopia <brainopia@evilmartians.com>2015-01-22 00:25:50 +0300
commit685142e4f46292190cedb1d9c69953a948ea92fc (patch)
tree0fea5dffae9342136940c3da1af1a453950a6563 /actionview/test/actionpack
parentee6e13f3da11b21f3966e009b681d05c65f79c9e (diff)
downloadrails-685142e4f46292190cedb1d9c69953a948ea92fc.tar.gz
rails-685142e4f46292190cedb1d9c69953a948ea92fc.tar.bz2
rails-685142e4f46292190cedb1d9c69953a948ea92fc.zip
Support `:assigns` option when rendering with controllers/mailers.
Diffstat (limited to 'actionview/test/actionpack')
-rw-r--r--actionview/test/actionpack/controller/render_test.rb9
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