diff options
author | Benoit Daloze <eregontp@gmail.com> | 2019-09-29 19:13:37 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2019-09-29 19:13:37 +0200 |
commit | 070cbe22b70ec2bec36c7cfc84b726510afa306f (patch) | |
tree | 56cee87834c85bd9f358ebee51bab4893fb9952f /spec/ruby/core/io | |
parent | d51b4e34fbdbe1a845aa2251b1fa3304de809b32 (diff) |
Update to ruby/spec@34e6246
Diffstat (limited to 'spec/ruby/core/io')
-rw-r--r-- | spec/ruby/core/io/advise_spec.rb | 3 | ||||
-rw-r--r-- | spec/ruby/core/io/reopen_spec.rb | 4 | ||||
-rw-r--r-- | spec/ruby/core/io/shared/binwrite.rb | 8 | ||||
-rw-r--r-- | spec/ruby/core/io/shared/tty.rb | 3 | ||||
-rw-r--r-- | spec/ruby/core/io/write_nonblock_spec.rb | 6 |
5 files changed, 12 insertions, 12 deletions
diff --git a/spec/ruby/core/io/advise_spec.rb b/spec/ruby/core/io/advise_spec.rb index 59469fa164..0a845487e2 100644 --- a/spec/ruby/core/io/advise_spec.rb +++ b/spec/ruby/core/io/advise_spec.rb @@ -82,8 +82,7 @@ describe "IO#advise" do `uname -r`.chomp end if (uname.split('.').map(&:to_i) <=> [3,6]) < 0 - # [ruby-core:65355] tmpfs is not supported - 1.should == 1 + skip "[ruby-core:65355] tmpfs is not supported" else @io.advise(:willneed).should be_nil end diff --git a/spec/ruby/core/io/reopen_spec.rb b/spec/ruby/core/io/reopen_spec.rb index 975f654b66..faef80f513 100644 --- a/spec/ruby/core/io/reopen_spec.rb +++ b/spec/ruby/core/io/reopen_spec.rb @@ -161,14 +161,14 @@ describe "IO#reopen with a String" do @io = new_io @name, "w" @io.reopen(@other_name) - File.exist?(@other_name).should be_true + File.should.exist?(@other_name) end it "creates the file if it doesn't exist if the IO is opened in write mode" do @io = new_io @name, "a" @io.reopen(@other_name) - File.exist?(@other_name).should be_true + File.should.exist?(@other_name) end end diff --git a/spec/ruby/core/io/shared/binwrite.rb b/spec/ruby/core/io/shared/binwrite.rb index 29310e1eaf..3649bb47ff 100644 --- a/spec/ruby/core/io/shared/binwrite.rb +++ b/spec/ruby/core/io/shared/binwrite.rb @@ -24,9 +24,9 @@ describe :io_binwrite, shared: true do it "creates a file if missing" do fn = @filename + "xxx" begin - File.exist?(fn).should be_false + File.should_not.exist?(fn) IO.send(@method, fn, "test") - File.exist?(fn).should be_true + File.should.exist?(fn) ensure rm_r fn end @@ -35,9 +35,9 @@ describe :io_binwrite, shared: true do it "creates file if missing even if offset given" do fn = @filename + "xxx" begin - File.exist?(fn).should be_false + File.should_not.exist?(fn) IO.send(@method, fn, "test", 0) - File.exist?(fn).should be_true + File.should.exist?(fn) ensure rm_r fn end diff --git a/spec/ruby/core/io/shared/tty.rb b/spec/ruby/core/io/shared/tty.rb index 82a780a9f3..89ac08ec86 100644 --- a/spec/ruby/core/io/shared/tty.rb +++ b/spec/ruby/core/io/shared/tty.rb @@ -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 diff --git a/spec/ruby/core/io/write_nonblock_spec.rb b/spec/ruby/core/io/write_nonblock_spec.rb index 18adfcfc4a..5474e5c6ce 100644 --- a/spec/ruby/core/io/write_nonblock_spec.rb +++ b/spec/ruby/core/io/write_nonblock_spec.rb @@ -68,8 +68,10 @@ describe 'IO#write_nonblock' do context "when exception option is set to false" do it "returns :wait_writable when the operation would block" do - loop { break if @write.write_nonblock("a" * 10_000, exception: false) == :wait_writable } - 1.should == 1 + loop { + break if @write.write_nonblock("a" * 10_000, exception: false) == :wait_writable + } + @write.write_nonblock("a" * 10_000, exception: false).should == :wait_writable end end |