You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7df52d2
Browse filesBrowse the repository at this point in the historyBrowse files
Add ArbitraryError and support for default stub values
- Add the DefaultStubValueProviding protocol, which lets a type
provide a default value for stubs that return it. Conform common
standard library and Foundation types, using recognizable
placeholder values where possible.
- Add Stub.init(), which returns the default stub value until the
stub is configured, for return types that conform to
DefaultStubValueProviding.
- Add ThrowingStub.init() for stubs whose error type is any Error.
It throws an unspecified error until the stub is configured.
- Add ArbitraryError, an error type for tests that just need an
error to throw, and a randomError function on
RandomValueGenerating that creates one with a random description
beginning with the calling file and function.
- Rewrite the guidance on stub properties in Using Stubs to
recommend default-initialized stubs, and document ArbitraryError.
- Rename the randomError example in Using Random Value Generation
so it doesn’t collide with the new function.
- Mention the new types in the README and add a 1.7.0 changelog
entry.
0 commit comments