From bbc2631c76db01e85ac5c4e75b1babb6c5b05697 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Sun, 6 Jan 2013 18:33:00 +0100 Subject: Add TmpFile utilities --- tests/Hakyll/Core/Runtime/Tests.hs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'tests/Hakyll/Core/Runtime') diff --git a/tests/Hakyll/Core/Runtime/Tests.hs b/tests/Hakyll/Core/Runtime/Tests.hs index 4b41bf5..c68d99e 100644 --- a/tests/Hakyll/Core/Runtime/Tests.hs +++ b/tests/Hakyll/Core/Runtime/Tests.hs @@ -25,8 +25,8 @@ tests = testGroup "Hakyll.Core.Runtime.Tests" $ fromAssertions "run" [case01] -------------------------------------------------------------------------------- case01 :: Assertion -case01 = withTestConfiguration $ \config -> do - _ <- run config Logger.Error $ do +case01 = do + _ <- run testConfiguration Logger.Error $ do match "*.md" $ do route $ setExtension "html" compile $ do @@ -40,8 +40,11 @@ case01 = withTestConfiguration $ \config -> do items <- loadAllSnapshots "*.md" "raw" makeItem $ concat $ map itemBody (items :: [Item String]) - example <- readFile $ destinationDirectory config "example.html" + example <- readFile $ + destinationDirectory testConfiguration "example.html" lines example @?= ["

This is an example.

"] - bodies <- readFile $ destinationDirectory config "bodies.txt" + bodies <- readFile $ destinationDirectory testConfiguration "bodies.txt" head (lines bodies) @?= "This is an example." + + cleanTestEnv -- cgit v1.2.3