Remove test/*/setup-config before spec
This commit is contained in:
parent
7b98cb0e85
commit
96a54d2148
@ -19,12 +19,6 @@ import Config (cProjectVersionInt) -- ghc version
|
||||
ghcVersion :: Int
|
||||
ghcVersion = read cProjectVersionInt
|
||||
|
||||
unconfigure :: IO ()
|
||||
unconfigure = do
|
||||
removeFile cabalConfigPath `catch` (\(_ :: SomeException) -> return ())
|
||||
|
||||
around' a f = a >> f >> a
|
||||
|
||||
spec :: Spec
|
||||
spec = do
|
||||
describe "parseCabalFile" $ do
|
||||
@ -69,8 +63,7 @@ spec = do
|
||||
|
||||
describe "cabalGetConfig" $ do
|
||||
it "can reconfigure a cabal package" $ do
|
||||
withDirectory_ "test/data/check-test-subdir"
|
||||
$ around' unconfigure $ do
|
||||
withDirectory_ "test/data/check-test-subdir" $ do
|
||||
cradle <- findCradle
|
||||
cfg <- cabalGetConfig cradle
|
||||
cfg `shouldSatisfy` not . null
|
||||
|
@ -16,4 +16,5 @@ main = do
|
||||
genGhcPkgCache dir = system $ "ghc-pkg recache --force -f" ++ dir
|
||||
genSandboxCfg `mapM_` sandboxes
|
||||
genGhcPkgCache `mapM_` pkgDirs
|
||||
system "find test -name setup-config -exec rm {} \\;"
|
||||
hspec spec
|
||||
|
Loading…
Reference in New Issue
Block a user