objective c - Is there a way in OCMockito to make stubs fail when an unknown method is called? -


when creating stub in ocmockito, use calls stub out method calls , return values:

[given([stubobject mymethod]) willreturn:somevalue]; 

the problem have if don't define method method gets called during test, default seems to return nil. can lead sneaky bugs since real methods asserted never return nil , therefore return value not tested in code calling method.

is there way change default behavior or maybe test if called on object apart few methods i'm stubbing?

no, ocmockito stubs "nice". if want "strict" stubs, ocmock may suit better.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -