Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/stringio/shared/sysread.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@

it "raises an EOFError when passed length > 0 and no data remains" do
@io.read.should == "example"
-> { @io.sysread(1) }.should raise_error(EOFError)
-> { @io.send(@method, 1) }.should raise_error(EOFError)
end
end
5 changes: 5 additions & 0 deletions library/stringio/sysread_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require_relative '../../spec_helper'
require "stringio"
require_relative 'shared/read'
require_relative 'shared/sysread'

describe "StringIO#sysread when passed length, buffer" do
it_behaves_like :stringio_read, :sysread
Expand Down Expand Up @@ -32,6 +33,10 @@
end
end

describe "StringIO#sysread when passed length" do
it_behaves_like :stringio_sysread_length, :sysread
end

describe "StringIO#sysread when passed [length]" do
before :each do
@io = StringIO.new("example")
Expand Down