From 9d310e109e2d69658ce9ffd328b06a590d8a1d4f Mon Sep 17 00:00:00 2001 From: Josh Justice Date: Tue, 25 Apr 2017 09:55:38 -0400 Subject: [PATCH] Add steps to get AppLogic target working --- 1.5/testing/modules.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/1.5/testing/modules.md b/1.5/testing/modules.md index 167af2bc..83eb2b24 100755 --- a/1.5/testing/modules.md +++ b/1.5/testing/modules.md @@ -12,13 +12,16 @@ Testing a Vapor app gets tricky, and requires some maneuvering of your app targe To start, you need to split up your Vapor project into a target called `App`, and a target called `AppLogic`. The App module will only include a `main.swift`, and your `AppLogic` will contain the actual logic for the app. +Add a `Sources/AppLogic` folder to your project, then add `targets` to your `Package.swift`: + ```swift import PackageDescription let package = Package( name: “ProjectName”, targets: [ - Target(name: "App", dependencies: ["AppLogic"]) + Target(name: "App", dependencies: ["AppLogic"]), + Target(name: "AppLogic") ], dependencies: [ .Package(url: "https://github.com/vapor/vapor.git", majorVersion: 1, minor: 3)