Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spec/text_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
describe Text do
describe "truncating" do
it "can truncate itself to a given width" do
Text["this is long"].truncate_to_width(6).should == Text["this i"]
expect(Text["this is long"].truncate_to_width(6)).to eq(Text["this i"])
end

it "sometimes leaves empty strings behind when truncating" do
text = Text[:red, "one", :green, "two", :blue, "three"]
text.truncate_to_width(2).should == Text[:red, "on", :green, "", :blue, ""]
expect(text.truncate_to_width(2)).to eq(Text[:red, "on", :green, "", :blue, ""])
end
end
end