From: Tyler Riddle Date: Wed, 13 Feb 2013 22:55:50 +0000 (-0800) Subject: update test for bug 83267 to validate the error message generated when invoking log_info X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Frt83267;p=p5sagit%2FLog-Contextual.git update test for bug 83267 to validate the error message generated when invoking log_info --- diff --git a/t/regression_83267.t b/t/regression_83267.t index c551672..290ca29 100644 --- a/t/regression_83267.t +++ b/t/regression_83267.t @@ -39,6 +39,11 @@ require Log::Contextual; eval { Log::Contextual->import('log_info') }; is($@, '', 'Imported log function with out dying'); -#don't try to invoke the function for now -eval { log_info { "test" } 1 }; -is($@, '', 'Was able to invoke log function'); +eval { + log_info { "test" } 1 +}; +like( + $@, + qr/^ no logger set! you can't try to log something without a logger!/, + 'Got correct error' +);