From 371a5f2d73f73243ec2440305fdfab64088f35a3 Mon Sep 17 00:00:00 2001 From: Nikolay Shebanov Date: Fri, 22 Feb 2013 02:22:27 +0400 Subject: Fix #9360 regression in content_for --- actionpack/test/template/capture_helper_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'actionpack/test/template/capture_helper_test.rb') 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' -- cgit v1.2.3