Skip to content

Commit

Permalink
Add the scoring function into the makeSUT helper method
Browse files Browse the repository at this point in the history
  • Loading branch information
tyegah committed May 22, 2022
1 parent ab37dec commit eba4731
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EDGameEngineTests/FlowTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, String, RouterSpy> {
return Flow(questions:questions, router:router) { _ in return 0}
func makeSUT(questions:[String], scoring: @escaping ([String:String]) -> Int = { _ in 0}) -> Flow<String, String, RouterSpy> {
return Flow(questions:questions, router:router, scoring: scoring)
}

// Spy is the object and you just spying or stubbing specific methods of it.
Expand Down

0 comments on commit eba4731

Please sign in to comment.