Skip to content

Instantly share code, notes, and snippets.

@blinker13
Last active March 24, 2016 16:25
Show Gist options
  • Select an option

  • Save blinker13/280d29067ffa38e6d81a to your computer and use it in GitHub Desktop.

Select an option

Save blinker13/280d29067ffa38e6d81a to your computer and use it in GitHub Desktop.
protocol Foo {
var title:String { get }
func rant(value:Int) -> String
}
let bar = @mock(Foo)
bar.rant = { value in
fail(value != 13)
return "mocked"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment