From eba47316d4475726337962c48010e64f38eea1fc Mon Sep 17 00:00:00 2001 From: "Tity.S" Date: Sun, 22 May 2022 22:48:39 +0700 Subject: [PATCH] Add the scoring function into the makeSUT helper method --- EDGameEngineTests/FlowTests.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EDGameEngineTests/FlowTests.swift b/EDGameEngineTests/FlowTests.swift index b61aa8f..c34815a 100644 --- a/EDGameEngineTests/FlowTests.swift +++ b/EDGameEngineTests/FlowTests.swift @@ -136,8 +136,8 @@ class FlowTests:XCTestCase { // MARK: - Helper // By doing this, we can change the initializer without breaking the tests - func makeSUT(questions:[String]) -> Flow { - return Flow(questions:questions, router:router) { _ in return 0} + func makeSUT(questions:[String], scoring: @escaping ([String:String]) -> Int = { _ in 0}) -> Flow { + return Flow(questions:questions, router:router, scoring: scoring) } // Spy is the object and you just spying or stubbing specific methods of it.