[carton] 343/472: Fix a bug in CLI test runner where some app instance variables are cached
Lucas Kanashiro
kanashiro-guest at moszumanska.debian.org
Fri Jul 24 00:39:22 UTC 2015
This is an automated email from the git hooks/post-receive script.
kanashiro-guest pushed a commit to branch master
in repository carton.
commit 3d1104481e0d49ed9b676c184ec0748382648561
Author: Tatsuhiko Miyagawa <miyagawa at bulknews.net>
Date: Tue Jul 23 02:20:09 2013 -0700
Fix a bug in CLI test runner where some app instance variables are cached
---
xt/CLI.pm | 4 ++--
xt/cli/mirror.t | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/xt/CLI.pm b/xt/CLI.pm
index 59bcefa..42dadb7 100644
--- a/xt/CLI.pm
+++ b/xt/CLI.pm
@@ -13,12 +13,12 @@ sub cli {
}
package Carton::CLI::Tested;
+use Carton::CLI;
use Capture::Tiny qw(capture);
use File::pushd ();
use Path::Tiny;
use Moo;
-extends 'Carton::CLI';
$Carton::CLI::UseSystem = 1;
has dir => (is => 'rw');
@@ -48,7 +48,7 @@ sub run {
my $pushd = File::pushd::pushd $self->dir;
my @capture = capture {
- my $code = eval { $self->SUPER::run(@args) };
+ my $code = eval { Carton::CLI->new->run(@args) };
$self->exit_code($@ ? 255 : $code);
};
diff --git a/xt/cli/mirror.t b/xt/cli/mirror.t
index a97fdcd..ae798f9 100644
--- a/xt/cli/mirror.t
+++ b/xt/cli/mirror.t
@@ -11,7 +11,7 @@ my $cwd = Path::Tiny->cwd;
requires 'Hash::MultiValue';
EOF
- $app->mirror("$cwd/xt/mirror");
+ local $ENV{PERL_CARTON_MIRROR} = "$cwd/xt/mirror";
$app->run("install");
$app->run("list");
@@ -25,7 +25,7 @@ EOF
requires 'PSGI';
EOF
- $app->mirror("$cwd/xt/mirror");
+ local $ENV{PERL_CARTON_MIRROR} = "$cwd/xt/mirror";
$app->run("install");
$app->run("list");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/carton.git
More information about the Pkg-perl-cvs-commits
mailing list