tidy up the test
Matt S Trout [Sun, 11 Jun 2006 14:45:39 +0000 (14:45 +0000)]
r9839@cain (orig r4320):  bricas | 2006-06-07 18:47:56 +0000

t/unit_core_component_loading.t

index ffd20a5..f0204ec 100644 (file)
@@ -148,14 +148,7 @@ $complist = $appclass->components;
 
 is(scalar keys %$complist, 24+1, "Correct number of components loaded");
 
-my $seen_foo_controller = 0;
-my $seen_extra = 0;
-foreach (keys %$complist) {
-    $seen_foo_controller++ if $_ eq "${appclass}::Controller::Foo";
-    $seen_extra++ if $_ eq "${appclass}::Extra::Foo";
-}
-
-is( $seen_foo_controller, 0, 'Controller::Foo was skipped' );
-is( $seen_extra, 1, 'Extra::Foo was loaded' );
+ok( !exists $complist->{ "${appclass}::Controller::Foo" }, 'Controller::Foo was skipped' );
+ok( exists $complist->{ "${appclass}::Extra::Foo" }, 'Extra::Foo was loaded' );
 
 rmtree($libdir);
\ No newline at end of file