troupe icon indicating copy to clipboard operation
troupe copied to clipboard

Enforce contract in specs?

Open sporto opened this issue 8 years ago • 2 comments

I have an interactor with:

expects :one
expects :two

Then in a spec that uses this interactor I might have something like:

expect(interactor).to receive(:call).with(one: 1) { result }

I forgot two but the test passes. Any thoughts on enforcing the contract here?

sporto avatar Mar 21 '16 04:03 sporto

@sporto I'll take a look at this today and get back to you. My guess is that it has to do with the way that the object is mocked.

jonstokes avatar Apr 22 '16 14:04 jonstokes

@jonstokes Have you found anything on this topic? Thanks

iSarCasm avatar Sep 18 '18 14:09 iSarCasm