error test for Cradle.

This commit is contained in:
Kazu Yamamoto 2013-03-05 10:49:32 +09:00
parent 39954d9114
commit 2a13e9b243

View File

@ -51,6 +51,10 @@ spec = do
, cradlePackageConf = Just "test/data/cabal-dev/packages-7.6.2.conf"
}
it "throws an error if the sandbox does not exist" $ do
withDirectory_ "/" $
findCradle (Just "/") "7.4.1" `shouldThrow` anyIOException
relativeCradle :: FilePath -> Cradle -> Cradle
relativeCradle dir cradle = Cradle {
cradleCurrentDir = toRelativeDir dir $ cradleCurrentDir cradle