GeoIP2-swift/Tests/ApiTests/XCTestCase.swift

21 lines
356 B
Swift
Raw Normal View History

2020-04-27 21:25:09 +08:00
import Foundation
import XCTest
extension XCTestCase {
var bundle: Bundle {
get {
guard let currentFileUrl = URL(string: #file) else {
return Bundle.main
}
guard let testBundle = Bundle(path: currentFileUrl.deletingLastPathComponent().path) else {
return Bundle.main
}
return testBundle
}
}
}