Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add installing software from a Brewfile
- Loading branch information
Showing
6 changed files
with
62 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Brewfile.lock.json | ||
tests/alternate-brewfile.lock.json |
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
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# already installed | ||
brew 'bats-core' | ||
|
||
# to be installed (obviously this could break if gimme | ||
# is ever actually deliberately installed) | ||
brew 'gimme' |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
bold=$'\e'[1m | ||
magenta=$'\e'[35m | ||
reset=$'\e'[0m | ||
|
||
@test brewfile { | ||
run ./kitout.sh tests/brewfile.kitfile | ||
echo "$output" | ||
[ "${lines[1]}" == "Using bats-core" ] | ||
[ "${lines[4]}" == "Using bats-core" ] | ||
[ "${lines[5]}" == "Installing gimme" ] | ||
[ "${lines[7]}" == "${bold}${magenta}*** brewfile 'i-dont-exist' does not exist${reset}" ] | ||
[ $status -eq 1 ] | ||
} | ||
|
||
function setup_file { | ||
brew update | ||
teardown | ||
} | ||
|
||
function teardown { | ||
brew uninstall --force gimme | ||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
brewfile | ||
brewfile tests/alternate-brewfile | ||
brewfile i-dont-exist |