Skip to content

Preserve return value of with-doubles body#23

Open
fredZen wants to merge 1 commit intoGreenPowerMonitor:masterfrom
fredZen:master
Open

Preserve return value of with-doubles body#23
fredZen wants to merge 1 commit intoGreenPowerMonitor:masterfrom
fredZen:master

Conversation

@fredZen
Copy link

@fredZen fredZen commented Sep 29, 2021

Hi,

thanks for writing test-doubles. I'm surprised it isn't the number one result when searching for "clojure mock", it beats all the alternatives I've found.

This pull requests adds support for putting with-doubles inside the assertion rather than the other way around. Would you be interested in it? There are situations where I find this convenient, especially when using metosin's test-it:

(facts "about my function"
  (with-doubles ....) => some-result
  (with-doubles ...) => some-other-result)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant