Skip to content

Commit

Permalink
Add new method to force record all snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
dogo committed Apr 3, 2020
1 parent 3700fe8 commit b00ece2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Nimble_Snapshots/HaveValidSnapshot.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ public func setNimblePixelTolerance(_ pixelTolerance: CGFloat) {
FBSnapshotTest.sharedInstance.pixelTolerance = pixelTolerance
}

public func recordAllSnapshots() {
switchChecksWithRecords = true
}

func getDefaultReferenceDirectory(_ sourceFileName: String) -> String {
if let globalReference = FBSnapshotTest.sharedInstance.referenceImagesDirectory {
return globalReference
Expand Down

0 comments on commit b00ece2

Please sign in to comment.