Sha256: 003359a004fbf9be14bd5e0f9dd7d0192e3ddd308ae1b8f547eb44a53ae5403b
Contents?: true
Size: 434 Bytes
Versions: 52
Compression:
Stored size: 434 Bytes
Contents
require File.expand_path('../../../spec_helper', __FILE__) require 'strscan' describe "StringScanner#check" do before :each do @s = StringScanner.new("This is a test") end it "returns the value that scan would return, without advancing the scan pointer" do @s.check(/This/).should == "This" @s.matched.should == "This" @s.pos.should == 0 @s.check(/is/).should == nil @s.matched.should == nil end end
Version data entries
52 entries across 52 versions & 2 rubygems