From b305756d9f5e92d0e1cf41c1036139a510882f1f Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 18 Feb 2005 14:06:36 +0000 Subject: Added TextHelper#auto_link, TextHelper#auto_link_urls, and TextHelper#auto_link_email_addresses to turn those elements into ahrefs git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/template/text_helper_test.rb | 6 ++++++ 1 file changed, 6 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 347420a72b..086eb46d36 100644 --- a/actionpack/test/template/text_helper_test.rb +++ b/actionpack/test/template/text_helper_test.rb @@ -59,4 +59,10 @@ class TextHelperTest < Test::Unit::TestCase assert_equal("1 count", pluralize(1, "count")) assert_equal("2 counts", pluralize(2, "count")) end + + def test_auto_linking + assert_equal %(hello david@loudthinking.com), auto_link_email_addresses("hello david@loudthinking.com") + assert_equal %(Go to http://www.rubyonrails.com), auto_link_urls("Go to http://www.rubyonrails.com") + assert_equal %(Go to http://www.rubyonrails.com and say hello to david@loudthinking.com), auto_link("Go to http://www.rubyonrails.com and say hello to david@loudthinking.com") + end end \ No newline at end of file -- cgit v1.2.3