Sha256: 29a702d701263c81c6be54a5b8e82e23044516bd965e71924fcbbf2aef812469

Contents?: true

Size: 406 Bytes

Versions: 7

Compression:

Stored size: 406 Bytes

Contents

require File.expand_path('../fixtures/classes', __FILE__)

describe "StringIO#rewind" do
  before(:each) do
    @io = StringIO.new("hello\nworld")
    @io.pos = 3
    @io.lineno = 1
  end

  it "returns 0" do
    @io.rewind.should eql(0)
  end

  it "resets the position" do
    @io.rewind
    @io.pos.should == 0
  end

  it "resets the line number" do
    @io.rewind
    @io.lineno.should == 0
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rubysl-stringio-2.3 spec/rewind_spec.rb
rubysl-stringio-2.2 spec/rewind_spec.rb
rubysl-stringio-2.1 spec/rewind_spec.rb
rubysl-stringio-2.1.0 spec/rewind_spec.rb
rubysl-stringio-1.0.1 spec/rewind_spec.rb
rubysl-stringio-1.0.0 spec/rewind_spec.rb
rubysl-stringio-2.0.0 spec/rewind_spec.rb