From 19ad4dc151720b6d172e2f3dabf11cce933ba18d Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Fri, 23 Nov 2012 15:46:12 +0000 Subject: Removed duplicate member-variables for subclasses. Allow test-inversion via "must not run". --- lib/custodian/protocoltest/ping.rb | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'lib/custodian/protocoltest/ping.rb') diff --git a/lib/custodian/protocoltest/ping.rb b/lib/custodian/protocoltest/ping.rb index c13c17c..95b387c 100644 --- a/lib/custodian/protocoltest/ping.rb +++ b/lib/custodian/protocoltest/ping.rb @@ -18,20 +18,6 @@ module Custodian class PINGTest < TestFactory - # - # The line from which we were constructed. - # - attr_reader :line - - - # - # The host to test against. - # - attr_reader :host - - - - # # Constructor # @@ -46,6 +32,16 @@ module Custodian # Save the host # @host = line.split( /\s+/)[0] + + # + # Is this test inverted? + # + if ( line =~ /must\s+not\s+run\s+/ ) + @inverted = true + else + @inverted = false + end + end -- cgit v1.2.1