Don't run the moose controller test if Moose isn't available
Florian Ragwitz [Thu, 19 Feb 2009 01:29:05 +0000 (01:29 +0000)]
t/live_component_controller_moose.t

index 0882fd0..353e515 100644 (file)
@@ -1,10 +1,19 @@
 use strict;
 use warnings;
+use Test::More;
+
+BEGIN {
+    if (eval 'require Moose; 1') {
+        plan tests => 2;
+    }
+    else {
+        plan skip_all => 'Moose is required for this test';
+    }
+}
 
 use FindBin;
 use lib "$FindBin::Bin/lib";
 
-use Test::More tests => 2;
 use Catalyst::Test 'TestApp';
 
 {