homepage: https://github.com/cjdev/monad-mock#readme
changelog-type: ''
hash: f59a192d417c973267c36d9abf6014c6d18a75ca279f2ff6de7b419275bd1ce0
test-bench-deps:
  base: -any
  hspec: -any
  monad-mock: -any
maintainer: Alexis King <lexi.lambda@gmail.com>
synopsis: A monad transformer for mocking mtl-style typeclasses
changelog: ''
basic-deps:
  exceptions: ! '>=0.6'
  base: ! '>=4.9.0.0 && <5'
  monad-control: ! '>=1.0.0.0 && <2'
  constraints: ! '>=0.3.1'
  mtl: -any
  transformers-base: -any
all-versions:
- '0.1.0.0'
author: Alexis King <lexi.lambda@gmail.com>
latest: '0.1.0.0'
description-type: markdown
description: ! "# monad-mock [![Build Status](https://travis-ci.org/cjdev/monad-mock.svg?branch=master)](https://travis-ci.org/cjdev/monad-mock)\n\n`monad-mock`
  is a Haskell package that provides a monad transformer to help create “mocks” of
  `mtl`-style typeclasses, intended for use in unit tests. A mock can be executed
  by providing a sequence of expected monadic calls and their results, and the mock
  will verify that the computation conforms to the expectation.\n\nFor example, imagine
  a `MonadFileSystem` typeclass, which describes a class of\nmonads that may perform
  filesystem operations:\n\n```haskell\nclass Monad m => MonadFileSystem m where\n
  \ readFile :: FilePath -> m String\n  writeFile :: FilePath -> String -> m ()\n```\n\nUsing
  `MockT`, it’s possible to test computations that use `MonadFileSystem`\nin a completely
  pure way:\n\n```haskell\ncopyFile :: MonadFileSystem m => FilePath -> FilePath ->
  m String\ncopyFile a b = do\n  x <- readFile a\n  writeFile b x\n  return x\n\nspec
  = describe \"copyFile\" $\n  it \"reads a file and writes its contents to another
  file\" $\n    evaluate $ copyFile \"foo.txt\" \"bar.txt\"\n      & runMockT [ ReadFile
  \"foo.txt\" :-> \"contents\"\n                 , WriteFile \"bar.txt\" \"contents\"
  :-> () ]\n```\n\nFor more information, [see the documentation on Hackage][monad-mock].\n\n[monad-mock]:
  https://hackage.haskell.org/package/monad-mock\n"
license-name: ISC

Update from Hackage at 2017-06-24T00:25:10Z
Update from Hackage at 2017-06-24T00:25:10Z
