Skip to content

Commit 9fc8bc9

Browse files
committed
Import SwiftRex without testable
1 parent d097b8a commit 9fc8bc9

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ 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.8.4"))
20+
.package(name: "SwiftRex", url: "https://github.com/SwiftRex/SwiftRex.git", .upToNextMajor(from: "0.8.6"))
2121
],
2222
targets: [
2323
.target(

Sources/TestingExtensions/UseCaseTests.swift

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import Combine
1111
import CombineRex
1212
import Foundation
13-
@testable import SwiftRex
13+
import SwiftRex
1414
import XCTest
1515

1616
#if swift(>=5.4)
@@ -337,7 +337,11 @@ extension XCTestCase {
337337
afterReducer: &afterReducer
338338
)
339339
reducer.reduce(action, &state)
340-
afterReducer.reducerIsDone()
340+
#if DEBUG
341+
afterReducer.performBlock()
342+
#else
343+
XCTFail("Please run the tests in DEBUG otherwise after reducer won't be called")
344+
#endif
341345

342346
stateChange(&expected)
343347
ensureStateMutation(
@@ -366,7 +370,11 @@ extension XCTestCase {
366370
afterReducer: &afterReducer
367371
)
368372
reducer.reduce(first, &state)
369-
afterReducer.reducerIsDone()
373+
#if DEBUG
374+
afterReducer.performBlock()
375+
#else
376+
XCTFail("Please run the tests in DEBUG otherwise after reducer won't be called")
377+
#endif
370378

371379
stateChange(&expected)
372380
ensureStateMutation(

0 commit comments

Comments
 (0)