content_truncate 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/content_truncate.rb +1 -0
- data/lib/content_truncate/version.rb +1 -1
- data/test/content_truncate_test.rb +4 -0
- metadata +2 -2
data/lib/content_truncate.rb
CHANGED
@@ -27,4 +27,8 @@ class ContentTruncateTest < Test::Unit::TestCase
|
|
27
27
|
def test_content_truncate_for_include_sep
|
28
28
|
assert_equal "Truncate a string down to \n x characters. <br/>", mock_string.content_truncate(48, "。", "<br/>")
|
29
29
|
end
|
30
|
+
|
31
|
+
def test_content_truncate_for_nil_match
|
32
|
+
assert_equal "测试中文无", "测试中文无符号".content_truncate(5, "。", "<br/>")
|
33
|
+
end
|
30
34
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: content_truncate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|