Skip to content

Commit

Permalink
Merge pull request #527 from nimblehq/feature/#482-upgrade-quick-nimble
Browse files Browse the repository at this point in the history
[#482] Migrate Quick/Nimble tests to Quick 7
  • Loading branch information
blyscuit authored Oct 17, 2023
2 parents d10fa8b + 3b6e33a commit 325657d
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Tuist/Interfaces/SwiftUI/Project/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
4 changes: 2 additions & 2 deletions Tuist/Interfaces/UIKit/Project/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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") {

Expand All @@ -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!")
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions {PROJECT_NAME}KIFUITests/Sources/Utilities/KIF+Swift.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

import KIF

extension XCTestCase {
extension KIFSpec {

func tester(file: String = #file, _ line: Int = #line) -> KIFUITestActor {
return KIFUITestActor(inFile: file, atLine: line, delegate: self)
static func tester(file: String = #file, _ line: Int = #line) -> KIFUITestActor {
return KIFUITestActor(inFile: file, atLine: line, delegate: kifDelegate)
}

func system(file: String = #file, _ line: Int = #line) -> KIFSystemTestActor {
return KIFSystemTestActor(inFile: file, atLine: line, delegate: self)
static func system(file: String = #file, _ line: Int = #line) -> KIFSystemTestActor {
return KIFSystemTestActor(inFile: file, atLine: line, delegate: kifDelegate)
}
}
10 changes: 10 additions & 0 deletions {PROJECT_NAME}KIFUITests/Sources/Utilities/KIFSpec.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//
// KIFSpec.swift
//

import Quick

class KIFSpec: QuickSpec {

static let kifDelegate = XCTestCase()
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import Quick

@testable import {PROJECT_NAME}

final class NetworkAPISpec: QuickSpec {
final class NetworkAPISpec: AsyncSpec {

override func spec() {
override class func spec() {

describe("a NetworkAPI") {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Quick

final class OptionalUnwrapSpec: QuickSpec {

override func spec() {
override class func spec() {

describe("an string optional") {
var value: String?
Expand Down

0 comments on commit 325657d

Please sign in to comment.