ruby-changes:56554
From: Hiroshi <ko1@a...>
Date: Mon, 15 Jul 2019 15:07:50 +0900 (JST)
Subject: [ruby-changes:56554] Hiroshi SHIBATA: f73ea3342b (master): Fixed ruby/spec for Logger::LogDevice changes.
https://git.ruby-lang.org/ruby.git/commit/?id=f73ea3342b From f73ea3342b5abd3136a1fb27fc0fdbe4039bc3bf Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Mon, 15 Jul 2019 15:07:26 +0900 Subject: Fixed ruby/spec for Logger::LogDevice changes. diff --git a/spec/ruby/library/logger/device/close_spec.rb b/spec/ruby/library/logger/device/close_spec.rb index 3d7ab13..3fd9667 100644 --- a/spec/ruby/library/logger/device/close_spec.rb +++ b/spec/ruby/library/logger/device/close_spec.rb @@ -15,8 +15,17 @@ describe "Logger::LogDevice#close" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/logger/device/close_spec.rb#L15 rm_r @file_path end - it "closes the LogDevice's stream" do - @device.close - lambda { @device.write("Test") }.should complain(/\Alog writing failed\./) + ruby_version_is ""..."2.7" do + it "closes the LogDevice's stream" do + @device.close + lambda { @device.write("Test") }.should complain(/\Alog writing failed\./) + end + end + + ruby_version_is "2.7" do + it "closes the LogDevice's stream" do + @device.close + lambda { @device.write("Test") }.should complain(/\Alog shifting failed\./) + end end end diff --git a/spec/ruby/library/logger/device/write_spec.rb b/spec/ruby/library/logger/device/write_spec.rb index 6305a62..6f4e13c 100644 --- a/spec/ruby/library/logger/device/write_spec.rb +++ b/spec/ruby/library/logger/device/write_spec.rb @@ -35,8 +35,17 @@ describe "Logger::LogDevice#write" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/logger/device/write_spec.rb#L35 rm_r path end - it "fails if the device is already closed" do - @device.close - lambda { @device.write "foo" }.should complain(/\Alog writing failed\./) + ruby_version_is ""..."2.7" do + it "fails if the device is already closed" do + @device.close + lambda { @device.write "foo" }.should complain(/\Alog writing failed\./) + end + end + + ruby_version_is "2.7" do + it "fails if the device is already closed" do + @device.close + lambda { @device.write "foo" }.should complain(/\Alog shifting failed\./) + end end end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/