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=a8c9c13dd920d40c6a61a12e59ceb758ba39eb73;hp=ff7fca843eaf40bd6ec19e1bfd3b9f900063f452;hb=f3414019f472b55682ef3af53f761b6db7955887;hpb=dc5f035ee51a9833b5340e3ee597f5722263042f diff --git a/t/live_stats.t b/t/live_stats.t index ff7fca8..a8c9c13 100644 --- a/t/live_stats.t +++ b/t/live_stats.t @@ -6,9 +6,16 @@ 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 +23,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'); }