Skip to content

Commit

Permalink
modernized log tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 15, 2013
1 parent 6786e78 commit bc58398
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Changes
@@ -1,4 +1,7 @@

3.91 2013-03-15
- Improved tests.

3.90 2013-03-14
- Added direct array access for parsed parameters to Mojo::Parameters.
- Added direct array access for path parts to Mojo::Path.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious.pm
Expand Up @@ -40,7 +40,7 @@ has static => sub { Mojolicious::Static->new };
has types => sub { Mojolicious::Types->new };

our $CODENAME = 'Rainbow';
our $VERSION = '3.90';
our $VERSION = '3.91';

sub AUTOLOAD {
my $self = shift;
Expand Down
4 changes: 2 additions & 2 deletions t/mojo/log.t
Expand Up @@ -3,8 +3,8 @@ use Mojo::Base -strict;
use Test::More;
use File::Spec::Functions 'catdir';
use File::Temp 'tempdir';
use Mojo::Asset::File;
use Mojo::Log;
use Mojo::Util 'slurp';

# Logging to file
my $dir = tempdir CLEANUP => 1;
Expand All @@ -14,7 +14,7 @@ $log->error('Just works.');
$log->fatal('Works too.');
$log->debug('Does not work.');
undef $log;
my $content = Mojo::Asset::File->new(path => $path)->slurp;
my $content = slurp $path;
like $content, qr/\[.*\] \[error\] Just works\.\n/, 'has error message';
like $content, qr/\[.*\] \[fatal\] Works too\.\n/, 'has fatal message';
unlike $content, qr/\[.*\] \[debug\] Does not work\.\n/, 'no debug message';
Expand Down

0 comments on commit bc58398

Please sign in to comment.