     }
     
     func testThemeLoad() {
-        let bundle = Bundle(for: self.classForCoder)
-        guard let themeFileURL = bundle.url(forResource: "TestTheme", withExtension: "plist") else {
+        guard let themeFileURL = testBundle.url(forResource: "TestTheme", withExtension: "plist") else {
             XCTFail("Unable to load theme test file")
             return
         }

        }
        XCTAssertEqual(Themify.shared.count, 2, "Wrong number of loaded themes")
    }
}


/// Tests the main interface of Themify library
class TestMainInterface: XCTestCase {
    var testBundle: Bundle!
    
    override func setUp() {
        super.setUp()
        testBundle = Bundle(for: self.classForCoder)
    }
    
    override func tearDown() {
