| 1 | # Test Log::Log4perl or Log::Any::Adapter::Log4perl not being present. | ||
| 2 | # | ||
| 3 | package Poet::t::NoLog4perl; | ||
| 4 | $Poet::t::NoLog4perl::VERSION = '0.16'; | ||
| 5 | use Test::Class::Most parent => 'Poet::Test::Class'; | ||
| 6 | use Poet::Tools qw(read_file); | ||
| 7 | use strict; | ||
| 8 | use warnings; | ||
| 9 | |||
| 10 | sub test_no_log4perl : Tests { | ||
| 11 | my $self = shift; | ||
| 12 | my $poet = $self->initialize_temp_env(); | ||
| 13 | my $error_file = $poet->logs_path("poet.log.ERROR"); | ||
| 14 | ok( -f $error_file, "$error_file exists" ); | ||
| 15 | like( read_file($error_file), qr/Could not load Log::Log4perl/ ); | ||
| 16 | } | ||
| 17 | |||
| 18 | 1; |