bless.t: More explicit test
authorFather Chrysostomos <sprout@cpan.org>
Thu, 31 Oct 2013 01:05:41 +0000 (18:05 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 31 Oct 2013 22:47:02 +0000 (15:47 -0700)
Not only does this prevent us from accidentally producing the wrong
error, it also makes it easy to grep and see that this error is
tested.

t/op/bless.t

index 2f19d8d..69217fd 100644 (file)
@@ -118,7 +118,7 @@ expected(bless([]), 'main', "ARRAY");
 # class is a ref
 $a1 = bless {}, "A4";
 $b1 = eval { bless {}, $a1 };
-isnt ($@, '', "class is a ref");
+like ($@, qr/^Attempt to bless into a reference at /, "class is a ref");
 
 # class is an overloaded ref
 {