circleci / bond

spying for tests
128 stars 28 forks source link

Allow use of maps in with-stub #1

Closed glenjamin closed 9 years ago

glenjamin commented 11 years ago

As discussed on IRC, I'm pretty new to clojure so I may have screwed up the style.

I've added test-cases, and hopefully managed to keep this pretty tidy.

arohner commented 11 years ago

This doesn't seem significantly more useful that (with-redefs [foo (constantly 1)]). What's the usecase?

glenjamin commented 11 years ago

It's equivalent to with-redefs followed by with with-spy - but just reduces clutter in tests a bit.

marcomorain commented 9 years ago

@glenjamin looks like the target branch has changed significantly from the original PR description. Feel free to re-open if you want me to look at this again.

glenjamin commented 9 years ago

No worries, I ended up doing a friendly fork - didn't even realise this was still open!

Are you still using bond much internally?

marcomorain commented 9 years ago

Are you still using bond much internally?

Yup, a lot of our unit tests use it. I find it great for cases where it would be a lot of work to inject a dependency.