Sha256: 8f49653e4788b076c9c91fd5e3e13140b079bb8db515bbb69aadfaf53d0fb911
Contents?: true
Size: 572 Bytes
Versions: 55
Compression:
Stored size: 572 Bytes
Contents
describe :extract_range, :shared => true do it "returns an instance of String when passed a String subclass" do cls = Class.new(String) sub = cls.new("abc") s = StringScanner.new(sub) ch = s.send(@method) ch.should_not be_kind_of(cls) ch.should be_an_instance_of(String) end it "taints the returned String if the input was tainted" do str = 'abc' str.taint s = StringScanner.new(str) s.send(@method).tainted?.should be_true s.send(@method).tainted?.should be_true s.send(@method).tainted?.should be_true end end
Version data entries
55 entries across 55 versions & 3 rubygems