Sha256: 35c93ec47c0cbb8ddd6b91470e395949a78df4b46899ce5f6789012ea3c99e27
Contents?: true
Size: 490 Bytes
Versions: 11
Compression:
Stored size: 490 Bytes
Contents
require File.join(File.dirname(__FILE__), "../..", "test_helper.rb") describe "Relevance::CoreExtensions::Object#ellipsize" do it "converts nil to empty string" do nil.ellipsize.should == "" end it "doesn't touch short strings" do "hello".ellipsize.should == "hello" end it "calls inspect on non-strings" do [1,2,3].ellipsize.should == "[1, 2, 3]" end it "shortens long strings and adds ..." do "long-string".ellipsize(5).should == "long-..." end end
Version data entries
11 entries across 11 versions & 2 rubygems