Skip to content

Commit

Permalink
Merge pull request #101 from JJ/master
Browse files Browse the repository at this point in the history
Fixed test error
  • Loading branch information
tokuhirom committed Dec 4, 2017
2 parents b1c9c23 + 2eb20f7 commit 7c1bca3
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .gitignore
@@ -1,3 +1,2 @@
/blib/
/lib/.precomp/
/t/lib/.precomp/
**/.precomp/
19 changes: 19 additions & 0 deletions README.md
Expand Up @@ -110,6 +110,25 @@ AUTHORS

* fayland

INSTALL AND TEST
================

Install dependencies with

zef install --deps-only .

And then test with

prove -Ilib --exec "perl6 -Ilib" -r t

(provided `prove` is installed via Perl5's `Test::Harness`)

Or better

zef test .

(this will use available test facilities, including the one above)

COPYRIGHT AND LICENSE
=====================

Expand Down
5 changes: 2 additions & 3 deletions lib/Crust/Middleware/Lint.pm6
Expand Up @@ -60,11 +60,10 @@ my sub validate-ret(@ret) {
unless @ret[1].isa(List) {
die "Headers needs to be an list: @ret[1]";
}

my $copy = @ret[1];

{
$copy.pairup();
our %this-copy = $copy;
%this-copy.pairup();
CATCH {
default {
die 'The number of response headers needs to be even, not odd(', $copy, ')';
Expand Down
4 changes: 2 additions & 2 deletions t/Crust-Middleware/lint.t
Expand Up @@ -111,7 +111,7 @@ subtest {
}
);
lives-ok({await $code(%env)});
}, 'Should works fine';
}, 'Should work fine';

subtest {
my $code = Crust::Middleware::Lint.new(
Expand All @@ -125,7 +125,7 @@ subtest {
sub (%env) { start { 'status!!', [], ['hello'] } }
);
dies-ok({await $code(%env)});
}, 'Should die because response has not numerical status code';
}, 'Should die because response has not got a numerical status code';

subtest {
my $code = Crust::Middleware::Lint.new(
Expand Down

0 comments on commit 7c1bca3

Please sign in to comment.