summaryrefslogtreecommitdiff
path: root/spec/ruby/core/io/shared/tty.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/io/shared/tty.rb')
-rw-r--r--spec/ruby/core/io/shared/tty.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/ruby/core/io/shared/tty.rb b/spec/ruby/core/io/shared/tty.rb
index eddc5d15af..1dc0e95739 100644
--- a/spec/ruby/core/io/shared/tty.rb
+++ b/spec/ruby/core/io/shared/tty.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../fixtures/classes', __FILE__)
+require_relative '../fixtures/classes'
describe :io_tty, shared: true do
platform_is_not :windows do
@@ -7,8 +7,7 @@ describe :io_tty, shared: true do
# check to enabled tty
File.open('/dev/tty') {}
rescue Errno::ENXIO
- # workaround for not configured environment like OS X
- 1.should == 1
+ skip "workaround for not configured environment like OS X"
else
File.open('/dev/tty') { |f| f.send(@method) }.should == true
end
@@ -20,6 +19,6 @@ describe :io_tty, shared: true do
end
it "raises IOError on closed stream" do
- lambda { IOSpecs.closed_io.send @method }.should raise_error(IOError)
+ -> { IOSpecs.closed_io.send @method }.should.raise(IOError)
end
end