X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Funit_core_log.t;h=bc167b1803715a34092f464c782e4e4ae8aefe95;hp=ff7e8a43fc360899993dbcadb8b7a709ca8d4851;hb=34d28dfd33574ce30aca69fb8700b61111d97b92;hpb=9e800f69753d858a230a0c48effd43457b07d3cc diff --git a/t/unit_core_log.t b/t/unit_core_log.t index ff7e8a4..bc167b1 100644 --- a/t/unit_core_log.t +++ b/t/unit_core_log.t @@ -4,7 +4,6 @@ use warnings; use Test::More tests => 24; use Test::NoWarnings; # Adds an extra test. -my $timestamp = '\[\w{3}\s\w{3}\s[ 123]\d\s\d{2}:\d{2}:\d{2}\s\d{4}\]'; my $LOG; BEGIN { @@ -37,13 +36,14 @@ can_ok $log, "_flush"; $log->_flush; ok @MESSAGES, '... and flushing the log should succeed'; is scalar @MESSAGES, 1, '... with one log message'; -like $MESSAGES[0], qr/^$timestamp \[catalyst\] \[info\] hello there!$/, +like $MESSAGES[0], qr/^\[info\] hello there!$/, '... which should match the format we expect'; { package Catalyst::Log::Subclass; - our @ISA = 'Catalyst::Log'; + use Moose; + extends 'Catalyst::Log'; sub _send_to_log { my $self = shift; @@ -69,6 +69,6 @@ $log->_flush; ok @MESSAGES, '... and flushing the log should succeed'; is scalar @MESSAGES, 2, '... with two log messages'; is $MESSAGES[0], '---', '... with the first one being our new data'; -like $MESSAGES[1], qr/^$timestamp \[catalyst\] \[info\] hi there!$/, +like $MESSAGES[1], qr/^\[info\] hi there!$/, '... which should match the format we expect';