diff --git a/default.nix b/default.nix index 47212a6..e159ff1 100644 --- a/default.nix +++ b/default.nix @@ -38,11 +38,6 @@ resholve.mkDerivation { checkPhase = '' runHook preCheck shellcheck bin/git-check-assertions test/git-check-assertions.bats - git init - git config user.email test - git config user.name test - git checkout -b main - git commit --allow-empty -m "initial" ./test/git-check-assertions.bats runHook postCheck ''; diff --git a/test/git-check-assertions.bats b/test/git-check-assertions.bats index 8de6cf7..f4b27e8 100755 --- a/test/git-check-assertions.bats +++ b/test/git-check-assertions.bats @@ -6,9 +6,15 @@ setup() { DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )" PATH="$DIR/../bin:$PATH" + + git init + git config user.email "john.doe@example.com" + git config user.name "John Doe" + git checkout -b main } @test "can run" { + git commit --allow-empty -m "Initial" run git-check-assertions assert_success }