Add another MOOSE_TEST_MD option, MooseX
[gitmo/Moose.git] / t / attributes / lazy_no_default.t
CommitLineData
bbf62397 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
6use Test::More;
7use Test::Fatal;
8
9{
10 package Foo;
11 use Moose;
12
13 ::like(
14 ::exception{ has foo => (
15 is => 'ro',
16 lazy => 1,
17 );
18 },
19 qr/\QYou cannot have a lazy attribute (foo) without specifying a default value for it/,
20 'lazy without a default or builder throws an error'
21 );
22}
23
24done_testing;