From fc73582b238e19bcf721e865a79a73cb57bd5881 Mon Sep 17 00:00:00 2001 From: Bliss Pisit Wetcha Date: Thu, 5 Oct 2023 12:14:37 +0700 Subject: [PATCH] [#482] Update Quick and Nimble with better support for async --- Tuist/Interfaces/SwiftUI/Project/Podfile | 4 ++-- Tuist/Interfaces/UIKit/Project/Podfile | 4 ++-- .../Sources/Specs/Application/ApplicationSpec.swift | 6 +++--- .../Sources/Utilities/KIFSpec.swift | 10 ++++++++++ .../Sources/Specs/Data/NetworkAPI/NetworkAPISpec.swift | 2 +- .../Extensions/Foundation/OptionalUnwrapSpec.swift | 2 +- 6 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 {PROJECT_NAME}KIFUITests/Sources/Utilities/KIFSpec.swift diff --git a/Tuist/Interfaces/SwiftUI/Project/Podfile b/Tuist/Interfaces/SwiftUI/Project/Podfile index 7a0d2eed..5c5a1e9a 100644 --- a/Tuist/Interfaces/SwiftUI/Project/Podfile +++ b/Tuist/Interfaces/SwiftUI/Project/Podfile @@ -3,8 +3,8 @@ use_frameworks! inhibit_all_warnings! def testing_pods - pod 'Quick', '~> 6.0' - pod 'Nimble', '~> 11.0' + pod 'Quick', '~> 7.0' + pod 'Nimble', '~> 12.0' pod 'Sourcery' pod 'SwiftFormat/CLI' pod 'OHHTTPStubs/Swift', :configurations => ['Debug Staging', 'Debug Production'] diff --git a/Tuist/Interfaces/UIKit/Project/Podfile b/Tuist/Interfaces/UIKit/Project/Podfile index ab75d34b..1d90e584 100644 --- a/Tuist/Interfaces/UIKit/Project/Podfile +++ b/Tuist/Interfaces/UIKit/Project/Podfile @@ -3,8 +3,8 @@ use_frameworks! inhibit_all_warnings! def testing_pods - pod 'Quick', '~> 6.0' - pod 'Nimble', '~> 11.0' + pod 'Quick', '~> 7.0' + pod 'Nimble', '~> 12.0' pod 'Sourcery' pod 'SwiftFormat/CLI' pod 'OHHTTPStubs/Swift', :configurations => ['Debug Staging', 'Debug Production'] diff --git a/{PROJECT_NAME}KIFUITests/Sources/Specs/Application/ApplicationSpec.swift b/{PROJECT_NAME}KIFUITests/Sources/Specs/Application/ApplicationSpec.swift index 9380ba9f..238a4b10 100644 --- a/{PROJECT_NAME}KIFUITests/Sources/Specs/Application/ApplicationSpec.swift +++ b/{PROJECT_NAME}KIFUITests/Sources/Specs/Application/ApplicationSpec.swift @@ -6,9 +6,9 @@ import Foundation import Nimble import Quick -final class ApplicationSpec: QuickSpec { +final class ApplicationSpec: KIFSpec { - override func spec() { + override class func spec() { describe("a {PROJECT_NAME} screen") { @@ -23,7 +23,7 @@ final class ApplicationSpec: QuickSpec { context("when opens") { it("shows its UI components") { - self.tester().waitForView(withAccessibilityLabel: "Hello, world!") + tester().waitForView(withAccessibilityLabel: "Hello, world!") } } } diff --git a/{PROJECT_NAME}KIFUITests/Sources/Utilities/KIFSpec.swift b/{PROJECT_NAME}KIFUITests/Sources/Utilities/KIFSpec.swift new file mode 100644 index 00000000..15b2e17a --- /dev/null +++ b/{PROJECT_NAME}KIFUITests/Sources/Utilities/KIFSpec.swift @@ -0,0 +1,10 @@ +// +// KIFSpec.swift +// + +import Quick + +class KIFSpec: QuickSpec { + + static let kifDelegate = XCTestCase() +} diff --git a/{PROJECT_NAME}Tests/Sources/Specs/Data/NetworkAPI/NetworkAPISpec.swift b/{PROJECT_NAME}Tests/Sources/Specs/Data/NetworkAPI/NetworkAPISpec.swift index c26bbdd0..1795c9d9 100644 --- a/{PROJECT_NAME}Tests/Sources/Specs/Data/NetworkAPI/NetworkAPISpec.swift +++ b/{PROJECT_NAME}Tests/Sources/Specs/Data/NetworkAPI/NetworkAPISpec.swift @@ -9,7 +9,7 @@ import Quick final class NetworkAPISpec: QuickSpec { - override func spec() { + override class func spec() { describe("a NetworkAPI") { diff --git a/{PROJECT_NAME}Tests/Sources/Specs/Supports/Extensions/Foundation/OptionalUnwrapSpec.swift b/{PROJECT_NAME}Tests/Sources/Specs/Supports/Extensions/Foundation/OptionalUnwrapSpec.swift index c6952037..71d436f7 100644 --- a/{PROJECT_NAME}Tests/Sources/Specs/Supports/Extensions/Foundation/OptionalUnwrapSpec.swift +++ b/{PROJECT_NAME}Tests/Sources/Specs/Supports/Extensions/Foundation/OptionalUnwrapSpec.swift @@ -9,7 +9,7 @@ import Quick final class OptionalUnwrapSpec: QuickSpec { - override func spec() { + override class func spec() { describe("an string optional") { var value: String?