I pull OHHTTPStubs via cocoa pods but I'm having some issues I can not figure out why. Here is a copy of my podFile
# platform :ios, '11.3'
target 'myApp' do
use_frameworks!
target 'myAppTests' do
inherit! :search_paths
pod 'OHHTTPStubs/Swift'
end
end
On my test file:
import OHHTTPStubs
@testable import myApp
class myTest: XCTestCase {
var client: CryptoCompareClient!
override func setUp() {
super.setUp()
OHHTTPStubs.onStubMissing { request in
XCTFail("Missing stub for \(request)")
}
}
On this lines:
OHHTTPStubs.onStubMissing { request in
XCTFail("Missing stub for \(request)")
}
I'm getting the following error:
Type 'OHHTTPStubs' has no member 'onStubMissing'
Also I'm trying to load file from bundle using OHHTTPStubs:
let bundle = OHResourceBundle("myFixtures", FixtureLoader.self)!
let path = OHPathForFileInBundle(filename, bundle)!
return OHHTTPStubsResponse(fileAtPath: path, statusCode: 200, headers: nil)
But I'm getting this errors:
Use of unresolved identifier 'OHResourceBundle' and Use of unresolved identifier 'OHPathForFileInBundle'
My question to you guys is what I'm doing wrong or why I'm getting this errors?
I'll really appreciate your help.