Files
XcodeGen/Tests/XcodeGenKitTests/FixtureTests.swift
T
Yonas Kolb 0426e1bee0 more tests
2017-07-26 18:52:07 +02:00

25 lines
705 B
Swift

import Spectre
import PathKit
import XcodeGenKit
import xcodeproj
let fixturePath = Path(#file).parent().parent().parent() + "Fixtures"
func generate(specPath: Path, projectPath: Path) throws {
let spec = try Spec(path: specPath)
let generator = ProjectGenerator(spec: spec, path: specPath.parent())
let project = try generator.generateProject()
try project.write(path: projectPath, override: true)
_ = try XcodeProj(path: projectPath)
}
func fixtureTests() {
describe("Test Project") {
$0.it("generates") {
try generate(specPath: fixturePath + "TestProject/spec.yml", projectPath: fixturePath + "TestProject/GeneratedProject.xcodeproj")
}
}
}