From caaa448c8826e4409d5db5398943e8c1ef54818d Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Fri, 23 Nov 2012 15:27:45 +0000 Subject: Updated to allow the tests to be inverted via "must *not* run ..." --- lib/custodian/testfactory.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/custodian/testfactory.rb') diff --git a/lib/custodian/testfactory.rb b/lib/custodian/testfactory.rb index ac2904a..934d6a7 100644 --- a/lib/custodian/testfactory.rb +++ b/lib/custodian/testfactory.rb @@ -34,10 +34,9 @@ module Custodian # # If this is an obvious protocol test. # - if ( line =~ /must\s+run\s+(\S+)(\s+|\.|$)/ ) - test_type = $1.dup + if ( line =~ /must\s+(not\s+)?run\s+(\S+)(\s+|\.|$)/ ) + test_type = $2.dup test_type.chomp!( "." ) - c = @@subclasses[test_type] if c c.new( line ) @@ -45,7 +44,7 @@ module Custodian raise ArgumentError, "Bad test type: #{test_type}" end else - raise "Unknown line given - Failed to instantiate a suitable protocol-test." + raise "Unknown line given - Failed to instantiate a suitable protocol-test: '#{line}'" end end -- cgit v1.2.1