- Allow spying on multiple protocols #34
- Change Clojure and ClojureScript dependencies to be provided.
- Support mocking multiple protocols via
protocol/mock
- Support mocking a single protocol via
protocol/mock
- Made
protocol/protocol-methods
private
- Fixed a regression where
cljs
files were not included in the release jar.
assert-expr
implementation forspy.core/call-matching?
.
- Miscellaneous improvements and bugfixes in Clojure and ClojureScript
assert-expr
implementations. - Modernized ClojureScript build with
shadow-cljs
.
- Rich assertions for Clojure and ClojureScript, you can now require
spy.test
to register spy functions withclojure.test/assert-expr
resulting in better error messages. This can be used instead ofspy.assert
which will likely be deprecated in the longer term in favour ofassert-expr
.
- Rewrite of
spy.protocol/spy
to work as a spy, the previous implementation was not really a spy as it didn't proxy to a real implementation. You now need to provide a protocol and an implementation of the protocol to spy on.
- Accidental release (actually
2.0.0
)
- Added
called-n-times-with?
- Added
call-matching?
so users can provide their own matchingfn
.
- Simplified the way spies are created for Protocols, now using
reify
instead ofdefrecord
. This introduces a breaking change as spies are now added to the reified object as metadata so must be extracted before assertions can happen on them, see the README or tests for an example.
- Assert ns with macros for Clojure and fns for ClojureScript
- Project restructured but API remains the same
- Support for spying on Protocols (Clojure only - no ClojureScript support yet).
- spy.core functions providing basic stubbing / spying functionality and checker functions returning booleans.