From ca890f1cd7ce262cea8e076da0d5b56c6286ebea Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Mon, 2 Mar 2015 13:30:21 +0000 Subject: Explicitly abort on unknown test-types --- lib/custodian/testfactory.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/custodian') diff --git a/lib/custodian/testfactory.rb b/lib/custodian/testfactory.rb index 41bc445..fc007e9 100644 --- a/lib/custodian/testfactory.rb +++ b/lib/custodian/testfactory.rb @@ -48,6 +48,11 @@ module Custodian test_type = $2.dup test_type.chomp!( "." ) + if ( @@subclasses[test_type].nil? ) + raise ArgumentError, "There is no handler registered for the '#{test_type}' test-type" + end + + # # For each of the test-classes that implement the type # -- cgit v1.2.1