antonmi / espec

Elixir Behaviour Driven Development
Other
808 stars 62 forks source link

Allow asserting that a mock will be called within a timeout #282

Open jfornoff opened 5 years ago

jfornoff commented 5 years ago

It'd be nice to have the option to assert that a mocked function will be called in a defined timeout.

:meck.wait supports it pretty directly, should be a good fit to expect(mod) |> to(receive ...). Maybe something like expect(mod) |> to(receive ..., within: 500)?

antonmi commented 5 years ago

Hi @jfornoff ! Good idea! Thank you!