Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import Foundation
@testable import Foobar
import Quick
import Nimble
import Mockingjay
import APIKit
final class FooRequestSpec: QuickSpec {
override func spec() {
describe("FooRequest") {
context("正常系") {
let request = FooRequest()
var sut: FooStatus!
beforeEach {
waitUntil { done in
self.stub(uri: "/foo", status: 200, with: "foo") // ここでスタブする
MySession.send(request) { result in
switch result {
case .success(let response):
sut = response
case .failure: break
}
done()
}
}
}
it("取得結果が期待値と同じであること") {
expect(sut.id).to(equal(1))
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.