RT#57023
[gitmo/MooseX-ConfigFromFile.git] / t / 03configfile_method.t
CommitLineData
0e88ec88 1#!/usr/bin/env perl
2use strict;
3use Test::More;
4use Test::Fatal;
5{
6 package A;
7 use Moose;
8 with qw(MooseX::ConfigFromFile);
9
10 sub configfile { 'moo' }
11
12 sub get_config_from_file { {} }
13}
14
15{
16 package B;
17 use Moose;
18 extends qw(A);
19
20 sub configfile { die; }
21 has configfile => ( is => 'bare', default => 'bar' );
22
23}
24
25is(exception { A->new_with_config() }, undef, 'A->new_with_config lives');
26is(exception { B->new_with_config() }, undef, 'B->new_with_config lives');
27
28done_testing();