diff options
author | Jasper Van der Jeugt <m@jaspervdj.be> | 2013-02-16 12:59:38 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2013-02-16 12:59:38 +0100 |
commit | 1c2804287a099b4ac2f6c2d9b3db452f7ef7bee1 (patch) | |
tree | d5069a5124c734fb105f50821c357652e5e9dd61 /tests/Hakyll/Core/Rules | |
parent | 02a92d54cdee8299aac0f55cbe4a930ac5060d20 (diff) | |
download | hakyll-1c2804287a099b4ac2f6c2d9b3db452f7ef7bee1.tar.gz |
Add a test for compiler/route ordering
Diffstat (limited to 'tests/Hakyll/Core/Rules')
-rw-r--r-- | tests/Hakyll/Core/Rules/Tests.hs | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/tests/Hakyll/Core/Rules/Tests.hs b/tests/Hakyll/Core/Rules/Tests.hs index ee12010..47d3b3b 100644 --- a/tests/Hakyll/Core/Rules/Tests.hs +++ b/tests/Hakyll/Core/Rules/Tests.hs @@ -10,7 +10,6 @@ import Data.IORef (IORef, newIORef, readIORef, writeIORef) import qualified Data.Set as S import Test.Framework (Test, testGroup) -import Test.Framework.Providers.HUnit (testCase) import Test.HUnit (Assertion, assert, (@=?)) @@ -28,18 +27,17 @@ import TestSuite.Util -------------------------------------------------------------------------------- tests :: Test -tests = testGroup "Hakyll.Core.Rules.Tests" - [ testCase "runRules" rulesTest - ] +tests = testGroup "Hakyll.Core.Rules.Tests" $ fromAssertions "runRules" + [case01] -------------------------------------------------------------------------------- -rulesTest :: Assertion -rulesTest = do +case01 :: Assertion +case01 = do ioref <- newIORef False store <- newTestStore provider <- newTestProvider store - ruleSet <- runRules (rules ioref) provider + ruleSet <- runRules (rules01 ioref) provider let identifiers = S.fromList $ map fst $ rulesCompilers ruleSet routes = rulesRoutes ruleSet @@ -64,8 +62,8 @@ rulesTest = do -------------------------------------------------------------------------------- -rules :: IORef Bool -> Rules () -rules ioref = do +rules01 :: IORef Bool -> Rules () +rules01 ioref = do -- Compile some posts match "*.md" $ do route $ setExtension "html" |