From: Shawn M Moore Date: Fri, 15 Jun 2012 19:09:22 +0000 (-0500) Subject: The "at file line" bit moves further down in the new stack traces X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMoose.git;a=commitdiff_plain;h=4f546e2473b60b71f76bf1a5bdac7fc63c5322ae The "at file line" bit moves further down in the new stack traces --- diff --git a/t/roles/extending_role_attrs.t b/t/roles/extending_role_attrs.t index ee9e7b2..17b4bf2 100644 --- a/t/roles/extending_role_attrs.t +++ b/t/roles/extending_role_attrs.t @@ -67,7 +67,7 @@ is($bar->foo, 42, '... got the extended attribute'); $bar->foo(100); is($bar->foo, 100, "... can change the attribute's value to an Int"); -like( exception { $bar->foo("baz") }, qr/^Attribute \(foo\) does not pass the type constraint because: Validation failed for 'Int' with value .*baz.* at / ); +like( exception { $bar->foo("baz") }, qr/^Attribute \(foo\) does not pass the type constraint because: Validation failed for 'Int' with value .*baz.*/ ); is($bar->foo, 100, "... still has the old Int value"); @@ -98,7 +98,7 @@ is($baz->baz, 99, '... got the extended attribute'); $baz->baz('Foo'); is($baz->baz, 'Foo', "... can change the attribute's value to a ClassName"); -like( exception { $baz->baz("zonk") }, qr/^Attribute \(baz\) does not pass the type constraint because: Validation failed for 'ClassName\|Int' with value .*zonk.* at / ); +like( exception { $baz->baz("zonk") }, qr/^Attribute \(baz\) does not pass the type constraint because: Validation failed for 'ClassName\|Int' with value .*zonk.*/ ); is_deeply($baz->baz, 'Foo', "... still has the old ClassName value"); @@ -136,10 +136,10 @@ is($quux->quux, 100, "... can change the attribute's value to an Int"); $quux->quux(["hi"]); is_deeply($quux->quux, ["hi"], "... can change the attribute's value to an ArrayRef"); -like( exception { $quux->quux("quux") }, qr/^Attribute \(quux\) does not pass the type constraint because: Validation failed for 'ArrayRef\|Positive' with value .*quux.* at / ); +like( exception { $quux->quux("quux") }, qr/^Attribute \(quux\) does not pass the type constraint because: Validation failed for 'ArrayRef\|Positive' with value .*quux.*/ ); is_deeply($quux->quux, ["hi"], "... still has the old ArrayRef value"); -like( exception { $quux->quux({a => 1}) }, qr/^Attribute \(quux\) does not pass the type constraint because: Validation failed for 'ArrayRef\|Positive' with value .+ at / ); +like( exception { $quux->quux({a => 1}) }, qr/^Attribute \(quux\) does not pass the type constraint because: Validation failed for 'ArrayRef\|Positive' with value .+/ ); is_deeply($quux->quux, ["hi"], "... still has the old ArrayRef value"); diff --git a/t/roles/imported_required_method.t b/t/roles/imported_required_method.t index d37faa0..374db5f 100644 --- a/t/roles/imported_required_method.t +++ b/t/roles/imported_required_method.t @@ -49,7 +49,7 @@ BEGIN { ::like( ::exception { with 'Bar' }, - qr/^\Q'Bar' requires the method 'bar' to be implemented by 'Class' at/, + qr/^\Q'Bar' requires the method 'bar' to be implemented by 'Class'/, "requirement isn't imported, so don't give the extra info in the error" ); } diff --git a/t/type_constraints/class_subtypes.t b/t/type_constraints/class_subtypes.t index 33b21e5..2643b54 100644 --- a/t/type_constraints/class_subtypes.t +++ b/t/type_constraints/class_subtypes.t @@ -134,7 +134,7 @@ class_type 'Negative' => message { "$_ is not a Negative Nancy" }; like( exception { Quux::Ier->new(age => 3) -}, qr/^Attribute \(age\) does not pass the type constraint because: 3 is not a Negative Nancy / ); +}, qr/^Attribute \(age\) does not pass the type constraint because: 3 is not a Negative Nancy/ ); is( exception { Quux::Ier->new(age => (bless {}, 'Negative'))