File: PathsSpec.hs

package info (click to toggle)
haskell-doctest 0.24.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 708 kB
  • sloc: haskell: 3,428; ansic: 3; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 591 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module Cabal.PathsSpec (spec) where

import           Imports

import           Test.Hspec

import           System.Directory

import           Cabal ()
import           Cabal.Paths

spec :: Spec
spec = do
  describe "paths" $ do
    it "returns the path to 'ghc'" $ do
      (paths "cabal" [] >>= doesFileExist . ghc) `shouldReturn` True

    it "returns the path to 'ghc-pkg'" $ do
      (paths "cabal" [] >>= doesFileExist . ghcPkg) `shouldReturn` True

    it "returns the path to Cabal's cache directory" $ do
      (paths "cabal" [] >>= doesDirectoryExist . cache) `shouldReturn` True