opam-version: "2.0"
maintainer: "Etienne Millon <etienne@cryptosense.com>"
authors: "Etienne Millon <etienne@cryptosense.com>"
homepage: "https://github.com/cryptosense/ocaml-mock"
bug-reports: "https://github.com/cryptosense/ocaml-mock/issues"
license: "BSD-2-Clause"
dev-repo: "git+https://github.com/cryptosense/ocaml-mock.git"
doc: "https://cryptosense.github.io/ocaml-mock/doc"
build: [
  [ "jbuilder" "subst" "-p" name ] {pinned}
  [ "jbuilder" "build" "-p" name "-j" jobs ]
]
depends: [
  "ocaml"
  "jbuilder" {>= "1.0+beta10"}
]
synopsis: "Configurable functions to test impure code"
description: """
This package provides "mocks", fake functions that can be configured to return
values or raise exception. It is possible to inspect their arguments after their
execution. The API is greatly inspired by [unittest.mock] in Python.

There is no magic under the hood, it is "just" a reference to a function, but
it makes it possible to have pleasant output like this in your tests:

> expected f to be called once, but it was called 3 times

A wrapper for `OUnit2` is available as `mock-ounit`.

[unittest.mock]: https://docs.python.org/3/library/unittest.mock.html"""
url {
  src:
    "https://github.com/cryptosense/ocaml-mock/releases/download/v0.1.0/mock-0.1.0.tbz"
  checksum: "md5=f5a6529d2df5aa1789846c902028cd1c"
}
