From ae91f54aa7ec23b9600e80acb1ce9c1bf64978b8 Mon Sep 17 00:00:00 2001 From: Tom Booth Date: Tue, 16 Feb 2016 00:49:59 +0000 Subject: [PATCH] Vary the bundle identifier based on platform The two different test targets will bundle up the required fixtures under different bundle identifiers, this corrects the identifier based on platform. --- SwiftGit2Tests/Fixtures/Fixtures.swift | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/SwiftGit2Tests/Fixtures/Fixtures.swift b/SwiftGit2Tests/Fixtures/Fixtures.swift index 24a18d2..1cd8ddf 100644 --- a/SwiftGit2Tests/Fixtures/Fixtures.swift +++ b/SwiftGit2Tests/Fixtures/Fixtures.swift @@ -33,8 +33,14 @@ final class Fixtures { func setUp() { try! NSFileManager.defaultManager().createDirectoryAtURL(directoryURL, withIntermediateDirectories: true, attributes: nil) - - let bundle = NSBundle(identifier: "org.libgit2.SwiftGit2-OSXTests")! + + #if os(OSX) + let platform = "OSX" + #else + let platform = "iOS" + #endif + let bundleIdentifier = String(format: "org.libgit2.SwiftGit2-%@Tests", arguments: [platform]) + let bundle = NSBundle(identifier: bundleIdentifier)! let zipURLs = bundle.URLsForResourcesWithExtension("zip", subdirectory: nil)! as [NSURL] for URL in zipURLs {