packages feed

mockcat-1.4.0.0: test/Test/MockCat/Readme/WithMockIOSpec.hs

module Test.MockCat.Readme.WithMockIOSpec (spec) where 

import Test.Hspec
import Test.MockCat

spec :: Spec
spec = do
  it "User Guide (withMockIO)" $ do
    withMockIO $ do
      f <- mock ("Hello" ~> True)
        `expects` called once

      let result = f "Hello"

      result `shouldBe` True