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 :: Int | ||||||
| ghcVersion = read cProjectVersionInt | ghcVersion = read cProjectVersionInt | ||||||
| 
 | 
 | ||||||
| unconfigure :: IO () |  | ||||||
| unconfigure = do |  | ||||||
|   removeFile cabalConfigPath `catch` (\(_ :: SomeException) ->  return ()) |  | ||||||
| 
 |  | ||||||
| around' a f = a >> f >> a |  | ||||||
| 
 |  | ||||||
| spec :: Spec | spec :: Spec | ||||||
| spec = do | spec = do | ||||||
|     describe "parseCabalFile" $ do |     describe "parseCabalFile" $ do | ||||||
| @ -69,8 +63,7 @@ spec = do | |||||||
| 
 | 
 | ||||||
|     describe "cabalGetConfig" $ do |     describe "cabalGetConfig" $ do | ||||||
|         it "can reconfigure a cabal package" $ do |         it "can reconfigure a cabal package" $ do | ||||||
|             withDirectory_ "test/data/check-test-subdir" |             withDirectory_ "test/data/check-test-subdir" $ do | ||||||
|               $ around' unconfigure $ do |  | ||||||
|                 cradle <- findCradle |                 cradle <- findCradle | ||||||
|                 cfg <- cabalGetConfig cradle |                 cfg <- cabalGetConfig cradle | ||||||
|                 cfg `shouldSatisfy` not . null |                 cfg `shouldSatisfy` not . null | ||||||
|  | |||||||
| @ -16,4 +16,5 @@ main = do | |||||||
|       genGhcPkgCache dir = system $ "ghc-pkg recache --force -f" ++ dir |       genGhcPkgCache dir = system $ "ghc-pkg recache --force -f" ++ dir | ||||||
|   genSandboxCfg `mapM_` sandboxes |   genSandboxCfg `mapM_` sandboxes | ||||||
|   genGhcPkgCache `mapM_` pkgDirs |   genGhcPkgCache `mapM_` pkgDirs | ||||||
|  |   system "find test -name setup-config -exec rm {} \\;" | ||||||
|   hspec spec |   hspec spec | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Daniel Gröber
						Daniel Gröber