Skip to content

Commit

Permalink
Handle no supplementary groups in grpowned? specs
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Nov 18, 2016
1 parent 7022325 commit 20cfd07
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions spec/ruby/shared/file/grpowned.rb
Expand Up @@ -21,9 +21,14 @@
it 'takes non primary groups into account' do
group = (Process.groups - [Process.egid]).first

File.chown(nil, group, @file)
if group
File.chown(nil, group, @file)

@object.send(@method, @file).should == true
@object.send(@method, @file).should == true
else
# No supplementary groups
1.should == 1
end
end
end

Expand Down

0 comments on commit 20cfd07

Please sign in to comment.