Sha256: c0a62ef9633e7d1d1dc36666266394a327c90277442a9c71934c6bee993a2c05
Contents?: true
Size: 844 Bytes
Versions: 3
Compression:
Stored size: 844 Bytes
Contents
# encoding: utf-8 require 'test/helper' class Nanoc3::Helpers::TextTest < MiniTest::Unit::TestCase include Nanoc3::TestHelpers include Nanoc3::Helpers::Text def test_excerpt_length assert_equal('...', excerptize('Foo bar baz quux meow woof', :length => 3)) assert_equal('Foo ...', excerptize('Foo bar baz quux meow woof', :length => 7)) assert_equal('Foo bar baz quux meow woof', excerptize('Foo bar baz quux meow woof', :length => 26)) assert_equal('Foo bar baz quux meow woof', excerptize('Foo bar baz quux meow woof', :length => 8623785)) end def test_excerpt_omission assert_equal('Foo [continued]', excerptize('Foo bar baz quux meow woof', :length => 15, :omission => '[continued]')) end def test_strip_html # TODO implement end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
nanoc3-3.1.9 | test/helpers/test_text.rb |
nanoc3-3.1.8 | test/helpers/test_text.rb |
nanoc3-3.2.0a4 | test/helpers/test_text.rb |