aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/text_helper_test.rb
diff options
context:
space:
mode:
authorPaul Nikitochkin <paul.nikitochkin@gmail.com>2013-07-25 23:56:26 +0300
committerPaul Nikitochkin <paul.nikitochkin@gmail.com>2013-09-06 18:00:55 +0300
commit061e48df26557bb0a667794df9772880846058cb (patch)
tree328b5eec47d1c86ec7999ea85a7bc75ce20cfbbe /actionview/test/template/text_helper_test.rb
parentb77781c012ebb60bfeee114aef6597ab8d3d3016 (diff)
downloadrails-061e48df26557bb0a667794df9772880846058cb.tar.gz
rails-061e48df26557bb0a667794df9772880846058cb.tar.bz2
rails-061e48df26557bb0a667794df9772880846058cb.zip
Cleanup of excerpt helper
* replaced String concatenation by joining * separator has default value to '', even it is nil
Diffstat (limited to 'actionview/test/template/text_helper_test.rb')
-rw-r--r--actionview/test/template/text_helper_test.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/actionview/test/template/text_helper_test.rb b/actionview/test/template/text_helper_test.rb
index 1b2234f4e2..c2999fcb85 100644
--- a/actionview/test/template/text_helper_test.rb
+++ b/actionview/test/template/text_helper_test.rb
@@ -314,6 +314,9 @@ class TextHelperTest < ActionView::TestCase
options = { :separator => "\n", :radius => 1 }
assert_equal("...very\nvery long\nstring", excerpt("my very\nvery\nvery long\nstring", 'long', options))
+
+ assert_equal excerpt('This is a beautiful morning', 'a'),
+ excerpt('This is a beautiful morning', 'a', separator: nil)
end
def test_word_wrap