Saturday, 17 August 2013

Trying to add another verifier without specifying a matcher for the previous one

Trying to add another verifier without specifying a matcher for the
previous one

Given customers is a NSArray of a CACustomer class, then I was hoping to
test a helper function like this:
[[customers shouldNot] beEmpty];
CACustomer *c = customers[0];
[[theValue(c.customerId) should] equal:theValue(500)];
[[c.firstName should] equal:@"Customer"];
[[c.lastName should] equal:@"Name"];
[[c.email should] equal:@"customer.name@company.com"];
Using Kiwi 2.2 (XCode5-DP5) this will fail with this error message:
Unknown.m:0: error: -[CASOAPMapperSpec
CASOAPMapper_mapCustomers_ShouldMapASingleCustomerResponse] :
'CASOAPMapper, #mapCustomers, should map a single customer response'
[FAILED], NSInternalInconsistencyException "Trying to add another verifier
without specifying a matcher for the previous one." raised
Once I remove the last 3 expectations, it works again. How could this be
fixed?

No comments:

Post a Comment