diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-09-21 03:40:25 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-09-21 03:40:25 +0000 |
commit | 415649760226a7987ba1f8d234c1785d0fa333b0 (patch) | |
tree | 52bb4ffe58b508cd6a9423ef611a1ccc67627bcf /actionpack/test | |
parent | 0d5a7d1d8c921c3f34f52d3e188de11cff0964e9 (diff) | |
download | rails-415649760226a7987ba1f8d234c1785d0fa333b0.tar.gz rails-415649760226a7987ba1f8d234c1785d0fa333b0.tar.bz2 rails-415649760226a7987ba1f8d234c1785d0fa333b0.zip |
Fixed CaptureHelper#content_for to work with the optional content parameter instead of just the block #9434 [sandofsky/wildchild]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7522 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/capture_test.rb | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/actionpack/test/controller/capture_test.rb b/actionpack/test/controller/capture_test.rb index 42ec2568da..7ec5f32a37 100644 --- a/actionpack/test/controller/capture_test.rb +++ b/actionpack/test/controller/capture_test.rb @@ -8,6 +8,14 @@ class CaptureController < ActionController::Base render :layout => "talk_from_action" end + def content_for_with_parameter + render :layout => "talk_from_action" + end + + def content_for_concatenated + render :layout => "talk_from_action" + end + def erb_content_for render :layout => "talk_from_action" end @@ -49,8 +57,18 @@ class CaptureTest < Test::Unit::TestCase assert_equal expected_content_for_output, @response.body end + def test_should_concatentate_content_for + get :content_for_concatenated + assert_equal expected_content_for_output, @response.body + end + def test_erb_content_for - get :content_for + get :erb_content_for + assert_equal expected_content_for_output, @response.body + end + + def test_should_set_content_for_with_parameter + get :content_for_with_parameter assert_equal expected_content_for_output, @response.body end |