HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulehspec-contrib-0.5.2Haskell2010

Test.Hspec.Contrib.Mocks.V1

Synopsis
valuestubAction :: HasCallStack => [a] -> IO (IO a)

Create a test stub action.

Example5 expressions
stub <- stubAction ["foo", "bar", "baz"]stub"foo"stub"bar"stub"baz"stub*** Exception: HUnitFailure ...stubAction: no values left...
valuewithSpy :: ((a -> IO ()) -> IO ()) -> IO [a]

Create a test spy action.

Record any arguments that are passed to that action.

Example1 expression
withSpy $ \ spy -> spy "foo" >> spy "bar" >> spy "baz"["foo","bar","baz"]