Skip to content

Commit

Permalink
add tests for moduleloader
Browse files Browse the repository at this point in the history
  • Loading branch information
fcuny committed Aug 22, 2010
1 parent 0ef0f45 commit 3c809ab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion t/00_base/005_module_loader.t
@@ -1,9 +1,12 @@
use strict;
use warnings;
use Test::More tests => 4;
use Test::More tests => 6;

BEGIN { use_ok 'Dancer::ModuleLoader' }

ok( Dancer::ModuleLoader->load("File::Spec"), "File::Spec is loaded" );
ok( File::Spec->rel2abs('.'), "File::Spec is imported" );
ok( !Dancer::ModuleLoader->load("Non::Existent::Module"), "fake module is not loaded" );

ok( Dancer::ModuleLoader->load("File::Spec", "1.0"), "File::Spec version >= 1.0 is loaded");
ok( !Dancer::ModuleLoader->load("File::Spec", "9999"), "Can't load File::Spec v9999");

0 comments on commit 3c809ab

Please sign in to comment.