hspec-core 2.8.1 → 2.8.2
raw patch · 3 files changed
+17/−2 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Test.Hspec.Core.Hooks: ignoreSubject :: SpecWith () -> SpecWith a
+ Test.Hspec.Core.Hooks: mapSubject :: (b -> a) -> SpecWith a -> SpecWith b
Files
- hspec-core.cabal +1/−1
- src/Test/Hspec/Core/Hooks.hs +15/−0
- version.yaml +1/−1
hspec-core.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: hspec-core-version: 2.8.1+version: 2.8.2 license: MIT license-file: LICENSE copyright: (c) 2011-2021 Simon Hengel,
src/Test/Hspec/Core/Hooks.hs view
@@ -19,6 +19,9 @@ , aroundAll , aroundAll_ , aroundAllWith++, mapSubject+, ignoreSubject ) where import Prelude ()@@ -166,3 +169,15 @@ waitFor :: BinarySemaphore -> IO () waitFor = takeMVar++-- | Modify the subject under test.+--+-- Note that this resembles a contravariant functor on the first type parameter+-- of `SpecM`. This is because the subject is passed inwards, as an argument+-- to the spec item.+mapSubject :: (b -> a) -> SpecWith a -> SpecWith b+mapSubject f = aroundWith (. f)++-- | Ignore the subject under test for a given spec.+ignoreSubject :: SpecWith () -> SpecWith a+ignoreSubject = mapSubject (const ())
version.yaml view
@@ -1,1 +1,1 @@-&version 2.8.1+&version 2.8.2