-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speed up test execution by skipping brew in tests
- Loading branch information
Tom Scott
committed
May 30, 2015
1 parent
f67152c
commit 4ca81c8
Showing
2 changed files
with
11 additions
and
12 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,21 +1,16 @@ | ||
#!/usr/bin/env bats | ||
|
||
setup() { | ||
mkdir $PWD/tmp | ||
} | ||
|
||
teardown() { | ||
rm -rf $PWD/tmp | ||
export SKIP_BREW='true' | ||
} | ||
|
||
@test "initialize a git repo in the home dir" { | ||
export HOME="$PWD/tmp" | ||
./bin/homer init | ||
./bin/homer init $BATS_TMPDIR/home | ||
} | ||
|
||
@test "print an error and exit if git repo already exists" { | ||
export HOME=$PWD/tmp | ||
mkdir -p $PWD/tmp/.git/ | ||
touch $PWD/tmp/.git/ORIG_HEAD | ||
./bin/homer init | ||
mkdir -p $BATS_TMPDIR/home/.git | ||
touch $BATS_TMPDIR/home/.git/ORIG_HEAD | ||
|
||
./bin/homer init $BATS_TMPDIR/home | ||
} |