Skip to content

3.2 Release

Compare
Choose a tag to compare
@Rivukis Rivukis released this 26 Mar 02:17
· 39 commits to master since this release

New Features:

  • Added array of calls to all Spyable fakes. The calls in this array are in chronological order. Calls will be removed from this array when resetCalls() is called.
  • Added array of stubs to all Stubbable fakes. The stubs in this array are in chronological order. Stubs will be removed from this array when resetStubs() or stubAgain() is called.
  • Changed SpryEquatable to default to Equatable function when an object is a reference type and conforms to Equatable. This was changed to match how Swift and other frameworks handle this scenario.
  • Minor clean up to a few fatal error messages, including adding more information to a couple fatal error scenarios.
  • added Nimble matcher haveRecordedCalls() to Spyable. This checks to see if any calls have been recorded on a Spyable fake. This matcher uses the calls array and therefore will report out no recorded calls if resetCalls() regardless if calls have been made beforehand.
  • Added SpryConfiguration class. Added fatalErrorClosure to SpryConfiguration which defaults to printing out the fatal error message. This was added because current versions of Xcode don't always print out fatal error messages.

Helpful Hints:

  • Spryable conforms to both Stubbable and Spyable.
  • Can put a breakpoint on fatalError() line in FatalError.swift to prevent Xcode from executing the fatal error. This can be helpful if Xcode sometimes crashes when executing fatalError().