summaryrefslogtreecommitdiff
path: root/lib/custodian/protocoltest/jabber.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-23 15:46:12 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-23 15:46:12 +0000
commitb42677d69de3dab1a55c81689cf2b3b45fd85d12 (patch)
tree3c17d871d9ba42496ff23f05522b99bd43bcb7bb /lib/custodian/protocoltest/jabber.rb
parentcaaa448c8826e4409d5db5398943e8c1ef54818d (diff)
Removed duplicate member-variables for subclasses.
Allow test-inversion via "must not run".
Diffstat (limited to 'lib/custodian/protocoltest/jabber.rb')
-rw-r--r--lib/custodian/protocoltest/jabber.rb27
1 files changed, 9 insertions, 18 deletions
diff --git a/lib/custodian/protocoltest/jabber.rb b/lib/custodian/protocoltest/jabber.rb
index 9c0eb6d..1e95650 100644
--- a/lib/custodian/protocoltest/jabber.rb
+++ b/lib/custodian/protocoltest/jabber.rb
@@ -18,24 +18,6 @@ module Custodian
class JABBERTest < 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
@@ -53,6 +35,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
#
if ( line =~ /on\s+([0-9]+)/ )