dashbitco / mox

Mocks and explicit contracts in Elixir
1.35k stars 77 forks source link

Allow expect/4 to assert function not called #35

Closed NikitaAvvakumov closed 6 years ago

NikitaAvvakumov commented 6 years ago

Change guard clause for expect/4 to verify that n>=0. This allows expect to explicitly assert that a function was not called. Addresses #32.

josevalim commented 6 years ago

:heart: :green_heart: :blue_heart: :yellow_heart: :purple_heart:

idlehands commented 6 years ago

I'm excited to see this! Right now, I've been stubbing with a raise in the stub but I think this will be more clear to anyone reading the tests. @josevalim between this and stub_with, I couldn't be more excited about a new release. Any idea when the next release gets cut? Is there anything I can do to help make that happen?

josevalim commented 6 years ago

I will do it later today. :)

josevalim commented 6 years ago

Done!

idlehands commented 6 years ago

@josevalim thank you! Andrea is now trying to take credit for making this happen. 😂