From 0e53ee2544b02b2a672e69923c906d603e5e15b2 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Sat, 24 Nov 2012 15:01:20 +0000 Subject: Use the new get_type method to simplify the test-logic. --- t/test-custodian-alertfactory.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/t/test-custodian-alertfactory.rb b/t/test-custodian-alertfactory.rb index 11ad4b9..4fd504e 100755 --- a/t/test-custodian-alertfactory.rb +++ b/t/test-custodian-alertfactory.rb @@ -37,12 +37,8 @@ class TestAlertFactory < Test::Unit::TestCase # Get the name of the class, and ensure it matches # what we expect. # - nm = obj.class - if ( nm =~ /Alerter::(.*)$/i ) - tst = $1.dup.downcase - - assert_equal( name, nm ) - end + a_type = obj.get_type + assert_equal( name, a_type) end end -- cgit v1.2.1