diff options
author | José Valim <jose.valim@gmail.com> | 2011-11-10 02:53:43 -0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-11-10 02:53:43 -0800 |
commit | bdd76fb5e397768f9fca78ef6926afcf1ba71365 (patch) | |
tree | 470f15aefdfeb42c2dd274f577a522846c5eca57 /actionpack/test | |
parent | 909e5cc32d0bd47dad2f5c5404670a074a9dabbd (diff) | |
parent | b5c3987294d3860a78b1b04ee49b2b55f3cdc614 (diff) | |
download | rails-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.rb | 4 |
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&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 |