Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

adds support for accepting any value in mocked functions #1

Merged
merged 1 commit into from
Jul 5, 2016

Conversation

mcfunley
Copy link
Contributor

@mcfunley mcfunley commented Jul 5, 2016

Not sure if you'll like this or not, but here's support for mocking with "any" placeholders in argument slots. e.g.

(mock! #'foo {[:x :y] 1 [:z :mocko.core/any] 2})

The any keyword is namespaced to avoid mass hysteria. This required adding an assertion to mock! to make sure that you're not accidentally creating ambiguous cases, e.g.

;; both of these cases match, so this throws an exception
(mock! #'foo {[:x :y] 1 [:x :mocko.core/any] 2})

@codahale codahale merged commit e51a970 into codahale:master Jul 5, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants