diff options
author | Steve Kemp <steve@steve.org.uk> | 2012-11-23 15:27:45 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2012-11-23 15:27:45 +0000 |
commit | cd1750251483f82cafdfb8e6a92242097b4929c4 (patch) | |
tree | 835a09f626e1a84bacd8075a224f65b585d35034 /lib/custodian | |
parent | 25650d2b649b8994755502e90707a148567686ca (diff) |
Updated to allow the tests to be inverted via "must *not* run ..."
Diffstat (limited to 'lib/custodian')
-rw-r--r-- | lib/custodian/testfactory.rb | 7 |
1 files changed, 3 insertions, 4 deletions
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 |