From b7608cc947bcca078644516a288a6bef67f7f09a Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Wed, 21 Nov 2012 23:15:44 +0000 Subject: Added .to_json method to serialize our tests. --- lib/custodian/protocoltest/jabber.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lib/custodian/protocoltest/jabber.rb') diff --git a/lib/custodian/protocoltest/jabber.rb b/lib/custodian/protocoltest/jabber.rb index a9920f0..1aef8b5 100644 --- a/lib/custodian/protocoltest/jabber.rb +++ b/lib/custodian/protocoltest/jabber.rb @@ -57,6 +57,21 @@ class JABBERTest < TCPTest + # + # Convert this class to JSON such that it may be serialized. + # + def to_json + hash = { + :test_type => 'jabber', + :test_target => @host, + :test_port => @port, + } + hash.to_json + end + + + + # # Run the TCP-protocol test. # -- cgit v1.2.1