Regenerate test files
[gitmo/Mouse.git] / t / 020_attributes / 034_bad_coerce.t
CommitLineData
fde8e43f 1use strict;
2# This is automatically generated by author/import-moose-test.pl.
3# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4use t::lib::MooseCompat;
5use warnings;
6
7use Test::More;
8
9use Test::Requires {
10 'Test::Output' => '0.01', # skip all if not installed
11};
12
13{
14 package Foo;
15
16 use Mouse;
17
18 ::stderr_like{ has foo => (
19 is => 'ro',
20 isa => 'Str',
21 coerce => 1,
22 );
23 }
24 qr/\QYou cannot coerce an attribute (foo) unless its type (Str) has a coercion/,
25 'Cannot coerce unless the type has a coercion';
26
27 ::stderr_like{ has bar => (
28 is => 'ro',
29 isa => 'Str',
30 coerce => 1,
31 );
32 }
33 qr/\QYou cannot coerce an attribute (bar) unless its type (Str) has a coercion/,
34 'Cannot coerce unless the type has a coercion - different attribute';
35}
36
37done_testing;