From ba17d2da90ba9d83663f4635e72fc115af568054 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(+) 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