Skip to content

Commit

Permalink
Update specs for new output behavior of pre-commit runner
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk committed Sep 9, 2016
1 parent 1a1d0aa commit 2c0e1a6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/pre_commit_test.sh
Expand Up @@ -20,6 +20,7 @@ removeAllTrace() {
runHook() {
cd test/tmp
run ../../quickhook hook pre-commit --no-color
cd ../..
}

HOOK_DIR=test/tmp/.quickhook/pre-commit
Expand All @@ -34,8 +35,9 @@ HOOK_DIR=test/tmp/.quickhook/pre-commit
runHook

[ "$status" -ne 0 ]
[ "${lines[0]}" = "fails:" ]
[ "${lines[0]}" = "fails: fail" ]
[ "${lines[1]}" = "failed" ]
[ "${lines[2]}" = "passes: ok" ]
}

@test "pre-commit passes if all hooks pass" {
Expand All @@ -48,5 +50,6 @@ HOOK_DIR=test/tmp/.quickhook/pre-commit
runHook

[ "$status" -eq 0 ]
[ "$output" = "" ]
[ "${lines[0]}" = "passes1: ok" ]
[ "${lines[1]}" = "passes2: ok" ]
}

0 comments on commit 2c0e1a6

Please sign in to comment.