diff options
Diffstat (limited to 'spec/ruby/core/io/eof_spec.rb')
| -rw-r--r-- | spec/ruby/core/io/eof_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/io/eof_spec.rb b/spec/ruby/core/io/eof_spec.rb index 315345d942..c8955abde0 100644 --- a/spec/ruby/core/io/eof_spec.rb +++ b/spec/ruby/core/io/eof_spec.rb @@ -18,7 +18,7 @@ describe "IO#eof?" do it "raises IOError on stream not opened for reading" do -> do File.open(@name, "w") { |f| f.eof? } - end.should raise_error(IOError) + end.should.raise(IOError) end end @@ -67,16 +67,16 @@ describe "IO#eof?" do end it "raises IOError on closed stream" do - -> { IOSpecs.closed_io.eof? }.should raise_error(IOError) + -> { IOSpecs.closed_io.eof? }.should.raise(IOError) end it "raises IOError on stream closed for reading by close_read" do @io.close_read - -> { @io.eof? }.should raise_error(IOError) + -> { @io.eof? }.should.raise(IOError) end it "returns true on one-byte stream after single-byte read" do - File.open(File.dirname(__FILE__) + '/fixtures/one_byte.txt') { |one_byte| + File.open(__dir__ + '/fixtures/one_byte.txt') { |one_byte| one_byte.read(1) one_byte.should.eof? } |
