Updated RubySpec source to d6754b35 except language/def_spec.rb.
[rbx.git] / spec / frozen / 1.8 / library / stringscanner / peek_spec.rb
blobc124936ef69d1a78f0eeb80ae55d660f381248dd
1 require File.dirname(__FILE__) + '/../../spec_helper'
2 require 'strscan'
4 describe "StringScanner#peek" do
5   it "returns at most the specified number of characters from the current position" do
6     s = StringScanner.new "peek spec"
7     s.pos = 5
8     s.peek(2).should == "sp"
9     s.peek(1000).should == "spec"
10   end
11 end