Skip to content

Commit

Permalink
[feat] #144 Tuist Test Template 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
stealmh committed Oct 15, 2024
1 parent fb90c81 commit f6c7f98
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Tuist/Templates/test/InfoPlist.stencil
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ENABLE_TESTING_SEARCH_PATHS</key>
<string>YES</string>
</dict>
</plist>
10 changes: 10 additions & 0 deletions Tuist/Templates/test/Test.stencil
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import ComposableArchitecture
import XCTest

@testable import {{ target }}

final class {{ target }}Tests: XCTestCase {
func test() {

}
}
27 changes: 27 additions & 0 deletions Tuist/Templates/test/test.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// test.swift
// ProjectDescriptionHelpers
//
// Created by 김민호 on 10/10/24.
//

import ProjectDescription

let appProjectAttribute: Template.Attribute = .required("project")
let appTargetAttribute: Template.Attribute = .required("target")

let appTemplate = Template(
description: "Target template",
attributes: [
appProjectAttribute,
appTargetAttribute
],
items: [
.file(
path: "Projects/\(appProjectAttribute)/\(appTargetAttribute)Tests/Sources/\(appTargetAttribute)Tests.swift",
templatePath: "Test.stencil"),
.file(
path: "Projects/\(appProjectAttribute)/\(appTargetAttribute)Tests/Resources/info.plist",
templatePath: "InfoPlist.stencil"),
]
)

0 comments on commit f6c7f98

Please sign in to comment.