Fixes for hspec 1.0
This commit is contained in:
parent
a8b06e0e9a
commit
d624cb744b
@ -90,7 +90,7 @@ import qualified Data.Text.Lazy as TL
|
|||||||
import Data.Text.Lazy.Encoding (encodeUtf8, decodeUtf8)
|
import Data.Text.Lazy.Encoding (encodeUtf8, decodeUtf8)
|
||||||
|
|
||||||
-- | The state used in 'describe' to build a list of specs
|
-- | 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.
|
-- | The specs state monad is where 'describe' runs.
|
||||||
type Specs = ST.StateT SpecsData IO ()
|
type Specs = ST.StateT SpecsData IO ()
|
||||||
@ -144,7 +144,7 @@ describe :: String -> Specs -> Specs
|
|||||||
describe label action = do
|
describe label action = do
|
||||||
sData <- ST.get
|
sData <- ST.get
|
||||||
SpecsData app conn specs <- liftIO $ ST.execStateT action sData
|
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.
|
-- | Describe a single test that keeps cookies, and a reference to the last response.
|
||||||
it :: String -> OneSpec () -> Specs
|
it :: String -> OneSpec () -> Specs
|
||||||
@ -153,7 +153,7 @@ it label action = do
|
|||||||
let spec = Core.it label $ do
|
let spec = Core.it label $ do
|
||||||
_ <- ST.execStateT action $ OneSpecData app conn "" Nothing
|
_ <- ST.execStateT action $ OneSpecData app conn "" Nothing
|
||||||
return ()
|
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
|
-- Performs a given action using the last response. Use this to create
|
||||||
-- response-level assertions
|
-- response-level assertions
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod-test
|
name: yesod-test
|
||||||
version: 0.2.0.3
|
version: 0.2.0.4
|
||||||
license: MIT
|
license: MIT
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Nubis <nubis@woobiz.com.ar>
|
author: Nubis <nubis@woobiz.com.ar>
|
||||||
@ -29,7 +29,7 @@ library
|
|||||||
, network >= 2.2 && < 2.4
|
, network >= 2.2 && < 2.4
|
||||||
, http-types >= 0.6 && < 0.7
|
, http-types >= 0.6 && < 0.7
|
||||||
, HUnit >= 1.2 && < 1.3
|
, HUnit >= 1.2 && < 1.3
|
||||||
, hspec >= 0.9 && < 1.1
|
, hspec >= 1.0 && < 1.1
|
||||||
, bytestring >= 0.9
|
, bytestring >= 0.9
|
||||||
, case-insensitive >= 0.2
|
, case-insensitive >= 0.2
|
||||||
, text
|
, text
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user