1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2020-06-27 15:51:37 +02:00
parent 64d8c0815e
commit b3fa158d1c
35 changed files with 652 additions and 56 deletions

View file

@ -66,6 +66,10 @@ describe "IO#ungetbyte" do
end
end
it "raises IOError on stream not opened for reading" do
-> { STDOUT.ungetbyte(42) }.should raise_error(IOError, "not opened for reading")
end
it "raises an IOError if the IO is closed" do
@io.close
-> { @io.ungetbyte(42) }.should raise_error(IOError)