diff options
Diffstat (limited to 't/test-custodian-alertfactory.rb')
-rwxr-xr-x | t/test-custodian-alertfactory.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/t/test-custodian-alertfactory.rb b/t/test-custodian-alertfactory.rb index eea35ac..c18e719 100755 --- a/t/test-custodian-alertfactory.rb +++ b/t/test-custodian-alertfactory.rb @@ -31,8 +31,8 @@ class TestAlertFactory < Test::Unit::TestCase # Ensure we can create each of the two alert types we care about # methods = [] - methods.push( 'file' ) - methods.push( 'smtp' ) + methods.push('file') + methods.push('smtp') # # Mauve + Redis are optional @@ -54,29 +54,29 @@ 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| # # Use the factory to instantiate the correct object. # - obj = Custodian::AlertFactory.create( name, nil ) + obj = Custodian::AlertFactory.create(name, nil) # # Get the name of the class, and ensure it matches # what we expect. # a_type = obj.get_type - assert_equal( name, a_type) + assert_equal(name, a_type) # # Ensure that the object implements the raise() + clear() # methods we mandate. # - assert( obj.respond_to? 'raise' ) - assert( obj.respond_to? 'clear' ) + assert(obj.respond_to? 'raise') + assert(obj.respond_to? 'clear') end @@ -84,17 +84,17 @@ class TestAlertFactory < Test::Unit::TestCase # Creating an alert we don't know about is an error # assert_raise ArgumentError do - obj = Custodian::AlertFactory.create( 'not found', nil ) + obj = Custodian::AlertFactory.create('not found', nil) end # # A string is mandatory # assert_raise ArgumentError do - obj = Custodian::AlertFactory.create( nil, nil ) + obj = Custodian::AlertFactory.create(nil, nil) end assert_raise ArgumentError do - obj = Custodian::AlertFactory.create( [], nil ) + obj = Custodian::AlertFactory.create([], nil) end end |