Fixes for hspec 1.0

This commit is contained in:
Michael Snoyman 2012-04-25 12:02:27 +03:00
parent a8b06e0e9a
commit d624cb744b
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -1,5 +1,5 @@
name: yesod-test
version: 0.2.0.3
version: 0.2.0.4
license: MIT
license-file: LICENSE
author: Nubis <nubis@woobiz.com.ar>
@ -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