nasty hack
[catagits/Catalyst-Plugin-Session.git] / t / 06_finalize.t
index 6b07b8e..65fe057 100644 (file)
@@ -3,12 +3,21 @@
 use strict;
 use warnings;
 
-use Test::More tests => 3;
+use Test::More;
+
+BEGIN {
+    if ( eval { require Catalyst::Plugin::Session::State::Cookie } ) {
+        plan tests => 3;
+    } else {
+        plan skip_all => "Catalyst::Plugin::Session::State::Cookie required";
+    }
+}
 
 my $finalized = 0;
 
 {
   package TestPlugin;
+  BEGIN { $INC{"TestPlugin.pm"} = 1 }
 
   sub finalize_session { $finalized = 1 }