From ada0e2e98ee1c15131e838c1ac7d23d725d3cff3 Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Tue, 22 Mar 2022 07:45:43 -0500 Subject: [PATCH] Guard these on Logger version rather than Ruby --- library/logger/device/close_spec.rb | 4 ++-- library/logger/device/write_spec.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/library/logger/device/close_spec.rb b/library/logger/device/close_spec.rb index d7d107fcce..7c5e118d56 100644 --- a/library/logger/device/close_spec.rb +++ b/library/logger/device/close_spec.rb @@ -15,14 +15,14 @@ rm_r @file_path end - ruby_version_is ""..."2.7" do + version_is Logger::VERSION, ""..."1.4.0" do it "closes the LogDevice's stream" do @device.close -> { @device.write("Test") }.should complain(/\Alog writing failed\./) end end - ruby_version_is "2.7" do + version_is Logger::VERSION, "1.4.0" do it "closes the LogDevice's stream" do @device.close -> { @device.write("Test") }.should complain(/\Alog shifting failed\./) diff --git a/library/logger/device/write_spec.rb b/library/logger/device/write_spec.rb index 5506bb2c38..cd2d7e27a9 100644 --- a/library/logger/device/write_spec.rb +++ b/library/logger/device/write_spec.rb @@ -35,14 +35,14 @@ rm_r path end - ruby_version_is ""..."2.7" do + version_is Logger::VERSION, ""..."1.4.0" do it "fails if the device is already closed" do @device.close -> { @device.write "foo" }.should complain(/\Alog writing failed\./) end end - ruby_version_is "2.7" do + version_is Logger::VERSION, "1.4.0" do it "fails if the device is already closed" do @device.close -> { @device.write "foo" }.should complain(/\Alog shifting failed\./)