summaryrefslogtreecommitdiff
path: root/lib/Module/Build/t/versions.t
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Module/Build/t/versions.t')
-rw-r--r--lib/Module/Build/t/versions.t12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/Module/Build/t/versions.t b/lib/Module/Build/t/versions.t
index e2d66a96e4..0bf47813a7 100644
--- a/lib/Module/Build/t/versions.t
+++ b/lib/Module/Build/t/versions.t
@@ -2,10 +2,11 @@
use strict;
use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib';
-use MBTest tests => 2;
+use MBTest tests => 4;
+
+use_ok 'Module::Build';
+ensure_blib('Module::Build');
-use Cwd ();
-my $cwd = Cwd::cwd;
my $tmp = MBTest->tmpdir;
use DistGen;
@@ -14,8 +15,6 @@ $dist->regen;
#########################
-use Module::Build;
-
my @mod = split( /::/, $dist->name );
my $file = File::Spec->catfile( $dist->dirname, 'lib', @mod ) . '.pm';
is( Module::Build->version_from_file( $file ), '0.01', 'version_from_file' );
@@ -25,6 +24,3 @@ ok( Module::Build->compare_versions( '1.01_01', '>', '1.01' ), 'compare: 1.0_01
# cleanup
$dist->remove;
-
-use File::Path;
-rmtree( $tmp );