packages feed

yesod-test 1.2.4 → 1.2.5

raw patch · 2 files changed

+23/−1 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Yesod.Test: yesodSpecApp :: YesodDispatch site => site -> IO Application -> YesodSpec site -> Spec

Files

Yesod/Test.hs view
@@ -28,6 +28,7 @@       yesodSpec     , YesodSpec     , yesodSpecWithSiteGenerator+    , yesodSpecApp     , YesodExample     , YesodExampleData(..)     , YesodSpecTree (..)@@ -228,6 +229,27 @@       unYesod getSiteAction' (YesodSpecItem x y) = Core.it x $ do         site <- getSiteAction'         app <- toWaiAppPlain site+        ST.evalStateT y YesodExampleData+            { yedApp = app+            , yedSite = site+            , yedCookies = M.empty+            , yedResponse = Nothing+            }++-- | Same as yesodSpec, but instead of taking a site it+-- takes an action which produces the 'Application' for each test.+-- This lets you use your middleware from makeApplication+yesodSpecApp :: YesodDispatch site+             => site+             -> IO Application+             -> YesodSpec site+             -> Hspec.Spec+yesodSpecApp site getApp yspecs =+    Core.fromSpecList $ map unYesod $ execWriter yspecs+  where+    unYesod (YesodSpecGroup x y) = Core.SpecGroup x $ map unYesod y+    unYesod (YesodSpecItem x y) = Core.it x $ do+        app <- getApp         ST.evalStateT y YesodExampleData             { yedApp = app             , yedSite = site
yesod-test.cabal view
@@ -1,5 +1,5 @@ name:               yesod-test-version:            1.2.4+version:            1.2.5 license:            MIT license-file:       LICENSE author:             Nubis <nubis@woobiz.com.ar>