diff --git a/spec/text_spec.rb b/spec/text_spec.rb index a3a3048598..7e34b495f3 100644 --- a/spec/text_spec.rb +++ b/spec/text_spec.rb @@ -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