Created
October 25, 2016 10:17
-
-
Save mephinet/c3e3d93c805381155712da46b3801edd to your computer and use it in GitHub Desktop.
Unittest for Log::Any stringification of refs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env perl | |
use strict; | |
use warnings; | |
use Test::More; | |
use Log::Any '$log'; | |
use Log::Any::Adapter 'Test'; | |
use URI; | |
my $uri = URI->new('http://slashdot.org/'); | |
$log->infof( 'Fetching %s', $uri ); | |
is_deeply( | |
Log::Any::Adapter::Test->msgs->[0]->{message}, | |
'Fetching http://slashdot.org/', | |
'URI was correctly stringified' | |
); | |
done_testing; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment