diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,5 +1,9 @@
 # ChangeLog for githash
 
+## 0.1.3.2
+
+* Test suite works outside of a Git repo [#12](https://github.com/snoyberg/githash/issues/12)
+
 ## 0.1.3.1
 
 * Clean up some warnings (addresses [fpco/optparse-simple#11](https://github.com/fpco/optparse-simple/issues/11))
diff --git a/githash.cabal b/githash.cabal
--- a/githash.cabal
+++ b/githash.cabal
@@ -1,13 +1,13 @@
 cabal-version: 1.12
 
--- This file has been generated from package.yaml by hpack version 0.31.1.
+-- This file has been generated from package.yaml by hpack version 0.31.2.
 --
 -- see: https://github.com/sol/hpack
 --
--- hash: e259226f20bb47090315089e5ac66234ed83b30d011b5f6dc29b4f74f8134b58
+-- hash: f6bf56388f86c4e1f54aad7088b785d703df1b2563a22a762004688b69a0048f
 
 name:           githash
-version:        0.1.3.1
+version:        0.1.3.2
 synopsis:       Compile git revision info into Haskell projects
 description:    Please see the README and documentation at <https://www.stackage.org/package/githash>
 category:       Development
diff --git a/test/GitHashSpec.hs b/test/GitHashSpec.hs
--- a/test/GitHashSpec.hs
+++ b/test/GitHashSpec.hs
@@ -4,15 +4,21 @@
   ) where
 
 import GitHash
+import System.Directory (doesDirectoryExist)
 import Test.Hspec
 
 spec :: Spec
 spec = do
   describe "tGitInfoCwd" $ do
     it "makes vaguely sane git info for this repository" $ do
-        let gi = $$tGitInfoCwd
-        length (giHash gi)`shouldNotBe` 128
-        giBranch gi `shouldNotBe` []
-        seq (giDirty gi) () `shouldBe` ()
-        giCommitDate gi `shouldNotBe` []
-        giCommitCount gi `shouldSatisfy` (>= 1)
+        let egi = $$tGitInfoCwdTry
+        gitDirExists <- doesDirectoryExist ".git"
+        case egi of
+          Left _ -> gitDirExists `shouldBe` False
+          Right gi -> do
+            -- Doesn't work with cabal gitDirExists `shouldBe` True
+            length (giHash gi)`shouldNotBe` 128
+            giBranch gi `shouldNotBe` []
+            seq (giDirty gi) () `shouldBe` ()
+            giCommitDate gi `shouldNotBe` []
+            giCommitCount gi `shouldSatisfy` (>= 1)
diff --git a/test/NormalRepoSpec.hs b/test/NormalRepoSpec.hs
--- a/test/NormalRepoSpec.hs
+++ b/test/NormalRepoSpec.hs
@@ -5,7 +5,6 @@
     ( spec
     ) where
 
-import Control.Exception
 import Control.Monad
 import qualified Data.ByteString as SB
 import GitHash
diff --git a/test/RepoWithASubmoduleSpec.hs b/test/RepoWithASubmoduleSpec.hs
--- a/test/RepoWithASubmoduleSpec.hs
+++ b/test/RepoWithASubmoduleSpec.hs
@@ -5,7 +5,6 @@
     ( spec
     ) where
 
-import Control.Exception
 import Control.Monad
 import qualified Data.ByteString as SB
 import GitHash
