From d95a52797923d0cf53c0d5f1bcf89558c967c7f0 Mon Sep 17 00:00:00 2001 From: Scott Starr Date: Wed, 31 Jul 2024 14:20:00 -0400 Subject: [PATCH] fix `record` --- Sources/SnapshotTesting/AssertSnapshot.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/SnapshotTesting/AssertSnapshot.swift b/Sources/SnapshotTesting/AssertSnapshot.swift index 68b4f56ae..ff4970f5d 100644 --- a/Sources/SnapshotTesting/AssertSnapshot.swift +++ b/Sources/SnapshotTesting/AssertSnapshot.swift @@ -277,7 +277,7 @@ public func verifySnapshot( // But, if we're recording, don't bother checking the bundle, since we aren't comparing it to anything, and // want the new file to be generated in the source directory, not the bundle. var snapshotFileUrlCandidate: URL? - if !recording { + if !record { let thisBundle = Bundle(for: CleanCounterBetweenTestCases.self) let resourcePath = thisBundle.path(forResource: "\(testName).\(identifier)", ofType: snapshotting.pathExtension) snapshotFileUrlCandidate = resourcePath.map({ URL(fileURLWithPath: $0) })