From 16ade61f496c63bc02241bf452cb722416c9a48f Mon Sep 17 00:00:00 2001 From: Subeom Choi Date: Tue, 14 Nov 2023 17:18:55 +0900 Subject: [PATCH] refactor: add default block to fake apply --- Source/TestFake/DependencyFakeable.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/TestFake/DependencyFakeable.swift b/Source/TestFake/DependencyFakeable.swift index ebfc0ce..760fa7e 100644 --- a/Source/TestFake/DependencyFakeable.swift +++ b/Source/TestFake/DependencyFakeable.swift @@ -14,7 +14,9 @@ public protocol DependencyFakeable { } extension DependencyFakeable { - public static func fake(apply: (inout Dependency) -> Void) -> (Self, Dependency) { + public static func fake( + apply: (inout Dependency) -> Void = { _ in } + ) -> (Self, Dependency) { var dependency = Dependency.fake() apply(&dependency)