Skip to content

Commit 6130245

Browse files
committed
make record test non-throwing [make release]
1 parent 7e6bc02 commit 6130245

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Sources/SnapshotTestCase.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ open class SnapshotTestCase: XCTestCase {
6363
case .cgImageCreeationFailed:
6464
return "Failed to create a `CGImage` of current snapshot."
6565
case .recordModeIsOn:
66-
return """
67-
Recording mode is on.
68-
Turn recording mode off and re-run the test with the newly-recorded reference.
69-
"""
66+
return "Recording mode is on."
7067
}
7168
}
7269
}
@@ -255,7 +252,10 @@ open class SnapshotTestCase: XCTestCase {
255252
}
256253
#endif
257254

258-
throw Error.recordModeIsOn
255+
XCTFail("""
256+
\(Error.recordModeIsOn.localizedDescription)
257+
Turn recording mode off and re-run the \(testName) test with the newly-recorded reference.
258+
""")
259259
} else {
260260
let data: Data
261261
#if targetEnvironment(simulator)

SwiftSnapshotTesting.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "SwiftSnapshotTesting"
3-
s.version = "0.1.0"
3+
s.version = "0.1.1"
44

55
s.summary = "Swift Snapshot Testing"
66
s.homepage = "https://github.com/eugenebokhan/SwiftSnapshotTesting"

0 commit comments

Comments
 (0)