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

Removed meaningless system dependent tests

As [Bug #16662] lchmod available in linux since glibc 2.31.9000, a
system call may exist or not exist depending on the version.  It
is not a spec nor responsibility of Ruby.
This commit is contained in:
Nobuyoshi Nakada 2020-10-02 08:43:33 +09:00
parent c827cacde1
commit c881678cd7
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -29,22 +29,4 @@ describe "File.lchmod" do
File.stat(@lname).should.writable?
end
end
platform_is :openbsd, :aix do
it "returns false from #respond_to?" do
File.respond_to?(:lchmod).should be_false
end
it "raises a NotImplementedError when called" do
-> { File.lchmod 0, "foo" }.should raise_error(NotImplementedError)
end
end
platform_is :linux do
it "raises a NotImplementedError or Errno::ENOTSUP when called" do
-> { File.lchmod 0, "foo" }.should raise_error(Exception) { |e|
[NotImplementedError, Errno::ENOTSUP].should include(e.class)
}
end
end
end