mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00:00
25 lines
705 B
Swift
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")
|
|
}
|
|
}
|
|
}
|