Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/typealiased/mockingbird
A Swifty mocking framework for Swift and Objective-C.
https://github.com/typealiased/mockingbird
mock ocmock ocmockito swift
Last synced: 3 months ago
JSON representation
A Swifty mocking framework for Swift and Objective-C.
- Host: GitHub
- URL: https://github.com/typealiased/mockingbird
- Owner: typealiased
- License: mit
- Created: 2019-08-07T00:27:51.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-10T02:06:37.000Z (8 months ago)
- Last Synced: 2024-04-24T19:31:58.966Z (7 months ago)
- Topics: mock, ocmock, ocmockito, swift
- Language: Swift
- Homepage: https://mockingbirdswift.com
- Size: 26.5 MB
- Stars: 643
- Watchers: 36
- Forks: 82
- Open Issues: 44
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
Mockingbird
Mockingbird makes it easy to mock, stub, and verify objects in Swift unit tests. You can test both Swift and Objective-C without writing any boilerplate or modifying production code.
## Documentation
Visit [MockingbirdSwift.com](https://mockingbirdswift.com) for quick start guides, walkthroughs, and API reference articles.
## Examples
Automatically generating mocks.
```console
$ mockingbird configure BirdTests -- --target Bird
```Manually generating mocks.
```console
$ mockingbird generate --testbundle BirdTests --target Bird --output Mocks.generated.swift
```Using Mockingbird in tests.
```swift
// Mocking
let bird = mock(Bird.self)// Stubbing
given(bird.canFly).willReturn(true)// Verification
verify(bird.fly()).wasCalled()
```## Contributing
Please read the [contributing guide](/.github/CONTRIBUTING.md) to learn about reporting bugs, developing features, and submitting code changes.
## License
Mockingbird is [MIT licensed](/LICENSE.md). By contributing to Mockingbird, you agree that your contributions will be licensed under its MIT license.