Fix findCabalFile

This commit is contained in:
Daniel Gröber
2014-11-03 00:45:27 +01:00
parent 506cf18885
commit 9a8a3651d0
4 changed files with 16 additions and 11 deletions

View File

@@ -33,3 +33,10 @@ spec = do
describe "getCabalFiles" $ do
it "doesn't think $HOME/.cabal is a cabal file" $ do
(getCabalFiles =<< getEnv "HOME") `shouldReturn` []
describe "findCabalFile" $ do
it "works" $ do
findCabalFile "test/data" `shouldReturn` Just "test/data/cabalapi.cabal"
it "finds cabal files in parent directories" $ do
findCabalFile "test/data/subdir1/subdir2" `shouldReturn` Just "test/data/cabalapi.cabal"