Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Add target and pods for testing, initial simple test #47

Merged
merged 1 commit into from
Jan 26, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
201 changes: 188 additions & 13 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,46 @@
1A42C2921C0E3883000F2137 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1A42C2901C0E3883000F2137 /* Main.storyboard */; };
1A42C2941C0E3883000F2137 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1A42C2931C0E3883000F2137 /* Assets.xcassets */; };
1A42C2A21C0E3A8D000F2137 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1A42C2A01C0E3A8D000F2137 /* LaunchScreen.storyboard */; };
43E4985F3523CE0C9B954A9A /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08CBBA924122CA63A22357A3 /* Pods_Example.framework */; };
6E3C4A3F1C3C6708009CBC8C /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3C4A3E1C3C6708009CBC8C /* MediaPlayer.framework */; };
6E5C9B051C4037B7008F6FD9 /* The Silver Chair.epub in Resources */ = {isa = PBXBuildFile; fileRef = 6E5C9B031C4037B7008F6FD9 /* The Silver Chair.epub */; };
6E5C9B091C403968008F6FD9 /* The Adventures Of Sherlock Holmes - Adventure I.epub in Resources */ = {isa = PBXBuildFile; fileRef = 6E5C9B081C403942008F6FD9 /* The Adventures Of Sherlock Holmes - Adventure I.epub */; };
F2DF7E310FE62B1F477F22A1 /* Pods.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 37A980705BFFE71CCA6F9C31 /* Pods.framework */; };
AFEE21EECDD3E66362208447 /* Pods_FolioReaderTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D259D296445144554E8136D /* Pods_FolioReaderTests.framework */; };
CA10C1341C572A4B0049165D /* FolioReaderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA10C1331C572A4B0049165D /* FolioReaderTests.swift */; };
CA61603F1C572C4C00ACD034 /* The Adventures Of Sherlock Holmes - Adventure I.epub in Resources */ = {isa = PBXBuildFile; fileRef = 6E5C9B081C403942008F6FD9 /* The Adventures Of Sherlock Holmes - Adventure I.epub */; };
CA6160401C572C4C00ACD034 /* The Silver Chair.epub in Resources */ = {isa = PBXBuildFile; fileRef = 6E5C9B031C4037B7008F6FD9 /* The Silver Chair.epub */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
CA10C1361C572A4B0049165D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1A42C2811C0E3882000F2137 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 1A42C2881C0E3882000F2137;
remoteInfo = Example;
};
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
03D9210FDD7C97E6298F7245 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
08CBBA924122CA63A22357A3 /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1A42C2891C0E3882000F2137 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
1A42C28C1C0E3882000F2137 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
1A42C28E1C0E3882000F2137 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
1A42C2911C0E3883000F2137 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
1A42C2931C0E3883000F2137 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
1A42C2981C0E3883000F2137 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
1A42C2A11C0E3A8D000F2137 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
37A980705BFFE71CCA6F9C31 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5D259D296445144554E8136D /* Pods_FolioReaderTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FolioReaderTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6E3C4A3E1C3C6708009CBC8C /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
6E5C9B031C4037B7008F6FD9 /* The Silver Chair.epub */ = {isa = PBXFileReference; lastKnownFileType = file; path = "The Silver Chair.epub"; sourceTree = "<group>"; };
6E5C9B081C403942008F6FD9 /* The Adventures Of Sherlock Holmes - Adventure I.epub */ = {isa = PBXFileReference; lastKnownFileType = file; path = "The Adventures Of Sherlock Holmes - Adventure I.epub"; sourceTree = "<group>"; };
8BCB174DF233A59B81E828D3 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
CA10C1311C572A4B0049165D /* FolioReaderTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FolioReaderTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
CA10C1331C572A4B0049165D /* FolioReaderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FolioReaderTests.swift; sourceTree = "<group>"; };
CA10C1351C572A4B0049165D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
CF0BE619497BB80F68421DFD /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = "<group>"; };
D92D71D4A92CE71CA9A6CF5A /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = "<group>"; };
DC3BF5678D61F199F4ECC2BD /* Pods-FolioReaderTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FolioReaderTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FolioReaderTests/Pods-FolioReaderTests.debug.xcconfig"; sourceTree = "<group>"; };
E892772F8400DE1863DFA3A6 /* Pods-FolioReaderTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FolioReaderTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-FolioReaderTests/Pods-FolioReaderTests.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -40,7 +60,15 @@
buildActionMask = 2147483647;
files = (
6E3C4A3F1C3C6708009CBC8C /* MediaPlayer.framework in Frameworks */,
F2DF7E310FE62B1F477F22A1 /* Pods.framework in Frameworks */,
43E4985F3523CE0C9B954A9A /* Pods_Example.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
CA10C12E1C572A4B0049165D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
AFEE21EECDD3E66362208447 /* Pods_FolioReaderTests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -51,6 +79,7 @@
isa = PBXGroup;
children = (
1A42C28B1C0E3882000F2137 /* Example */,
CA10C1321C572A4B0049165D /* FolioReaderTests */,
1A42C28A1C0E3882000F2137 /* Products */,
FD06DBD55314F5656C9B1B47 /* Pods */,
D394FAB8B11D7C692E7BE00D /* Frameworks */,
Expand All @@ -61,6 +90,7 @@
isa = PBXGroup;
children = (
1A42C2891C0E3882000F2137 /* Example.app */,
CA10C1311C572A4B0049165D /* FolioReaderTests.xctest */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -88,20 +118,32 @@
path = "Sample eBooks";
sourceTree = "<group>";
};
CA10C1321C572A4B0049165D /* FolioReaderTests */ = {
isa = PBXGroup;
children = (
CA10C1331C572A4B0049165D /* FolioReaderTests.swift */,
CA10C1351C572A4B0049165D /* Info.plist */,
);
path = FolioReaderTests;
sourceTree = "<group>";
};
D394FAB8B11D7C692E7BE00D /* Frameworks */ = {
isa = PBXGroup;
children = (
6E3C4A3E1C3C6708009CBC8C /* MediaPlayer.framework */,
37A980705BFFE71CCA6F9C31 /* Pods.framework */,
08CBBA924122CA63A22357A3 /* Pods_Example.framework */,
5D259D296445144554E8136D /* Pods_FolioReaderTests.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
FD06DBD55314F5656C9B1B47 /* Pods */ = {
isa = PBXGroup;
children = (
03D9210FDD7C97E6298F7245 /* Pods.debug.xcconfig */,
8BCB174DF233A59B81E828D3 /* Pods.release.xcconfig */,
CF0BE619497BB80F68421DFD /* Pods-Example.debug.xcconfig */,
D92D71D4A92CE71CA9A6CF5A /* Pods-Example.release.xcconfig */,
DC3BF5678D61F199F4ECC2BD /* Pods-FolioReaderTests.debug.xcconfig */,
E892772F8400DE1863DFA3A6 /* Pods-FolioReaderTests.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
Expand Down Expand Up @@ -129,13 +171,34 @@
productReference = 1A42C2891C0E3882000F2137 /* Example.app */;
productType = "com.apple.product-type.application";
};
CA10C1301C572A4B0049165D /* FolioReaderTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = CA10C1381C572A4B0049165D /* Build configuration list for PBXNativeTarget "FolioReaderTests" */;
buildPhases = (
E80A76B0C9A40B8EF2E8A419 /* Check Pods Manifest.lock */,
CA10C12D1C572A4B0049165D /* Sources */,
CA10C12E1C572A4B0049165D /* Frameworks */,
CA10C12F1C572A4B0049165D /* Resources */,
48136CF7CAD29C27140CD2FE /* Embed Pods Frameworks */,
CED5D1AE93CEE0D4CF17D666 /* Copy Pods Resources */,
);
buildRules = (
);
dependencies = (
CA10C1371C572A4B0049165D /* PBXTargetDependency */,
);
name = FolioReaderTests;
productName = FolioReaderTests;
productReference = CA10C1311C572A4B0049165D /* FolioReaderTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
1A42C2811C0E3882000F2137 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0710;
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0710;
ORGANIZATIONNAME = FolioReader;
TargetAttributes = {
Expand All @@ -147,6 +210,10 @@
};
};
};
CA10C1301C572A4B0049165D = {
CreatedOnToolsVersion = 7.3;
TestTargetID = 1A42C2881C0E3882000F2137;
};
};
};
buildConfigurationList = 1A42C2841C0E3882000F2137 /* Build configuration list for PBXProject "Example" */;
Expand All @@ -163,6 +230,7 @@
projectRoot = "";
targets = (
1A42C2881C0E3882000F2137 /* Example */,
CA10C1301C572A4B0049165D /* FolioReaderTests */,
);
};
/* End PBXProject section */
Expand All @@ -180,6 +248,15 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
CA10C12F1C572A4B0049165D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
CA6160401C572C4C00ACD034 /* The Silver Chair.epub in Resources */,
CA61603F1C572C4C00ACD034 /* The Adventures Of Sherlock Holmes - Adventure I.epub in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
Expand All @@ -195,7 +272,22 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example/Pods-Example-resources.sh\"\n";
showEnvVarsInLog = 0;
};
48136CF7CAD29C27140CD2FE /* Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FolioReaderTests/Pods-FolioReaderTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
6E798FB93F65253E182BC2D3 /* Embed Pods Frameworks */ = {
Expand All @@ -210,7 +302,22 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
CED5D1AE93CEE0D4CF17D666 /* Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FolioReaderTests/Pods-FolioReaderTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
D73CA4A39E92155A6948FFC6 /* Check Pods Manifest.lock */ = {
Expand All @@ -228,6 +335,21 @@
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
E80A76B0C9A40B8EF2E8A419 /* Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand All @@ -240,8 +362,24 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
CA10C12D1C572A4B0049165D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
CA10C1341C572A4B0049165D /* FolioReaderTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
CA10C1371C572A4B0049165D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 1A42C2881C0E3882000F2137 /* Example */;
targetProxy = CA10C1361C572A4B0049165D /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
1A42C2901C0E3883000F2137 /* Main.storyboard */ = {
isa = PBXVariantGroup;
Expand Down Expand Up @@ -348,7 +486,7 @@
};
1A42C29C1C0E3883000F2137 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 03D9210FDD7C97E6298F7245 /* Pods.debug.xcconfig */;
baseConfigurationReference = CF0BE619497BB80F68421DFD /* Pods-Example.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = Example/Info.plist;
Expand All @@ -360,7 +498,7 @@
};
1A42C29D1C0E3883000F2137 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 8BCB174DF233A59B81E828D3 /* Pods.release.xcconfig */;
baseConfigurationReference = D92D71D4A92CE71CA9A6CF5A /* Pods-Example.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = Example/Info.plist;
Expand All @@ -370,6 +508,34 @@
};
name = Release;
};
CA10C1391C572A4B0049165D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = DC3BF5678D61F199F4ECC2BD /* Pods-FolioReaderTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
INFOPLIST_FILE = FolioReaderTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.folioreader.FolioReaderTests;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example";
};
name = Debug;
};
CA10C13A1C572A4B0049165D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = E892772F8400DE1863DFA3A6 /* Pods-FolioReaderTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
INFOPLIST_FILE = FolioReaderTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.folioreader.FolioReaderTests;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example";
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
Expand All @@ -391,6 +557,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
CA10C1381C572A4B0049165D /* Build configuration list for PBXNativeTarget "FolioReaderTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
CA10C1391C572A4B0049165D /* Debug */,
CA10C13A1C572A4B0049165D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 1A42C2811C0E3882000F2137 /* Project object */;
Expand Down
30 changes: 30 additions & 0 deletions Example/FolioReaderTests/FolioReaderTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//
// FolioReaderTests.swift
// FolioReaderTests
//
// Created by Brandon Kobilansky on 1/25/16.
// Copyright © 2016 FolioReader. All rights reserved.
//

@testable import FolioReaderKit

import Quick
import Nimble

class FolioReaderTests: QuickSpec {
override func spec() {
context("epub parsing") {
var subject: FREpubParser!

beforeEach {
let path = NSBundle(forClass: self.dynamicType).pathForResource("The Silver Chair", ofType: "epub")!
subject = FREpubParser()
subject.readEpub(epubPath: path)
}

it("correctly parses a properly formatted document") {
expect(subject.book.tableOfContents.count).to(equal(17))
}
}
}
}