From d624cb744be42651af91e121a4bd0c4b83002a0d Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 25 Apr 2012 12:02:27 +0300 Subject: [PATCH] Fixes for hspec 1.0 --- yesod-test/Yesod/Test.hs | 6 +++--- yesod-test/yesod-test.cabal | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/yesod-test/Yesod/Test.hs b/yesod-test/Yesod/Test.hs index 642010b5..a2f25d23 100644 --- a/yesod-test/Yesod/Test.hs +++ b/yesod-test/Yesod/Test.hs @@ -90,7 +90,7 @@ import qualified Data.Text.Lazy as TL import Data.Text.Lazy.Encoding (encodeUtf8, decodeUtf8) -- | The state used in 'describe' to build a list of specs -data SpecsData = SpecsData Application ConnectionPool [Core.Spec] +data SpecsData = SpecsData Application ConnectionPool [Core.Spec Core.AnyExample] -- | The specs state monad is where 'describe' runs. type Specs = ST.StateT SpecsData IO () @@ -144,7 +144,7 @@ describe :: String -> Specs -> Specs describe label action = do sData <- ST.get SpecsData app conn specs <- liftIO $ ST.execStateT action sData - ST.put $ SpecsData app conn (Core.describe label [specs]) + ST.put $ SpecsData app conn [Core.describe label specs] -- | Describe a single test that keeps cookies, and a reference to the last response. it :: String -> OneSpec () -> Specs @@ -153,7 +153,7 @@ it label action = do let spec = Core.it label $ do _ <- ST.execStateT action $ OneSpecData app conn "" Nothing return () - ST.put $ SpecsData app conn (specs++spec) + ST.put $ SpecsData app conn $ spec : specs -- Performs a given action using the last response. Use this to create -- response-level assertions diff --git a/yesod-test/yesod-test.cabal b/yesod-test/yesod-test.cabal index 3964bfab..e9697a5c 100644 --- a/yesod-test/yesod-test.cabal +++ b/yesod-test/yesod-test.cabal @@ -1,5 +1,5 @@ name: yesod-test -version: 0.2.0.3 +version: 0.2.0.4 license: MIT license-file: LICENSE author: Nubis @@ -29,7 +29,7 @@ library , network >= 2.2 && < 2.4 , http-types >= 0.6 && < 0.7 , HUnit >= 1.2 && < 1.3 - , hspec >= 0.9 && < 1.1 + , hspec >= 1.0 && < 1.1 , bytestring >= 0.9 , case-insensitive >= 0.2 , text