17 lines
411 B
Swift
17 lines
411 B
Swift
import Foundation
|
|
import XCTest
|
|
|
|
public extension XCTestCase {
|
|
static 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
|
|
}
|
|
}
|
|
|
|
var bundle: Bundle { get { return XCTestCase.bundle } }
|
|
}
|