Sha256: 533f56922cfd0cb49ce48fbc25fe5679e810dcd7857d05368e99bfbb00d105f5
Contents?: true
Size: 429 Bytes
Versions: 55
Compression:
Stored size: 429 Bytes
Contents
describe :strscan_rest_size, :shared => true do before :each do @s = StringScanner.new('This is a test') end it "Returns the length of the rest of the string" do @s.send(@method).should == 14 @s.scan(/This/) @s.send(@method).should == 10 @s.terminate @s.send(@method).should == 0 end it "is equivalent to rest.size" do @s.scan(/This/) @s.send(@method).should == @s.rest.size end end
Version data entries
55 entries across 55 versions & 3 rubygems