summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/lib/puppettest.rb6
-rwxr-xr-xtest/network/handler/ca.rb6
-rwxr-xr-xtest/ral/manager/attributes.rb6
-rwxr-xr-xtest/ral/providers/group.rb6
-rwxr-xr-xtest/ral/providers/user.rb6
-rwxr-xr-xtest/ral/type/cron.rb6
6 files changed, 6 insertions, 30 deletions
diff --git a/test/lib/puppettest.rb b/test/lib/puppettest.rb
index 38bb04298..e5a1dce80 100755
--- a/test/lib/puppettest.rb
+++ b/test/lib/puppettest.rb
@@ -241,11 +241,7 @@ module PuppetTest
end
def textmate?
- if ENV["TM_FILENAME"]
- return true
- else
- return false
- end
+ return !!ENV["TM_FILENAME"]
end
def tstdir
diff --git a/test/network/handler/ca.rb b/test/network/handler/ca.rb
index 4d1531228..6a4506a86 100755
--- a/test/network/handler/ca.rb
+++ b/test/network/handler/ca.rb
@@ -6,11 +6,7 @@ require 'puppettest'
require 'puppet/network/handler/ca'
require 'mocha'
-if ARGV.length > 0 and ARGV[0] == "short"
- $short = true
-else
- $short = false
-end
+$short = (ARGV.length > 0 and ARGV[0] == "short")
class TestCA < Test::Unit::TestCase
include PuppetTest::ServerTest
diff --git a/test/ral/manager/attributes.rb b/test/ral/manager/attributes.rb
index 7e9f34b52..95a077620 100755
--- a/test/ral/manager/attributes.rb
+++ b/test/ral/manager/attributes.rb
@@ -276,11 +276,7 @@ class TestTypeAttributes < Test::Unit::TestCase
$yep = :absent
type.provide(:only) do
def self.supports_parameter?(param)
- if param.name == :nope
- return false
- else
- return true
- end
+ return param.name != :nope
end
def yep
diff --git a/test/ral/providers/group.rb b/test/ral/providers/group.rb
index d6783bf7f..6a0d20268 100755
--- a/test/ral/providers/group.rb
+++ b/test/ral/providers/group.rb
@@ -49,11 +49,7 @@ class TestGroupProvider < Test::Unit::TestCase
def missing?(group)
output = %x{nidump -r /groups/#{group} / 2>/dev/null}.chomp
- if output == ""
- return true
- else
- return false
- end
+ return output == ""
assert_equal("", output, "Group #{group} is present:\n#{output}")
end
diff --git a/test/ral/providers/user.rb b/test/ral/providers/user.rb
index e4ec3c125..793b6493e 100755
--- a/test/ral/providers/user.rb
+++ b/test/ral/providers/user.rb
@@ -34,11 +34,7 @@ class TestUserProvider < Test::Unit::TestCase
def missing?(user)
output = %x{nidump -r /users/#{user} / 2>/dev/null}.chomp
- if output == ""
- return true
- else
- return false
- end
+ return output == ""
assert_equal("", output, "User #{user} is present:\n#{output}")
end
diff --git a/test/ral/type/cron.rb b/test/ral/type/cron.rb
index 6b561c392..37cba1b3c 100755
--- a/test/ral/type/cron.rb
+++ b/test/ral/type/cron.rb
@@ -40,11 +40,7 @@ class TestCron < Test::Unit::TestCase
tab = Puppet::Type.type(:cron).filetype.read(@me)
}
- if $CHILD_STATUS == 0
- @currenttab = tab
- else
- @currenttab = nil
- end
+ @currenttab = $CHILD_STATUS == 0 ? tab : nil
end
# Restore the cron tab to its original form.