diff options
author | Jesse Luehrs <doy@tozt.net> | 2011-05-25 14:05:49 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2011-05-25 14:05:49 -0500 |
commit | 219d8e56458e61eab39c78395cddb9689256f512 (patch) | |
tree | 613ab6ae4c746e676f2fd45da2ae3c60519ce37d | |
parent | f3b0919453a6a370af34ee6f2e23dc8e0e251b42 (diff) | |
download | bread-board-declare-219d8e56458e61eab39c78395cddb9689256f512.tar.gz bread-board-declare-219d8e56458e61eab39c78395cddb9689256f512.zip |
test for lack of inference
-rw-r--r-- | t/50-infer.t | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/t/50-infer.t b/t/50-infer.t index 983e1a3..2b064a3 100644 --- a/t/50-infer.t +++ b/t/50-infer.t @@ -52,6 +52,11 @@ use Test::Fatal; isa => 'Baz', infer => 1, ); + + has baz_no_infer => ( + is => 'ro', + isa => 'Baz', + ); } { @@ -67,6 +72,15 @@ use Test::Fatal; } { + my $c = My::Container->new; + like( + exception { $c->baz_no_infer }, + qr/^Attribute \(bar\) is required/, + "not inferred when not requested" + ); +} + +{ package Baz2; use Moose; |