From 63c822afb22ea17cffd55a3d1c3472405e977be5 Mon Sep 17 00:00:00 2001 From: Scott Barron Date: Fri, 30 Dec 2005 18:45:04 +0000 Subject: Make auto_link handle nil by returning quickly if blank? git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3359 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/template/text_helper_test.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb index 37c81e12a6..b323568068 100644 --- a/actionpack/test/template/text_helper_test.rb +++ b/actionpack/test/template/text_helper_test.rb @@ -155,6 +155,8 @@ class TextHelperTest < Test::Unit::TestCase assert_equal %(

Link #{link4_result}

), auto_link("

Link #{link4_raw}

") assert_equal %(

#{link4_result} Link

), auto_link("

#{link4_raw} Link

") assert_equal %(

#{link5_result} Link

), auto_link("

#{link5_raw} Link

") + assert_equal '', auto_link(nil) + assert_equal '', auto_link('') end def test_auto_link_at_eol -- cgit v1.2.3