Skip to content

Commit 9455570

Browse files
committed
Update SwiftRex and deps
1 parent 7d6c652 commit 9455570

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

Package.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,14 @@ let package = Package(
1717
],
1818
dependencies: [
1919
.package(name: "SnapshotTesting", url: "https://github.com/pointfreeco/swift-snapshot-testing.git", .upToNextMajor(from: "1.8.2")),
20-
.package(name: "SwiftRex", url: "https://github.com/SwiftRex/SwiftRex.git", .upToNextMajor(from: "0.7.5"))
20+
.package(name: "SwiftRex", url: "https://github.com/SwiftRex/SwiftRex.git", .upToNextMajor(from: "0.8.1"))
2121
],
2222
targets: [
23-
.target(name: "TestingExtensions", dependencies: ["SnapshotTesting", .product(name: "CombineRexDynamic", package: "SwiftRex")])
23+
.target(
24+
name: "TestingExtensions",
25+
dependencies: [
26+
"SnapshotTesting", .product(name: "CombineRexDynamic", package: "SwiftRex")
27+
]
28+
)
2429
]
2530
)

Sources/TestingExtensions/SnapshotTestBase.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2020 Lautsprecher Teufel GmbH. All rights reserved.
77
//
88

9-
#if canImport(UIKit)
9+
#if canImport(UIKit) && canImport(XCTest)
1010
import Foundation
1111
import SnapshotTesting
1212
import SwiftUI

Sources/TestingExtensions/UseCaseTests.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Copyright © 2020 Lautsprecher Teufel GmbH. All rights reserved.
77
//
88

9+
#if canImport(XCTest)
910
import Combine
1011
import CombineRex
1112
import Foundation
@@ -106,7 +107,7 @@ extension XCTestCase {
106107
from: .init(file: "\(file)", function: "", line: line, info: nil),
107108
afterReducer: &afterReducer
108109
)
109-
state = reducer.reduce(action, state)
110+
reducer.reduce(action, &state)
110111
afterReducer.reducerIsDone()
111112

112113
stateChange(&expected)
@@ -128,7 +129,7 @@ extension XCTestCase {
128129
from: .init(file: "\(file)", function: "", line: line, info: nil),
129130
afterReducer: &afterReducer
130131
)
131-
state = reducer.reduce(action, state)
132+
reducer.reduce(action, &state)
132133
afterReducer.reducerIsDone()
133134

134135
stateChange(&expected)
@@ -166,3 +167,4 @@ extension XCTestCase {
166167
)
167168
}
168169
}
170+
#endif

0 commit comments

Comments
 (0)