Skip to content

Commit 9d298d3

Browse files
committed
For [GH #161][GH #117] - make tests robust
1 parent d2b49d2 commit 9d298d3

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

t/psgi_action_in_many_ways.t

+9-3
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,14 @@ use YATT::Lite::PSGIEnv;
3434

3535
sub psgi_returns {
3636
my ($self, $psgi, $expect, $it_should) = @_;
37-
my $got = $self->[0]->call($psgi);
38-
Test::More::is_deeply($got, $expect, $it_should);
37+
my $got;
38+
if (my $err = YATT::Lite::Util::catch {
39+
$got = $self->[0]->call($psgi);
40+
}) {
41+
Test::More::fail("$it_should: $err");
42+
} else {
43+
Test::More::is_deeply($got, $expect, $it_should);
44+
}
3945
}
4046
}
4147

@@ -130,7 +136,7 @@ END
130136
};
131137

132138
TODO:
133-
$TEST_TODO
139+
($has_index or $TEST_TODO)
134140
and
135141
subtest "Action in .htyattrc.pl", sub {
136142
local $TODO = $TEST_TODO ? undef : "Not yet solved";

0 commit comments

Comments
 (0)