Sha256: 61624a5b03679f3a79173f1a6856fe21eb3ea85d5e1f38f37d27ee2acfbe8684
Contents?: true
Size: 511 Bytes
Versions: 14
Compression:
Stored size: 511 Bytes
Contents
require File.expand_path(File.join(File.dirname(__FILE__), "../..", "example_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
14 entries across 14 versions & 5 rubygems