@@ -15,6 +15,7 @@ import qualified Test.HUnit as H
16import Hakyll.Core.Identifier
16import Hakyll.Core.Identifier
17import Hakyll.Core.Store
17import Hakyll.Core.Store
19tests :: [Test]
20tests :: [Test]
@@ -28,7 +29,7 @@ simpleSetGet = monadicIO $ do
28 identifier <- parseIdentifier . unFileName <$> pick arbitrary
29 identifier <- parseIdentifier . unFileName <$> pick arbitrary
29 FileName name <- pick arbitrary
30 FileName name <- pick arbitrary
30 value <- pick arbitrary
31 value <- pick arbitrary
31− store <- run $ makeStore "_store"
32+ store <- run $ makeStoreTest
32 run $ storeSet store name identifier (value :: String)
33 run $ storeSet store name identifier (value :: String)
33 value' <- run $ storeGet store name identifier
34 value' <- run $ storeGet store name identifier
34 assert $ Found value == value'
35 assert $ Found value == value'
@@ -38,16 +39,16 @@ persistentSetGet = monadicIO $ do
38 identifier <- parseIdentifier . unFileName <$> pick arbitrary
39 identifier <- parseIdentifier . unFileName <$> pick arbitrary
39 FileName name <- pick arbitrary
40 FileName name <- pick arbitrary
40 value <- pick arbitrary
41 value <- pick arbitrary
41− store1 <- run $ makeStore "_store"
42+ store1 <- run $ makeStoreTest
42 run $ storeSet store1 name identifier (value :: String)
43 run $ storeSet store1 name identifier (value :: String)
43 -- Now Create another store from the same dir to test persistence
44 -- Now Create another store from the same dir to test persistence
44− store2 <- run $ makeStore "_store"
45+ store2 <- run $ makeStoreTest
45 value' <- run $ storeGet store2 name identifier
46 value' <- run $ storeGet store2 name identifier
46 assert $ Found value == value'
47 assert $ Found value == value'
48wrongType :: H.Assertion
49wrongType :: H.Assertion
49wrongType = do
50wrongType = do
50− store <- makeStore "_store"
51+ store <- makeStoreTest
51 -- Store a string and try to fetch an int
52 -- Store a string and try to fetch an int
52 storeSet store "foo" "bar" ("qux" :: String)
53 storeSet store "foo" "bar" ("qux" :: String)
53 value <- storeGet store "foo" "bar" :: IO (StoreGet Int)
54 value <- storeGet store "foo" "bar" :: IO (StoreGet Int)