X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Flive_stats.t;h=d47b50b3e9bbc23a3c1b0891eac4c690e6db6c43;hp=ff7fca843eaf40bd6ec19e1bfd3b9f900063f452;hb=75a7c429032fcfea6805a0cfedcedabb656e9931;hpb=dc5f035ee51a9833b5340e3ee597f5722263042f diff --git a/t/live_stats.t b/t/live_stats.t index ff7fca8..d47b50b 100644 --- a/t/live_stats.t +++ b/t/live_stats.t @@ -1,14 +1,19 @@ -#!perl - use strict; use warnings; use FindBin; use lib "$FindBin::Bin/lib"; -use Test::More tests => 5; +use Test::More; use Catalyst::Test 'TestAppStats'; +if ( $ENV{CATALYST_SERVER} ) { + plan skip_all => 'Using remote server'; +} +else { + plan tests => 5; +} + { ok( my $response = request('http://localhost/'), 'Request' ); ok( $response->is_success, 'Response Successful 2xx' ); @@ -16,7 +21,7 @@ use Catalyst::Test 'TestAppStats'; { ok( my $response = request('http://localhost/'), 'Request' ); ok( $response->is_success, 'Response Successful 2xx' ); - ok( $response->content =~ m/\/default.*?[\d.]+s.*- test.*[\d.]+s/s, 'Stats report'); + like( $response->content, qr/\/default.*?[\d.]+s.*- test.*[\d.]+s/s, 'Stats report'); }