Webstub + Testflight's SDK
Closed this issue · 4 comments
TestFlight's SDK requires to call a method TestFlight.takeOff
on application:didFinishLaunchingWithOptions:
that makes some requests to their service.
After launching the application I get this exception.
2013-04-22 16:20:08.983 protocol.rb:87:in `stub_for:': undefined method `absoluteString' for nil:NilClass (NoMethodError)
from protocol.rb:8:in `canInitWithRequest:'
from app_delegate.rb:9:in `application:didFinishLaunchingWithOptions:'
Removing webstub from the Gemfile, of course solves the issue.
I'm not sure if this is a webstub or a testflight SDK issue, but I find strange getting this kind of errors if I'm not on a "spec" environment.
Looks like the same issue as #6. I pushed a branch with a possible fix under issue-10. Can you give it a try? It fixes it for me.
- I was doing something wrong with the SDK (the `TestFlight.takeOff``method was being called twice). Calling it only once doesn't raise the error
- Ignoring the first point (leaving the double call to this method) the issue-10 branch fixed the issue when running the app
- The error still appears when running the specs
I'd consider the issue as fixed, given that my point was to avoid letting webstub interfere if I was not running the specs
Glad it helps.
I don't consider it fixed, however. Why would request.URL
be nil? It makes no sense. Maybe I should just reject URLs that are nil.
Just pushed 0.3.7, which fixes both of these issues. I'll push a gem later.
Thanks for your investigation.