Sha256: c43ad47c010bea23d6dd5a5822eacd5629b0bf04befa19ea555e3817318f7785
Contents?: true
Size: 545 Bytes
Versions: 83
Compression:
Stored size: 545 Bytes
Contents
describe :string_to_s, :shared => true do it "returns self when self.class == String" do a = "a string" a.should equal(a.send(@method)) end it "returns a new instance of String when called on a subclass" do a = StringSpecs::MyString.new("a string") s = a.send(@method) s.should == "a string" s.class.should == String end it "taints the result when self is tainted" do "x".taint.send(@method).tainted?.should == true StringSpecs::MyString.new("x").taint.send(@method).tainted?.should == true end end
Version data entries
83 entries across 83 versions & 1 rubygems