Permalink
Browse files

Improve is_class_loaded tests

  • Loading branch information...
1 parent 49b47bb commit 4e9558a6f5d54c9e196ff1aaee9babe3f87fc650 @sartak committed Apr 2, 2010
Showing with 9 additions and 11 deletions.
  1. +2 −1 t/005-is_class_loaded-moose.t
  2. +7 −10 t/005-is_class_loaded-mouse.t
@@ -8,11 +8,12 @@ BEGIN { delete $ENV{ANY_MOOSE} }
BEGIN {
eval 'require Moose;';
plan skip_all => 'Moose not available' if $@;
- plan tests => 2;
+ plan tests => 3;
}
package MyFoo;
use Any::Moose;
::ok Any::Moose::is_class_loaded('Moose');
+::ok Any::Moose::is_class_loaded('MyFoo');
::ok !Any::Moose::is_class_loaded('Meese');
@@ -6,17 +6,14 @@ use Test::More;
BEGIN { delete $ENV{ANY_MOOSE} }
BEGIN {
- eval 'require Mouse';
+ eval 'require Mouse;';
plan skip_all => 'Mouse not available' if $@;
- plan tests => 2;
+ plan tests => 3;
}
-{
- package MyFoo;
- use Any::Moose;
-}
-
-package main;
-ok(Any::Moose::is_class_loaded('Mouse'));
-ok(!Any::Moose::is_class_loaded('Meese'));
+package MyFoo;
+use Any::Moose;
+::ok Any::Moose::is_class_loaded('Mouse');
+::ok Any::Moose::is_class_loaded('MyFoo');
+::ok !Any::Moose::is_class_loaded('Meese');

0 comments on commit 4e9558a

Please sign in to comment.