Commit | Line | Data |
---|---|---|
cecd110f | 1 | #!/usr/bin/perl |
2 | ||
3 | use strict; | |
4 | use warnings; | |
5 | ||
a28e50e4 | 6 | use Test::More; |
b10dde3a | 7 | use Test::Fatal; |
cecd110f | 8 | |
7ff56534 | 9 | |
cecd110f | 10 | =pod |
11 | ||
d03bd989 | 12 | This was a bug, but it is fixed now. This |
cecd110f | 13 | test makes sure it does not creep back in. |
14 | ||
15 | =cut | |
16 | ||
17 | { | |
18 | package Foo; | |
19 | use Moose; | |
d03bd989 | 20 | |
b10dde3a | 21 | ::is( ::exception { |
cecd110f | 22 | has 'bar' => ( |
d03bd989 | 23 | is => 'ro', |
cecd110f | 24 | isa => 'Int', |
25 | lazy => 1, | |
26 | default => 10, | |
27 | ); | |
b10dde3a | 28 | }, undef, '... this didnt die' ); |
cecd110f | 29 | } |
d03bd989 | 30 | |
a28e50e4 | 31 | done_testing; |