Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
borsboom committed Nov 30, 2015
1 parent 8c02285 commit 159c10a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/test/Stack/BuildPlanSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ main = hspec spec
spec :: Spec
spec = beforeAll setup $ afterAll teardown $ do
let logLevel = LevelDebug
let loadConfig' m = runStackLoggingT m logLevel False False (loadConfig mempty Nothing)
let loadConfig' m = runStackLoggingT m logLevel False False (loadConfig mempty Nothing Nothing)
let loadBuildConfigRest m = runStackLoggingT m logLevel False False
let inTempDir action = do
currentDirectory <- getCurrentDirectory
Expand All @@ -54,7 +54,7 @@ spec = beforeAll setup $ afterAll teardown $ do
-- github still depends on failure.
writeFile "stack.yaml" "resolver: lts-2.9"
LoadConfig{..} <- loadConfig' manager
bconfig <- loadBuildConfigRest manager (lcLoadBuildConfig Nothing Nothing)
bconfig <- loadBuildConfigRest manager (lcLoadBuildConfig Nothing)
runStackT manager logLevel bconfig False False $ do
mbp <- loadMiniBuildPlan $ LTS 2 9
eres <- try $ resolveBuildPlan
Expand Down
8 changes: 4 additions & 4 deletions src/test/Stack/ConfigSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ spec = beforeAll setup $ afterAll teardown $ do


describe "loadConfig" $ do
let loadConfig' m = runStackLoggingT m logLevel False False (loadConfig mempty Nothing)
let loadConfig' m = runStackLoggingT m logLevel False False (loadConfig mempty Nothing Nothing)
let loadBuildConfigRest m = runStackLoggingT m logLevel False False
-- TODO(danburton): make sure parent dirs also don't have config file
it "works even if no config file exists" $ \T{..} -> example $ do
Expand All @@ -82,7 +82,7 @@ spec = beforeAll setup $ afterAll teardown $ do
setCurrentDirectory childDir
LoadConfig{..} <- loadConfig' manager
bc@BuildConfig{..} <- loadBuildConfigRest manager
(lcLoadBuildConfig Nothing Nothing)
(lcLoadBuildConfig Nothing)
bcRoot bc `shouldBe` parentDir

it "respects the STACK_YAML env variable" $ \T{..} -> inTempDir $ do
Expand All @@ -92,7 +92,7 @@ spec = beforeAll setup $ afterAll teardown $ do
withEnvVar "STACK_YAML" stackYamlFp $ do
LoadConfig{..} <- loadConfig' manager
BuildConfig{..} <- loadBuildConfigRest manager
(lcLoadBuildConfig Nothing Nothing)
(lcLoadBuildConfig Nothing)
bcStackYaml `shouldBe` dir </> stackDotYaml
parent bcStackYaml `shouldBe` dir

Expand All @@ -106,5 +106,5 @@ spec = beforeAll setup $ afterAll teardown $ do
withEnvVar "STACK_YAML" (toFilePath yamlRel) $ do
LoadConfig{..} <- loadConfig' manager
BuildConfig{..} <- loadBuildConfigRest manager
(lcLoadBuildConfig Nothing Nothing)
(lcLoadBuildConfig Nothing)
bcStackYaml `shouldBe` yamlAbs

0 comments on commit 159c10a

Please sign in to comment.