summaryrefslogtreecommitdiff
path: root/lib/custodian/testfactory.rb
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
commitca890f1cd7ce262cea8e076da0d5b56c6286ebea (patch)
tree7933358b316ce1cfce591a5890bcf5001bc6353e /lib/custodian/testfactory.rb
parentdbb4386809eb8a1afa91a7891380fb6602ec0675 (diff)
Explicitly abort on unknown test-types
Diffstat (limited to 'lib/custodian/testfactory.rb')
-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
#