summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-03-09 13:10:32 +0000
committerSteve Kemp <steve@steve.org.uk>2015-03-09 13:10:32 +0000
commit1ce0906b3480702085d4596dbb4758c115ab298f (patch)
tree695cd365c2ff73904328a049f3b9cfcc5a0a1abd /t
parent891b720013f06f092f6be82adad95e5551c696b6 (diff)
Don't use parenthesis aroudn conditions in an if.
Diffstat (limited to 't')
-rwxr-xr-xt/test-custodian-alertfactory.rb4
-rwxr-xr-xt/test-custodian-parser.rb6
-rwxr-xr-xt/test-custodian-testfactory.rb4
-rwxr-xr-xt/test-custodian-util-bytemark.rb2
4 files changed, 8 insertions, 8 deletions
diff --git a/t/test-custodian-alertfactory.rb b/t/test-custodian-alertfactory.rb
index e12dbdd..42873ec 100755
--- a/t/test-custodian-alertfactory.rb
+++ b/t/test-custodian-alertfactory.rb
@@ -54,8 +54,8 @@ class TestAlertFactory < Test::Unit::TestCase
mauve = false
end
- methods.push( "redis" ) if ( redis )
- methods.push( "mauve" ) if ( mauve )
+ methods.push( "redis" ) if redis
+ methods.push( "mauve" ) if mauve
methods.each do |name|
diff --git a/t/test-custodian-parser.rb b/t/test-custodian-parser.rb
index 43a0754..bd5205b 100755
--- a/t/test-custodian-parser.rb
+++ b/t/test-custodian-parser.rb
@@ -305,7 +305,7 @@ EOF
assert( obj.size == 1 )
assert_equal( obj[0].to_s, str )
- if ( follow )
+ if follow
assert( obj[0].follow_redirects? )
else
assert( ! obj[0].follow_redirects? )
@@ -344,7 +344,7 @@ EOF
assert( obj.size == 1 )
assert_equal( obj[0].to_s, str )
- if ( cb )
+ if cb
assert( obj[0].cache_busting? )
else
assert( ! obj[0].cache_busting? )
@@ -390,7 +390,7 @@ EOF
assert( obj.size == 1 )
assert_equal( obj[0].to_s, str )
- if ( fail.nil? )
+ if fail.nil?
assert( obj[0].get_notification_text.nil? )
else
assert_equal( obj[0].get_notification_text, fail )
diff --git a/t/test-custodian-testfactory.rb b/t/test-custodian-testfactory.rb
index 6c71003..b067ab8 100755
--- a/t/test-custodian-testfactory.rb
+++ b/t/test-custodian-testfactory.rb
@@ -255,13 +255,13 @@ class TestTestFactory < Test::Unit::TestCase
# for each handler ..
registered[type].each do |name|
- if ( name.to_s =~ /protocoltest::(.*)Test$/i )
+ if name.to_s =~ /protocoltest::(.*)Test$/i
tst = $1.dup.downcase
#
# NOTE: Skip the DNS and LDAP tests - they are more complex.
#
- next if ( tst =~ /^(ldap|dns|dnsbl|sslcertificate)$/ )
+ next if tst =~ /^(ldap|dns|dnsbl|sslcertificate)$/
# normal
test_one = "http://foo.com/.com must run #{tst} on 1234"
diff --git a/t/test-custodian-util-bytemark.rb b/t/test-custodian-util-bytemark.rb
index 764babc..9296dcb 100755
--- a/t/test-custodian-util-bytemark.rb
+++ b/t/test-custodian-util-bytemark.rb
@@ -52,7 +52,7 @@ class TestBytemarkUtil < Test::Unit::TestCase
to_test.each do |name,inside|
- if ( inside )
+ if inside
assert( Custodian::Util::Bytemark.inside?( name ) == true )
else
assert( Custodian::Util::Bytemark.inside?( name ) == false )