-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup bats to use a locally compiled version of .ahoy.
- Loading branch information
Frank Carey
committed
Nov 21, 2016
1 parent
0479480
commit fdc5774
Showing
5 changed files
with
16 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
#!/usr/bin/env bats | ||
|
||
@test "get the version of ahoy with --version" { | ||
result="$(ahoy -f testdata/simple.ahoy.yml --version)" | ||
[ "$result" == "master" ] | ||
run ./ahoy -f testdata/simple.ahoy.yml --version | ||
[ $status -eq 0 ] | ||
[ "$result" == "2.0.0-alpha-23-g0479480" ] | ||
} | ||
|
||
@test "get help instead of running a command with --help" { | ||
result="$(ahoy -f testdata/simple.ahoy.yml --help echo something)" | ||
result="$(./ahoy -f testdata/simple.ahoy.yml --help echo something)" | ||
[ "$result" != "something" ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
#!/usr/bin/env bats | ||
|
||
@test "display help text when no arguments are passed." { | ||
run ./ahoy -f testdata/simple.ahoy.yml | ||
# Should throw an error. | ||
[ "${#lines[@]}" -gt 14 ] | ||
[ $status -eq 1 ] | ||
} | ||
|
||
@test "run a simple ahoy command: echo" { | ||
result="$(ahoy -f testdata/simple.ahoy.yml echo something)" | ||
result="$(./ahoy -f testdata/simple.ahoy.yml echo something)" | ||
[ "$result" == "something" ] | ||
} |
This file was deleted.
Oops, something went wrong.