Skip to content

Instantly share code, notes, and snippets.

@raphaelmor
Created January 19, 2015 17:12
Show Gist options
  • Save raphaelmor/db77d263545031122ca5 to your computer and use it in GitHub Desktop.
Save raphaelmor/db77d263545031122ca5 to your computer and use it in GitHub Desktop.
Who said we don't need mocks in Swift...
class MockDataSource : TransporterDataSource {
var startUpdatingLocationCalled = 0
var stopUpdatingLocationCalled = 0
func startUpdatingLocation() {
startUpdatingLocationCalled++
}
func stopUpdatingLocation() {
stopUpdatingLocationCalled++
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment