1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fixed ruby/spec for Logger::LogDevice changes.

This commit is contained in:
Hiroshi SHIBATA 2019-07-15 15:07:26 +09:00
parent 5349aa23c8
commit f73ea3342b
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2
2 changed files with 24 additions and 6 deletions

View file

@ -15,8 +15,17 @@ describe "Logger::LogDevice#close" do
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

View file

@ -35,8 +35,17 @@ describe "Logger::LogDevice#write" do
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