Make tests use strict and warnings. Cleanup the killing of activemq so that it happen...
[catagits/Catalyst-Engine-STOMP.git] / t / 03-json-message.t
index 16375c9..40d5d08 100644 (file)
@@ -1,21 +1,24 @@
+use strict;
+use warnings;
 use Test::More;
 
 # Tests which expect a STOMP server like ActiveMQ to exist on
 # localhost:61613, which is what you get if you just get the ActiveMQ
 # distro and run its out-of-the-box config.
 
-use Net::Stomp;
-
 eval {
        use JSON;
 };
 if ($@) {
        plan 'skip_all' => 'JSON not installed, skipping JSON-format test';
+    exit;
 }
 
 use FindBin;
-use lib "$FindBin::Bin";
-require 'server.pl';
+use lib "$FindBin::Bin/lib";
+use TestServer;
+
+my $stomp = start_server();
 
 plan tests => 11;