Skip to content

Commit

Permalink
refactor: add default block to fake apply
Browse files Browse the repository at this point in the history
  • Loading branch information
0xWOF committed Nov 14, 2023
1 parent 3105998 commit 16ade61
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Source/TestFake/DependencyFakeable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ public protocol DependencyFakeable<Dependency> {
}

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)

Expand Down

0 comments on commit 16ade61

Please sign in to comment.