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=420a1a5447869b69634b71fec771796058090181;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' +);