diff options
author | Jasper Van der Jeugt <m@jaspervdj.be> | 2013-01-06 18:33:00 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2013-01-06 18:33:00 +0100 |
commit | bbc2631c76db01e85ac5c4e75b1babb6c5b05697 (patch) | |
tree | 331dda3a0f45efee866db2a03fb5aa2858e826a8 /tests/Hakyll/Core/Runtime | |
parent | e477ea753b59657ba8d185986c646cc45c66fcec (diff) | |
download | hakyll-bbc2631c76db01e85ac5c4e75b1babb6c5b05697.tar.gz |
Add TmpFile utilities
Diffstat (limited to 'tests/Hakyll/Core/Runtime')
-rw-r--r-- | tests/Hakyll/Core/Runtime/Tests.hs | 11 |
1 files changed, 7 insertions, 4 deletions
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 @?= ["<p>This is an example.</p>"] - bodies <- readFile $ destinationDirectory config </> "bodies.txt" + bodies <- readFile $ destinationDirectory testConfiguration </> "bodies.txt" head (lines bodies) @?= "This is an example." + + cleanTestEnv |