X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Foptional_stress.t;h=620c840e6e5fc5d7ac7ae8aa87b276196b21dd05;hp=c4ccee228cf8cd277320fbdd90b968cc2e747c69;hb=88e5a8b0c4d28e46b8ba6b6b9567063e57af9063;hpb=4853fb50e3c7138bbe513fed2b22574a2d988ed1 diff --git a/t/optional_stress.t b/t/optional_stress.t index c4ccee2..620c840 100644 --- a/t/optional_stress.t +++ b/t/optional_stress.t @@ -1,5 +1,3 @@ -#!perl - use strict; use warnings; @@ -16,11 +14,16 @@ use Catalyst::Test 'TestApp'; our ( $iters, $tests ); BEGIN { - eval "use YAML"; - plan skip_all => 'YAML is required for this test' if $@; + use JSON::MaybeXS qw(decode_json); + + my $test_data = do { + open my $fh, '<:raw', "$FindBin::Bin/optional_stress.json" or die "$!"; + local $/; + <$fh>; + }; $iters = $ENV{TEST_STRESS} || 10; - $tests = YAML::LoadFile("$FindBin::Bin/optional_stress.yml"); + $tests = decode_json($test_data); my $total_tests = 0; map { $total_tests += scalar @{ $tests->{$_} } } keys %{$tests};