Comments (6)
Hi Sean,
Thanks for the suggestion, it definitely makes sense. This feature should
be part of a bigger feature: expectation. As you know, as of today, you can
only stub requests, but you can't make asserts on whether a request was
made.
This is how I want expectation to work:
LSStubRequest *request = stubRequest(@"GET", @"www.example.com);
// test...
[[request should] haveBeenMade]; // <- Maybe a Kiwi custom matcher
When that's implemented, it would be pretty easy to expect that a request
was made a certain number of times.
[[request should] haveBeenMadeWithCount:3]
Or something similar.
This is a big feature and it would require significant changes. Please,
let's discuss about how to implement it before coding, to ensure that we
end up merging the patch.
Thanks again!
2013/9/18 Sean Freitag [email protected]
In my use case, I would like to ensure that I only hit a specific URL one
time, and if it hits it again, I would like to fail the test. Should be
pretty simple, and I may implement it and submit it as a pull request.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/51
.
from nocilla.
I could probably find some time in the next couple weeks to implement this if you would be interested in me contributing. This library has helped me a ton, and I would like to give back.
from nocilla.
Hi @cowboygneox, are you still interested in this?
from nocilla.
@luisobo Of course, but I would like to make other suggestions as well. We've deprecated use of this library in a few spots in our code because the exception-based nature of this framework was causing erratic results with Jenkins and XCTool, but I would gladly contribute to this project if desired. Just let me know!
from nocilla.
@cowboygneox noted. Thanks!
from nocilla.
Check #69
from nocilla.
Related Issues (20)
- Sporadic results (XCTest) when running simultaneous tests HOT 5
- Not able to stub cookies for normal (non-directed requests) HOT 1
- Body matcher fails to match arbitrary NSData
- Support for RestKit HOT 1
- Add 0.10.0 to CocoaPods.org HOT 1
- Synchronous Request Support
- Wait for async request to complete before stop() HOT 1
- Crash in LSHTTPStubURLProtocol - EXC_BAD_ACCESS - Specific way to stub redirects? HOT 1
- Ability to Delay a Response HOT 1
- Redirect Implementation is Inconsistent With OS Behavior
- Carthage Binaries HOT 1
- ASIHTTPRequest synchronous request with stub never ends HOT 1
- LSNocilla.sharedInstance().stop() Not working HOT 5
- Project no longer maintained? HOT 3
- Nocilla never returns the stub HOT 2
- App store rejection due to private api references HOT 3
- Use this snippet to stub the request HOT 1
- Push v0.11.0 podspec to Cocoapods HOT 2
- Swift 3 Support HOT 2
- How do I Nocilla in Swift 3? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nocilla.