From 3081538c6f3a20911f7575a33e37602d73779c46 Mon Sep 17 00:00:00 2001 From: Anders Date: Fri, 17 Feb 2017 17:33:20 +0800 Subject: [PATCH] Replace the use of `ended` signal with `observeEnded` as appropriate. --- Sources/Action.swift | 2 +- Tests/ReactiveSwiftTests/LifetimeSpec.swift | 2 +- Tests/ReactiveSwiftTests/PropertySpec.swift | 2 +- Tests/ReactiveSwiftTests/SignalProducerSpec.swift | 2 +- Tests/ReactiveSwiftTests/SignalSpec.swift | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/Action.swift b/Sources/Action.swift index 70d6c1220..19e4d30b8 100644 --- a/Sources/Action.swift +++ b/Sources/Action.swift @@ -80,7 +80,7 @@ public final class Action { lifetime = Lifetime(deinitToken) // Retain the `property` for the created `Action`. - lifetime.ended.observeCompleted { _ = property } + lifetime.observeEnded { _ = property } executeClosure = { state, input in execute(state as! State.Value, input) } diff --git a/Tests/ReactiveSwiftTests/LifetimeSpec.swift b/Tests/ReactiveSwiftTests/LifetimeSpec.swift index 5b64ccb53..63fcfb94d 100644 --- a/Tests/ReactiveSwiftTests/LifetimeSpec.swift +++ b/Tests/ReactiveSwiftTests/LifetimeSpec.swift @@ -1,6 +1,6 @@ import Quick import Nimble -@testable import ReactiveSwift +import ReactiveSwift import Result final class LifetimeSpec: QuickSpec { diff --git a/Tests/ReactiveSwiftTests/PropertySpec.swift b/Tests/ReactiveSwiftTests/PropertySpec.swift index 161637006..7479f7efd 100644 --- a/Tests/ReactiveSwiftTests/PropertySpec.swift +++ b/Tests/ReactiveSwiftTests/PropertySpec.swift @@ -253,7 +253,7 @@ class PropertySpec: QuickSpec { var property = Optional(MutableProperty(1)) var isEnded = false - property!.lifetime.ended.observeCompleted { + property!.lifetime.observeEnded { isEnded = true } diff --git a/Tests/ReactiveSwiftTests/SignalProducerSpec.swift b/Tests/ReactiveSwiftTests/SignalProducerSpec.swift index 7ac5c58f5..46b04ec70 100644 --- a/Tests/ReactiveSwiftTests/SignalProducerSpec.swift +++ b/Tests/ReactiveSwiftTests/SignalProducerSpec.swift @@ -923,7 +923,7 @@ class SignalProducerSpec: QuickSpec { it("doesn't extend the lifetime of the throttle property") { var completed = false - shouldThrottle.lifetime.ended.observeCompleted { completed = true } + shouldThrottle.lifetime.observeEnded { completed = true } observer.send(value: 1) shouldThrottle = nil diff --git a/Tests/ReactiveSwiftTests/SignalSpec.swift b/Tests/ReactiveSwiftTests/SignalSpec.swift index 307f797aa..600c7efb6 100755 --- a/Tests/ReactiveSwiftTests/SignalSpec.swift +++ b/Tests/ReactiveSwiftTests/SignalSpec.swift @@ -1713,7 +1713,7 @@ class SignalSpec: QuickSpec { it("doesn't extend the lifetime of the throttle property") { var completed = false - shouldThrottle.lifetime.ended.observeCompleted { completed = true } + shouldThrottle.lifetime.observeEnded { completed = true } observer.send(value: 1) shouldThrottle = nil