yesod-test 1.6.3 → 1.6.4
raw patch · 3 files changed
+20/−4 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Yesod.Test: yesodSpecWithSiteGeneratorAndArgument :: YesodDispatch site => (a -> IO site) -> YesodSpec site -> SpecWith a
Files
- ChangeLog.md +4/−0
- Yesod/Test.hs +15/−3
- yesod-test.cabal +1/−1
ChangeLog.md view
@@ -1,3 +1,7 @@+## 1.6.4+Add yesodSpecWithSiteGeneratorAndArgument+[#1485](https://github.com/yesodweb/yesod/pull/1485)+ ## 1.6.3 Add performMethod [#1502](https://github.com/yesodweb/yesod/pull/1502)
Yesod/Test.hs view
@@ -34,6 +34,7 @@ yesodSpec , YesodSpec , yesodSpecWithSiteGenerator+ , yesodSpecWithSiteGeneratorAndArgument , yesodSpecApp , YesodExample , YesodExampleData(..)@@ -274,12 +275,23 @@ => IO site -> YesodSpec site -> Hspec.Spec-yesodSpecWithSiteGenerator getSiteAction yspecs =+yesodSpecWithSiteGenerator getSiteAction =+ yesodSpecWithSiteGeneratorAndArgument (const getSiteAction)++-- | Same as yesodSpecWithSiteGenerator, but also takes an argument to build the site+-- and makes that argument available to the tests.+--+-- @since 1.6.4+yesodSpecWithSiteGeneratorAndArgument :: YesodDispatch site+ => (a -> IO site)+ -> YesodSpec site+ -> Hspec.SpecWith a+yesodSpecWithSiteGeneratorAndArgument getSiteAction yspecs = Hspec.fromSpecList $ map (unYesod getSiteAction) $ execWriter yspecs where unYesod getSiteAction' (YesodSpecGroup x y) = Hspec.specGroup x $ map (unYesod getSiteAction') y- unYesod getSiteAction' (YesodSpecItem x y) = Hspec.specItem x $ do- site <- getSiteAction'+ unYesod getSiteAction' (YesodSpecItem x y) = Hspec.specItem x $ \a -> do+ site <- getSiteAction' a app <- toWaiAppPlain site evalSIO y YesodExampleData { yedApp = app
yesod-test.cabal view
@@ -1,5 +1,5 @@ name: yesod-test-version: 1.6.3+version: 1.6.4 license: MIT license-file: LICENSE author: Nubis <nubis@woobiz.com.ar>