Files
SwiftShell/SwiftShellTests/XCTestCase_Additions.swift
T
2015-11-11 03:41:38 +01:00

21 lines
478 B
Swift

//
// XCTestCase_Additions.swift
// SwiftShell
//
// Created by Kåre Morstøl on 15/09/14.
// Copyright (c) 2014 NotTooBad Software. All rights reserved.
//
import XCTest
import Foundation
extension XCTestCase {
func pathForTestResource (filename: String, type: String) -> String {
guard let path = NSBundle(forClass: self.dynamicType).pathForResource(filename, ofType: type) else {
preconditionFailure("resource \(filename).\(type) not found")
}
return path
}
}