Update failing tests (by author/import-moose-tests.pl)
[gitmo/Mouse.git] / Moose-t-failing / 020_attributes / 034_bad_coerce.t
CommitLineData
1743c026 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$TODO = q{Mouse is not yet completed};
9
10use Test::Requires {
11 'Test::Output' => '0.01', # skip all if not installed
12};
13
14{
15 package Foo;
16
17 use Mouse;
18
19 ::stderr_like{ has foo => (
20 is => 'ro',
21 isa => 'Str',
22 coerce => 1,
23 );
24 }
25 qr/\QYou cannot coerce an attribute (foo) unless its type (Str) has a coercion/,
26 'Cannot coerce unless the type has a coercion';
27
28 ::stderr_like{ has bar => (
29 is => 'ro',
30 isa => 'Str',
31 coerce => 1,
32 );
33 }
34 qr/\QYou cannot coerce an attribute (bar) unless its type (Str) has a coercion/,
35 'Cannot coerce unless the type has a coercion - different attribute';
36}
37
38done_testing;