Skip to content

Commit

Permalink
Guard these on Logger version rather than Ruby
Browse files Browse the repository at this point in the history
  • Loading branch information
headius authored and eregon committed Mar 28, 2022
1 parent 7d630b9 commit ada0e2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions library/logger/device/close_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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\./)
Expand Down
4 changes: 2 additions & 2 deletions library/logger/device/write_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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\./)
Expand Down

0 comments on commit ada0e2e

Please sign in to comment.