diff options
Diffstat (limited to 'spec/ruby/core/argf/read_nonblock_spec.rb')
| -rw-r--r-- | spec/ruby/core/argf/read_nonblock_spec.rb | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/spec/ruby/core/argf/read_nonblock_spec.rb b/spec/ruby/core/argf/read_nonblock_spec.rb index 8176a206e5..5c6bd52d80 100644 --- a/spec/ruby/core/argf/read_nonblock_spec.rb +++ b/spec/ruby/core/argf/read_nonblock_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/read', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/read' platform_is_not :windows do describe 'ARGF.read_nonblock' do @@ -64,17 +64,15 @@ platform_is_not :windows do it 'raises IO::EAGAINWaitReadable when empty' do argf ['-'] do - lambda { + -> { @argf.read_nonblock(4) - }.should raise_error(IO::EAGAINWaitReadable) + }.should.raise(IO::EAGAINWaitReadable) end end - ruby_version_is "2.3" do - it 'returns :wait_readable when the :exception is set to false' do - argf ['-'] do - @argf.read_nonblock(4, nil, exception: false).should == :wait_readable - end + it 'returns :wait_readable when the :exception is set to false' do + argf ['-'] do + @argf.read_nonblock(4, nil, exception: false).should == :wait_readable end end end |
