Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Commit

Permalink
Test cabal and stack exec are accesible
Browse files Browse the repository at this point in the history
  • Loading branch information
jneira committed Jan 21, 2020
1 parent 16ce3d2 commit af53509
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/unit/CabalHelperSpec.hs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{-# LANGUAGE OverloadedStrings #-}
module CabalHelperSpec where

import Data.Maybe (isJust)
import Haskell.Ide.Engine.Cradle
import Test.Hspec
import System.FilePath
import System.Directory (getCurrentDirectory, removeFile)
import System.Directory (findExecutable, getCurrentDirectory, removeFile)
import TestUtils

rootPath :: FilePath -> FilePath
Expand All @@ -27,6 +28,13 @@ simpleStackPath cwd = rootPath cwd </> "simple-stack"

spec :: Spec
spec = beforeAll_ setupStackFiles $ do
describe "stack and cabal executables should be accesible" $ do
it "cabal is accesible" $ do
stack <- findExecutable "cabal"
stack `shouldSatisfy` isJust
it "stack is accesible" $ do
cabal <- findExecutable "stack"
cabal `shouldSatisfy` isJust
describe "cabal-helper spec" $ do
describe "find cabal entry point spec" findCabalHelperEntryPointSpec
describe "cradle discovery" cabalHelperCradleSpec
Expand Down

0 comments on commit af53509

Please sign in to comment.