aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-11-10 02:53:43 -0800
committerJosé Valim <jose.valim@gmail.com>2011-11-10 02:53:43 -0800
commitbdd76fb5e397768f9fca78ef6926afcf1ba71365 (patch)
tree470f15aefdfeb42c2dd274f577a522846c5eca57 /actionpack/test
parent909e5cc32d0bd47dad2f5c5404670a074a9dabbd (diff)
parentb5c3987294d3860a78b1b04ee49b2b55f3cdc614 (diff)
downloadrails-bdd76fb5e397768f9fca78ef6926afcf1ba71365.tar.gz
rails-bdd76fb5e397768f9fca78ef6926afcf1ba71365.tar.bz2
rails-bdd76fb5e397768f9fca78ef6926afcf1ba71365.zip
Merge pull request #3592 from avakhov/av-highlight-regexp
Fix and simplify highlight regexp
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/text_helper_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb
index 02f9609483..a0afb77f05 100644
--- a/actionpack/test/template/text_helper_test.rb
+++ b/actionpack/test/template/text_helper_test.rb
@@ -194,6 +194,10 @@ class TextHelperTest < ActionView::TestCase
"<p>This is a <strong class=\"highlight\">beautiful</strong> <a href=\"http://example.com/beautiful#top?what=beautiful%20morning&amp;when=now+then\">morning</a>, but also a <strong class=\"highlight\">beautiful</strong> day</p>",
highlight("<p>This is a beautiful <a href=\"http://example.com/beautiful\#top?what=beautiful%20morning&when=now+then\">morning</a>, but also a beautiful day</p>", "beautiful")
)
+ assert_equal(
+ "<div>abc <b>div</b></div>",
+ highlight("<div>abc div</div>", "div", :highlighter => '<b>\1</b>')
+ )
end
def test_excerpt