Open
Description
I'm trying to verify that a method gets called twice with specific values, but I can't seem to verify both calls, just the first. I have verified that the method is called twice and that the values are correct, but I'm not sure how to write the cedar spec.
Here is what I have:
it(@"should call sleep with time intervals of 0 and 5", ^{
// subject is a spied on object
subject should have_received(@selector(someMethod:)).with(0); // Passes
subject should have_received(@selector(someMethod:)).with(5); // Fails
}
The error I'm getting is this:
Expected <MyObject> to have received message <someMethod:>, with arguments: <5> but received messages:
someMethod:<0>
someMethod:<5>
Also, it doesn't seem you can verify that a method was called a specific number of times without overriding the invocation and tracking the count.
Metadata
Assignees
Labels
No labels
Activity