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/smtp.rb | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) (limited to 'lib/custodian/protocoltest/smtp.rb') diff --git a/lib/custodian/protocoltest/smtp.rb b/lib/custodian/protocoltest/smtp.rb index 0d22c95..89e2b24 100644 --- a/lib/custodian/protocoltest/smtp.rb +++ b/lib/custodian/protocoltest/smtp.rb @@ -19,26 +19,6 @@ module Custodian class SMTPTest < TCPTest - # - # The line from which we were constructed. - # - attr_reader :line - - - # - # The host to test against. - # - attr_reader :host - - - # - # The port to connect to. - # - attr_reader :port - - - - # # Constructor # @@ -54,6 +34,15 @@ module Custodian # @host = line.split( /\s+/)[0] + # + # Is this test inverted? + # + if ( line =~ /must\s+not\s+run\s+/ ) + @inverted = true + else + @inverted = false + end + # # Save the port # -- cgit v1.2.1