Rubicon

Rubicon

by Krystof Matej
4.6 · 5,176 ratings
Free — Download from Mac App Store
v1.4.2 · Updated 3 months ago · 2.63 Mb · Released Jun 2017

How do you feel about this app?

Key Features

🔀 Git Support
Rubicon

About Rubicon

Swift parser + mock generator + Xcode extension https://github.com/raptorxcz/Rubicon Rubicon generates spys for protocol. Parsing closures is not supported. Generating methord for parent protocol is not supported. example: input: protocol Car { var name: String? { get } var color: Int { get set } func go() func load(with stuff: Int, label: String) func isFull() -> Bool } output: class CarSpy: Car { var _name: String? var name: String? { get { return _name } } var _color: Int! var color: Int { get { return _color } set { _color = newValue } } struct Load { let stuff: Int let label: String } var goCount = 0 var load = [Load]() var isFullCount = 0 var isFullReturn: Bool init(isFullReturn: Bool) { self.isFullReturn = isFullReturn } func go() { goCount += 1 } func load(with stuff: Int, label: String) { let item = Load(stuff: stuff, label: label) load.append(item) } func isFull() -> Bool { isFullCount += 1 return isFullReturn } } usage in tests: let carSpy = CarSpy() ... let a1 = carSpy.goCount == 1 let a2 = carSpy.load.count == 1 let a3 = carSpy.load[0].stuff == 2 let a4 = carSpy.load[0].label == "name" https://github.com/raptorxcz/Rubicon