https://github.com/lukeredpath/mimiccocoaspecdemo
An example of using the Mimic gem to stub network requests from within an Objective-C test case
https://github.com/lukeredpath/mimiccocoaspecdemo
Last synced: 11 months ago
JSON representation
An example of using the Mimic gem to stub network requests from within an Objective-C test case
- Host: GitHub
- URL: https://github.com/lukeredpath/mimiccocoaspecdemo
- Owner: lukeredpath
- Created: 2011-01-13T03:07:34.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2011-01-13T15:39:00.000Z (over 15 years ago)
- Last Synced: 2025-01-29T10:43:19.527Z (over 1 year ago)
- Language: C
- Homepage:
- Size: 332 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
# Testing Objective-C networking code using Mimic
This sample project contains an example of testing HTTP connectivity using [the Mimic gem](https://github.com/lukeredpath/mimic) and it's REST API to configure the stubs.
It uses the [Resty](http://projects.lukeredpath.co.uk/resty) framework for simple, block-based networking and [Kiwi](http://www.kiwi-lib.info/docs.html) and Hamcrest to improve test readability.
## Running the example test
After cloning the project, you'll need to initialize the git submodules to get Kiwi and Hamcrest. You'll also need the bundler gem. Install the Mimic gem from the latest HEAD by running `bundle`.
You should now be able to load Xcode, select the Specs target and build successfully.
Try changing the stubbed response body and see the test fail.