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:
parent
5349aa23c8
commit
f73ea3342b
2 changed files with 24 additions and 6 deletions
|
@ -15,8 +15,17 @@ describe "Logger::LogDevice#close" do
|
||||||
rm_r @file_path
|
rm_r @file_path
|
||||||
end
|
end
|
||||||
|
|
||||||
it "closes the LogDevice's stream" do
|
ruby_version_is ""..."2.7" do
|
||||||
@device.close
|
it "closes the LogDevice's stream" do
|
||||||
lambda { @device.write("Test") }.should complain(/\Alog writing failed\./)
|
@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
|
||||||
end
|
end
|
||||||
|
|
|
@ -35,8 +35,17 @@ describe "Logger::LogDevice#write" do
|
||||||
rm_r path
|
rm_r path
|
||||||
end
|
end
|
||||||
|
|
||||||
it "fails if the device is already closed" do
|
ruby_version_is ""..."2.7" do
|
||||||
@device.close
|
it "fails if the device is already closed" do
|
||||||
lambda { @device.write "foo" }.should complain(/\Alog writing failed\./)
|
@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
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue