summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTatsuhiko Miyagawa <miyagawa@bulknews.net>2013-06-06 10:29:01 +0900
committerTatsuhiko Miyagawa <miyagawa@bulknews.net>2013-06-06 10:29:31 +0900
commit94044478ca5675ea5985fc4140989150b180b8aa (patch)
tree5e79f389246cf5ead4556b1b271d5ad14330a00e
parent8137ec0304d02a02d702f063aad812ce00e82fb4 (diff)
downloadcarton-94044478ca5675ea5985fc4140989150b180b8aa.tar.gz
use subtest
-rw-r--r--xt/cli/check.t19
1 files changed, 14 insertions, 5 deletions
diff --git a/xt/cli/check.t b/xt/cli/check.t
index 59805e0..1648647 100644
--- a/xt/cli/check.t
+++ b/xt/cli/check.t
@@ -2,15 +2,21 @@ use strict;
use Test::More;
use xt::CLI;
-{
+subtest 'carton check fails when there is no lock' => sub {
my $app = cli();
-
$app->write_cpanfile(<<EOF);
requires 'Try::Tiny', '== 0.11';
EOF
$app->run("check");
like $app->stderr, qr/find carton\.lock/;
+};
+
+subtest 'carton install and check' => sub {
+ my $app = cli();
+ $app->write_cpanfile(<<EOF);
+requires 'Try::Tiny', '== 0.11';
+EOF
$app->run("install");
@@ -27,7 +33,11 @@ EOF
$app->run("check");
like $app->stdout, qr/not satisfied/;
- # TODO run exec and it will fail again
+ TODO: {
+ local $TODO = 'exec does not verify lock';
+ $app->run("exec", "perl", "use Try::Tiny");
+ like $app->stderr, qr/lock/;
+ }
$app->run("install");
@@ -49,8 +59,7 @@ EOF
$app->run("check");
like $app->stdout, qr/not satisfied/;
-}
-
+};
done_testing;