summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-04-26 10:09:03 -0500
committerJesse Luehrs <doy@tozt.net>2011-04-26 10:10:06 -0500
commit7ae814b74181a383bdae0e48e49179acaa8d5357 (patch)
tree9877df9ef032409cf15a517889f0371750c11274
parent3405a817789d09aaad2a0476ec508ec4d5def9bf (diff)
downloadbread-board-declare-7ae814b74181a383bdae0e48e49179acaa8d5357.tar.gz
bread-board-declare-7ae814b74181a383bdae0e48e49179acaa8d5357.zip
fix test for moose error message changes
-rw-r--r--t/30-type-checks.t8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/30-type-checks.t b/t/30-type-checks.t
index b7718ac..0641d98 100644
--- a/t/30-type-checks.t
+++ b/t/30-type-checks.t
@@ -19,7 +19,7 @@ use Test::Moose;
has bar => (
is => 'ro',
isa => 'Str',
- block => sub { {} },
+ block => sub { { foo => 'bar' } },
);
has baz => (
@@ -33,13 +33,13 @@ use Test::Moose;
with_immutable {
my $foo = Foo->new;
like(exception { $foo->foo },
- qr/^Attribute \(foo\) does not pass the type constraint because: Validation failed for 'Ref' with value FOO/,
+ qr/^Attribute \(foo\) does not pass the type constraint because: Validation failed for 'Ref' with value .*FOO/,
"error when service returns invalid value");
like(exception { $foo->bar },
- qr/^Attribute \(bar\) does not pass the type constraint because: Validation failed for 'Str' with value HASH/,
+ qr/^Attribute \(bar\) does not pass the type constraint because: Validation failed for 'Str' with value .*(?:HASH|foo.*bar)/,
"error when service returns invalid value");
like(exception { $foo->baz },
- qr/^Attribute \(bar\) does not pass the type constraint because: Validation failed for 'Str' with value HASH/,
+ qr/^Attribute \(bar\) does not pass the type constraint because: Validation failed for 'Str' with value .*(?:HASH|foo.*bar)/,
"error when service returns invalid value, even as a dependency");
} 'Foo';