Sha256: 003ebb8c865f3a06305ebec411c9cc4208fd47521f312af51975d4a3bb46d900
Contents?: true
Size: 444 Bytes
Versions: 11
Compression:
Stored size: 444 Bytes
Contents
require "spec_helper" 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