Skip to content

Fix: Update project to Xcode 15, iOS 17 and Quick latest release #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Mockingbird
import ViewModels

final class CountryListErrorTests: QuickSpec {
override func spec() {
override class func spec() {
describe("CountryListError") {
var container: Container!
var viewModel: CountryListViewModel!
Expand Down
8 changes: 0 additions & 8 deletions Packages/Logic/Sources/Logic/DI/Container+BusinessLogic.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,4 @@ public extension Container {

return self
}

func injectBusinessLogicRepositories() -> Container {
self.autoregister(CountryListRepository.self, initializer: CountryListRepository.init).inObjectScope(.container)
self.autoregister(CountryDetailsRepository.self, initializer: CountryDetailsRepository.init).inObjectScope(.container)
self.autoregister(ServerStatusPushBasedRepository.self, initializer: ServerStatusPushBasedRepository.init).inObjectScope(.container)

return self
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import RepositoriesMocks
@testable import Logic

final class CountryDetailsLogicTests: QuickSpec {
override func spec() {
override class func spec() {
describe("CountryDetailsLogic") {
var container: Container!
var logic: CountryDetailsLogic!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import Mockingbird
@testable import Logic

final class CountryListLogicTests: QuickSpec {
override func spec() {
override class func spec() {
describe("CountryListLogic") {
var container: Container!
var logic: CountryListLogic!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import XCTest
@testable import Repositories

final class CountryDetailsRepositoryTests: QuickSpec {
override func spec() {
override class func spec() {
describe("CountryDetailsRepository") {
var container: Container!
var repository: CountryDetailsRepository!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import Mockingbird
import InterfaceMocks

final class CountryListRepositoryTests: QuickSpec {
override func spec() {
override class func spec() {
describe("CountryListRepository") {
var container: Container!
var repository: CountryListRepository!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
import Foundation
import Nimble

public func beApproximately(_ of: Date) -> Predicate<Date> {
public func beApproximately(_ of: Date) -> Nimble.Predicate<Date> {
return beWithin(10, of: of)
}

public func beWithin(_ interval: TimeInterval, of: Date) -> Predicate<Date> {
return Predicate.define("be <content>") { expression, message in
public func beWithin(_ interval: TimeInterval, of: Date) -> Nimble.Predicate<Date> {
return Nimble.Predicate.define("be <content>") { expression, message in
guard let actual = try expression.evaluate() else {
return PredicateResult(status: .fail, message: message)
}
Expand All @@ -28,7 +28,7 @@ public func beWithin(_ interval: TimeInterval, of: Date) -> Predicate<Date> {

#if !os(macOS)
import UIKit
public func beSameImage(_ expectedData: UIImage) -> Predicate<UIImage> {
public func beSameImage(_ expectedData: UIImage) -> Nimble.Predicate<UIImage> {
return Predicate.define("be <content>") { expression, message in
guard let actualData = try expression.evaluate() else {
return PredicateResult(status: .fail, message: message)
Expand All @@ -43,8 +43,8 @@ public func beSameImage(_ expectedData: UIImage) -> Predicate<UIImage> {
}
#else
import AppKit
public func beSameImage(_ expectedData: NSImage) -> Predicate<NSImage> {
return Predicate.define("be <content>") { expression, message in
public func beSameImage(_ expectedData: NSImage) -> Nimble.Predicate<NSImage> {
return Nimble.Predicate.define("be <content>") { expression, message in
guard let actualData = try expression.evaluate() else {
return PredicateResult(status: .fail, message: message)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import CombineSchedulers

// swiftlint:disable pss_forced_try
public func runAfterBeforeEach(_ closure: @escaping BeforeExampleClosure) {
justBeforeEach(closure)
QuickSpec.justBeforeEach(closure)
}

@discardableResult
Expand Down Expand Up @@ -89,7 +89,7 @@ public func waitNext<Output, Error>(_ publisher: AnyPublisher<Output, Error>,
//}

public func asyncBeforeEach(_ closure: @MainActor @escaping (ExampleMetadata) async -> Void) {
beforeEach({ exampleMetadata in
QuickSpec.beforeEach({ exampleMetadata in
let expectation = QuickSpec.current.expectation(description: "asyncBeforeEach")
Task {
await closure(exampleMetadata)
Expand All @@ -100,7 +100,7 @@ public func asyncBeforeEach(_ closure: @MainActor @escaping (ExampleMetadata) as
}

public func asyncAfterEach(_ closure: @MainActor @escaping (ExampleMetadata) async -> Void) {
afterEach({ exampleMetadata in
QuickSpec.afterEach({ exampleMetadata in
let expectation = QuickSpec.current.expectation(description: "asyncAfterEach")
Task {
await closure(exampleMetadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import RepositoriesMocks
@testable import ViewModels

final class CountryDetailsViewModelTests: QuickSpec {
override func spec() {
override class func spec() {
describe("CountryDetailsViewModel") {
var container: Container!
var viewModel: CountryDetailsViewModel!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import Mockingbird
@testable import ViewModels

final class CountryListViewModelTests: QuickSpec {
override func spec() {
override class func spec() {
describe("CountryListViewModelTests") {
var container: Container!
var viewModel: CountryListViewModel!
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "YES">
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "61C9EED228CD3A9500ACDF3E"
Expand All @@ -39,7 +39,7 @@
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "YES">
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DomainModelsTests"
Expand All @@ -49,7 +49,7 @@
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "YES">
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FeatureTests"
Expand All @@ -59,7 +59,7 @@
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "YES">
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "InterfacesTests"
Expand All @@ -69,7 +69,7 @@
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "YES">
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "LogicTests"
Expand All @@ -79,7 +79,7 @@
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "YES">
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "NetworkLogicTests"
Expand All @@ -89,7 +89,7 @@
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "YES">
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "RepositoriesTests"
Expand All @@ -99,7 +99,7 @@
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "YES">
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "UIComponentsTests"
Expand All @@ -109,7 +109,7 @@
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "YES">
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "UtilsTests"
Expand All @@ -119,7 +119,7 @@
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "YES">
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ViewModelsTests"
Expand All @@ -139,6 +139,16 @@
ReferencedContainer = "container:TravelAdvisories.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FrameworkProvidersTests"
BuildableName = "FrameworkProvidersTests"
BlueprintName = "FrameworkProvidersTests"
ReferencedContainer = "container:Packages/FrameworkProviders">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand Down