Create branch register_actions.
[catagits/Catalyst-Runtime.git] / t / optional_stress.t
index eed111a..c4ccee2 100644 (file)
@@ -3,18 +3,21 @@
 use strict;
 use warnings;
 
+use Test::More;
+BEGIN {
+    plan skip_all => 'set TEST_STRESS to enable this test'
+      unless $ENV{TEST_STRESS};
+}
+
 use FindBin;
 use lib "$FindBin::Bin/lib";
-
-use Test::More;
 use Catalyst::Test 'TestApp';
-use YAML;
 
 our ( $iters, $tests );
 
 BEGIN {
-    plan skip_all => 'set TEST_STRESS to enable this test'
-      unless $ENV{TEST_STRESS};
+    eval "use YAML";
+    plan skip_all => 'YAML is required for this test' if $@;
 
     $iters = $ENV{TEST_STRESS} || 10;
     $tests = YAML::LoadFile("$FindBin::Bin/optional_stress.yml");