summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-03-02 13:30:21 +0000
committerSteve Kemp <steve@steve.org.uk>2015-03-02 13:30:21 +0000
commitba17d2da90ba9d83663f4635e72fc115af568054 (patch)
tree5407c2d113227c88fde4b593afaeeff17a950497
parent88041694dea2a4d7000f0be32d93f4214957f49d (diff)
Explicitly abort on unknown test-types
-rw-r--r--lib/custodian/testfactory.rb5
1 files changed, 5 insertions, 0 deletions
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
#