Skip to content

Instantly share code, notes, and snippets.

View NateFuller's full-sized avatar

Nathan Fuller NateFuller

  • SimpliSafe
  • Somerville, MA
  • 19:25 (UTC -04:00)
View GitHub Profile
@NateFuller
NateFuller / AssertionHandler.swift
Last active June 30, 2022 14:29
A wrapper for assertion throwing that we can use in Nimble/Quick so it doesn't crash test execution
protocol AssertionProvider {
func assertionFailure(_ message: String)
func fatalError(_ message: String)
}
final class AssertionHandler {
private(set) static var shared: AssertionHandler = AssertionHandler()
var provider: AssertionProvider = DefaultAssertionProvider()
private init() {}