aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/capture_helper_test.rb
diff options
context:
space:
mode:
authorNikolay Shebanov <nikolay.shebanov@gmail.com>2013-02-22 02:22:27 +0400
committerNikolay Shebanov <nikolay.shebanov@gmail.com>2013-02-25 20:03:37 +0400
commit371a5f2d73f73243ec2440305fdfab64088f35a3 (patch)
treec3742e788758fe147180351eceb5aeafde94ba03 /actionpack/test/template/capture_helper_test.rb
parentb4051edf841c8a6780df9af7afa9892bfd811c79 (diff)
downloadrails-371a5f2d73f73243ec2440305fdfab64088f35a3.tar.gz
rails-371a5f2d73f73243ec2440305fdfab64088f35a3.tar.bz2
rails-371a5f2d73f73243ec2440305fdfab64088f35a3.zip
Fix #9360 regression in content_for
Diffstat (limited to 'actionpack/test/template/capture_helper_test.rb')
-rw-r--r--actionpack/test/template/capture_helper_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/template/capture_helper_test.rb b/actionpack/test/template/capture_helper_test.rb
index 234ac3252d..938f1c3e54 100644
--- a/actionpack/test/template/capture_helper_test.rb
+++ b/actionpack/test/template/capture_helper_test.rb
@@ -137,6 +137,10 @@ class CaptureHelperTest < ActionView::TestCase
assert_equal 'bar', content_for(:title)
end
+ def test_content_for_returns_nil_when_content_missing
+ assert_equal nil, content_for(:some_missing_key)
+ end
+
def test_content_for_question_mark
assert ! content_for?(:title)
content_for :title, 'title'