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

Removed obsolete names

This commit is contained in:
Nobuyoshi Nakada 2020-04-03 01:16:16 +09:00
parent 061eba0229
commit 242e58db2f
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60
3 changed files with 2 additions and 9 deletions

View file

@ -46,13 +46,6 @@ platform_is_not :windows do
gr.name.should == @name gr.name.should == @name
end end
it "returns the Group for a given gid if it exists" do
grp = Etc.getgrgid(@gid)
grp.should be_kind_of(Struct::Group)
grp.gid.should == @gid
grp.name.should == @name
end
it "raises if the group does not exist" do it "raises if the group does not exist" do
-> { Etc.getgrgid(9876)}.should raise_error(ArgumentError) -> { Etc.getgrgid(9876)}.should raise_error(ArgumentError)
end end

View file

@ -1,7 +1,7 @@
require_relative '../../spec_helper' require_relative '../../spec_helper'
require 'etc' require 'etc'
describe "Struct::Group" do describe "Etc::Group" do
platform_is_not :windows do platform_is_not :windows do
grpname = IO.popen(%w'id -gn', err: IO::NULL, &:read) grpname = IO.popen(%w'id -gn', err: IO::NULL, &:read)
next unless $?.success? next unless $?.success?

View file

@ -1,7 +1,7 @@
require_relative '../../spec_helper' require_relative '../../spec_helper'
require 'etc' require 'etc'
describe "Struct::Passwd" do describe "Etc::Passwd" do
platform_is_not :windows do platform_is_not :windows do
before :all do before :all do
@pw = Etc.getpwuid(`id -u`.strip.to_i) @pw = Etc.getpwuid(`id -u`.strip.to_i)