luisobo / Nocilla

Testing HTTP requests has never been easier. Nocilla: Stunning HTTP stubbing for iOS and Mac OS X.
https://twitter.com/luisobo
MIT License
1.84k stars 172 forks source link

Ignoring headers which are not specified #59

Closed jeremytregunna closed 10 years ago

jeremytregunna commented 10 years ago

What's the reason for not allowing a stub to match if you don't supply all the header info? For instance, when running tests on an iOS device, I want to stub out a request to an api which i need to supply an oauth token for. I want that token to be specified in my headers, so I do that, but I don't want to have to specify the User-Agent, as when a new version of iOS comes out, I now have to edit a bunch of tests.

What's the accepted practice here?