updated dependents test
[gitmo/Moo.git] / t / accessor-coerce.t
index 804a3d0..4288b97 100644 (file)
@@ -94,7 +94,7 @@ run_for 'Baz';
   );
 }
 
-like exception { Biff->new(plus_three => 1) }, qr/could not add three!/, 'Exception properly thrown';
+like exception { Biff->new(plus_three => 1) }, qr/coercion for "plus_three" failed: could not add three!/, 'Exception properly thrown';
 
 {
   package Foo2;
@@ -192,10 +192,10 @@ run_with_default_for 'Foo3';
   has plus_three => (
     is => 'rw',
     default => sub { 1 },
-    coerce => quote_sub q{
+    coerce => quote_sub(q{
       my ($x) = @_;
       $x + 3
-    },
+    }),
     lazy => 1,
   );
 }