X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Funit_core_log.t;h=26a52d321407149d1cd2eb66b313c45f4dfea0dd;hb=f91554831ad9972ba44453f69a6b633fd3dfa710;hp=ff7e8a43fc360899993dbcadb8b7a709ca8d4851;hpb=adee716c5ee8cda002acdaaa31764b72382101a3;p=catagits%2FCatalyst-Runtime.git diff --git a/t/unit_core_log.t b/t/unit_core_log.t index ff7e8a4..26a52d3 100644 --- a/t/unit_core_log.t +++ b/t/unit_core_log.t @@ -1,10 +1,8 @@ use strict; use warnings; -use Test::More tests => 24; -use Test::NoWarnings; # Adds an extra test. +use Test::More tests => 23; -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 +35,13 @@ 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 base qw/Catalyst::Log/; sub _send_to_log { my $self = shift; @@ -69,6 +67,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';