Skip to content

Commit

Permalink
Fix tests for newest 6.1.0 ReactiveSwift
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshinejr committed Aug 13, 2019
1 parent c09c65f commit f3234f1
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions Tests/MoyaTests/SignalProducer+MoyaSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ final class SignalProducerMoyaSpec: QuickSpec {

var receivedString: String?
signal.mapString().startWithResult { result in
receivedString = result.value
receivedString = try? result.get()
}

expect(receivedString).to(equal(string))
Expand All @@ -278,7 +278,7 @@ final class SignalProducerMoyaSpec: QuickSpec {

var receivedString: String?
signal.mapString(atKeyPath: "words_to_live_by").startWithResult { result in
receivedString = result.value
receivedString = try? result.get()
}

expect(receivedString).to(equal(string))
Expand Down Expand Up @@ -324,7 +324,7 @@ final class SignalProducerMoyaSpec: QuickSpec {

var receivedObject: Issue?
_ = signal.map(Issue.self, using: decoder).startWithResult { result in
receivedObject = result.value
receivedObject = try? result.get()
}
expect(receivedObject).notTo(beNil())
expect(receivedObject?.title) == "Hello, Moya!"
Expand All @@ -340,7 +340,7 @@ final class SignalProducerMoyaSpec: QuickSpec {

var receivedObjects: [Issue]?
_ = signal.map([Issue].self, using: decoder).startWithResult { result in
receivedObjects = result.value
receivedObjects = try? result.get()
}
expect(receivedObjects).notTo(beNil())
expect(receivedObjects?.count) == 3
Expand All @@ -352,7 +352,7 @@ final class SignalProducerMoyaSpec: QuickSpec {

var receivedObjects: OptionalIssue?
_ = signal.map(OptionalIssue.self, using: decoder, failsOnEmptyData: false).startWithResult { result in
receivedObjects = result.value
receivedObjects = try? result.get()
}
expect(receivedObjects).notTo(beNil())
expect(receivedObjects?.title).to(beNil())
Expand All @@ -364,7 +364,7 @@ final class SignalProducerMoyaSpec: QuickSpec {

var receivedObjects: [OptionalIssue]?
_ = signal.map([OptionalIssue].self, using: decoder, failsOnEmptyData: false).startWithResult { result in
receivedObjects = result.value
receivedObjects = try? result.get()
}
expect(receivedObjects).notTo(beNil())
expect(receivedObjects?.count) == 1
Expand All @@ -382,7 +382,7 @@ final class SignalProducerMoyaSpec: QuickSpec {

var receivedObject: Issue?
_ = signal.map(Issue.self, atKeyPath: "issue", using: decoder).startWithResult { result in
receivedObject = result.value
receivedObject = try? result.get()
}
expect(receivedObject).notTo(beNil())
expect(receivedObject?.title) == "Hello, Moya!"
Expand All @@ -398,7 +398,7 @@ final class SignalProducerMoyaSpec: QuickSpec {

var receivedObjects: [Issue]?
_ = signal.map([Issue].self, atKeyPath: "issues", using: decoder).startWithResult { result in
receivedObjects = result.value
receivedObjects = try? result.get()
}
expect(receivedObjects).notTo(beNil())
expect(receivedObjects?.count) == 1
Expand All @@ -411,7 +411,7 @@ final class SignalProducerMoyaSpec: QuickSpec {

var receivedObjects: OptionalIssue?
_ = signal.map(OptionalIssue.self, atKeyPath: "issue", using: decoder, failsOnEmptyData: false).startWithResult { result in
receivedObjects = result.value
receivedObjects = try? result.get()
}
expect(receivedObjects).notTo(beNil())
expect(receivedObjects?.title).to(beNil())
Expand All @@ -423,7 +423,7 @@ final class SignalProducerMoyaSpec: QuickSpec {

var receivedObjects: [OptionalIssue]?
_ = signal.map([OptionalIssue].self, atKeyPath: "issue", using: decoder, failsOnEmptyData: false).startWithResult { result in
receivedObjects = result.value
receivedObjects = try? result.get()
}
expect(receivedObjects).notTo(beNil())
expect(receivedObjects?.count) == 1
Expand All @@ -440,7 +440,7 @@ final class SignalProducerMoyaSpec: QuickSpec {

var count: Int?
_ = signal.map(Int.self, atKeyPath: "count", using: decoder).startWithResult { result in
count = result.value
count = try? result.get()
}
expect(count).notTo(beNil())
expect(count) == 1
Expand All @@ -455,7 +455,7 @@ final class SignalProducerMoyaSpec: QuickSpec {

var isNew: Bool?
_ = signal.map(Bool.self, atKeyPath: "isNew", using: decoder).startWithResult { result in
isNew = result.value
isNew = try? result.get()
}
expect(isNew).notTo(beNil())
expect(isNew) == true
Expand All @@ -470,7 +470,7 @@ final class SignalProducerMoyaSpec: QuickSpec {

var description: String?
_ = signal.map(String.self, atKeyPath: "description", using: decoder).startWithResult { result in
description = result.value
description = try? result.get()
}
expect(description).notTo(beNil())
expect(description) == "Something interesting"
Expand All @@ -485,7 +485,7 @@ final class SignalProducerMoyaSpec: QuickSpec {

var url: URL?
_ = signal.map(URL.self, atKeyPath: "url", using: decoder).startWithResult { result in
url = result.value
url = try? result.get()
}
expect(url).notTo(beNil())
expect(url) == URL(string: "http://www.example.com/test")
Expand All @@ -500,7 +500,7 @@ final class SignalProducerMoyaSpec: QuickSpec {

var isNew: Bool?
_ = signal.map(Bool.self, atKeyPath: "isNew", using: decoder).startWithResult { result in
isNew = result.value
isNew = try? result.get()
}
expect(isNew).to(beNil())
}
Expand All @@ -514,7 +514,7 @@ final class SignalProducerMoyaSpec: QuickSpec {

var test: Int?
_ = signal.map(Int.self, atKeyPath: "test", using: decoder).startWithResult { result in
test = result.value
test = try? result.get()
}
expect(test).to(beNil())
}
Expand All @@ -528,7 +528,7 @@ final class SignalProducerMoyaSpec: QuickSpec {

var test: String?
_ = signal.map(String.self, atKeyPath: "test", using: decoder).startWithResult { result in
test = result.value
test = try? result.get()
}
expect(test).to(beNil())
}
Expand All @@ -542,7 +542,7 @@ final class SignalProducerMoyaSpec: QuickSpec {

var test: [String]?
_ = signal.map([String].self, atKeyPath: "test", using: decoder).startWithResult { result in
test = result.value
test = try? result.get()
}
expect(test).to(beNil())
}
Expand Down

0 comments on commit f3234f1

Please sign in to comment.