[Bast-commits] r5002 - Devel-Declare/1.000/trunk/t

rhesa at dev.catalyst.perl.org rhesa at dev.catalyst.perl.org
Mon Oct 27 03:20:25 GMT 2008


Author: rhesa
Date: 2008-10-27 03:20:25 +0000 (Mon, 27 Oct 2008)
New Revision: 5002

Modified:
   Devel-Declare/1.000/trunk/t/method-installer-runtime.t
Log:
changed runtime test to use can()

Modified: Devel-Declare/1.000/trunk/t/method-installer-runtime.t
===================================================================
--- Devel-Declare/1.000/trunk/t/method-installer-runtime.t	2008-10-26 21:38:43 UTC (rev 5001)
+++ Devel-Declare/1.000/trunk/t/method-installer-runtime.t	2008-10-27 03:20:25 UTC (rev 5002)
@@ -1,9 +1,8 @@
 
 use strict;
 
-use Test::More tests => 3;
+use Test::More tests => 2;
 
-use lib 'lib';
 use Devel::Declare::MethodInstaller::Simple;
 
 # suppress warnings
@@ -16,10 +15,9 @@
   );
 }
 
-is eval { foo() } , undef;
-like $@, qr/subroutine &main::foo/;
+ok(!main->can('foo'), 'foo() not installed yet');
 
-method foo { 1 }
+method foo { }
 
-is foo(), 1;
+ok(main->can('foo'), 'foo() installed at runtime');
 




More information about the Bast-commits mailing list