Make mech tests skip unless mech new enough. RT#55303
[catagits/Catalyst-Authentication-Credential-HTTP.git] / t / live_app.t
index 05cb3a0..fc07156 100644 (file)
@@ -1,9 +1,17 @@
 #!/usr/bin/perl
 use strict;
 use warnings;
+
+use FindBin qw/$Bin/;
+use lib "$Bin/lib";
+
 use Test::More;
 BEGIN {
-    eval { require Test::WWW::Mechanize::Catalyst }
+    do {
+        eval { require Test::WWW::Mechanize::Catalyst }
+        and
+        Test::WWW::Mechanize::Catalyst->VERSION('0.51')
+    }
       or plan skip_all =>
       "Test::WWW::Mechanize::Catalyst is needed for this test";
     plan tests => 4;