summaryrefslogtreecommitdiff
path: root/lib/custodian/testfactory.rb
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 /lib/custodian/testfactory.rb
parent891b720013f06f092f6be82adad95e5551c696b6 (diff)
Don't use parenthesis aroudn conditions in an if.
Diffstat (limited to 'lib/custodian/testfactory.rb')
-rw-r--r--lib/custodian/testfactory.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/custodian/testfactory.rb b/lib/custodian/testfactory.rb
index 03222a2..748e114 100644
--- a/lib/custodian/testfactory.rb
+++ b/lib/custodian/testfactory.rb
@@ -31,8 +31,8 @@ module Custodian
def self.create( line )
- raise ArgumentError, "The type of test to create cannot be nil" if ( line.nil? )
- raise ArgumentError, "The type of test to create must be a string" unless ( line.kind_of? String )
+ raise ArgumentError, "The type of test to create cannot be nil" if line.nil?
+ raise ArgumentError, "The type of test to create must be a string" unless line.kind_of? String
#
# The array we return.
@@ -43,12 +43,12 @@ module Custodian
#
# If this is an obvious protocol test.
#
- if ( line =~ /must\s+(not\s+)?run\s+(\S+)(\s+|\.|$)/ )
+ if line =~ /must\s+(not\s+)?run\s+(\S+)(\s+|\.|$)/
test_type = $2.dup
test_type.chomp!( "." )
- if ( @@subclasses[test_type].nil? )
+ if @@subclasses[test_type].nil?
raise ArgumentError, "There is no handler registered for the '#{test_type}' test-type"
end
@@ -66,7 +66,7 @@ module Custodian
#
# We do this only after we've instantiated the test.
#
- if ( line =~ /\s+otherwise\s+'([^']+)'/ )
+ if line =~ /\s+otherwise\s+'([^']+)'/
obj.set_notification_text( $1.dup )
end