From 26ec1be24a820327d00e22fb65764a3dc06977e2 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 6 Jun 2008 18:00:01 -0700 Subject: concat should ignore nil --- actionpack/test/template/text_helper_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb index 62cdca03d1..0f5c62acad 100644 --- a/actionpack/test/template/text_helper_test.rb +++ b/actionpack/test/template/text_helper_test.rb @@ -11,6 +11,14 @@ class TextHelperTest < ActionView::TestCase @_cycles = nil if (defined? @_cycles) end + def test_concat + @output_buffer = 'foo' + concat 'bar' + assert_equal 'foobar', @output_buffer + assert_nothing_raised { concat nil } + assert_equal 'foobar', @output_buffer + end + def test_simple_format assert_equal "

", simple_format(nil) -- cgit v1.2.3