summaryrefslogtreecommitdiffstats
path: root/test/lib/puppettest/support/helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/puppettest/support/helpers.rb')
-rw-r--r--test/lib/puppettest/support/helpers.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/lib/puppettest/support/helpers.rb b/test/lib/puppettest/support/helpers.rb
index 5b1872dfb..4a3a53095 100644
--- a/test/lib/puppettest/support/helpers.rb
+++ b/test/lib/puppettest/support/helpers.rb
@@ -5,17 +5,13 @@ module PuppetTest
# UID of nobody.
def nonrootuser
Etc.passwd { |user|
- if user.uid != Puppet::Util::SUIDManager.uid and user.uid > 0 and user.uid < 255
- return user
- end
+ return user if user.uid != Puppet::Util::SUIDManager.uid and user.uid > 0 and user.uid < 255
}
end
def nonrootgroup
Etc.group { |group|
- if group.gid != Puppet::Util::SUIDManager.gid and group.gid > 0 and group.gid < 255
- return group
- end
+ return group if group.gid != Puppet::Util::SUIDManager.gid and group.gid > 0 and group.gid < 255
}
end
end