Skip to content

Instantly share code, notes, and snippets.

Rui Gonçalo ruigoncalo

Block or report user

Report or block ruigoncalo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ruigoncalo / DistancesPresenter.kt
Last active Sep 11, 2017
Spek with Subjects - Presenter
View DistancesPresenter.kt
class DistancesPresenter @Inject constructor(private val roundInteractor: RoundInteractor) {
private val subscriptions by lazy { CompositeSubscription() }
private lateinit var view: View
fun attachView(view: View) {
this.view = view
ruigoncalo / DistancesView.kt
Last active Sep 11, 2017
Spek with Subjects - View
View DistancesView.kt
class DistancesView : FrameLayout, DistancesPresenter.View {
@Inject lateinit var presenter: DistancesPresenter
constructor(context: Context?) : super(context) {
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) {
ruigoncalo / RoundDistancesPresenterSpec.kt
Last active Sep 16, 2017
Spek with Subjects - Spec
View RoundDistancesPresenterSpec.kt
class DistancesPresenterSpec : Spek({
rxGroup("DistancePresenter") {
val view: DistancesPresenter.View = mock()
val roundInteractor: RoundInteractor = mock()
val tested = DistancesPresenter(roundInteractor)
var holeSubject: PublishSubject<Hole> = PublishSubject.create()
You can’t perform that action at this time.