Skip to content

Commit ec0e5fc

Browse files
committed
. f Improve filename
1 parent e6493ce commit ec0e5fc

3 files changed

Lines changed: 2 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func test_incrementOnce_withBoilerplate() throws {
4646

4747
That's a lot of boilerplate, and it makes it harder to scan for the test intent.
4848

49-
[InspectChangingView.swift](https://github.com/jonreid/TestableView/blob/main/InspectChangingView.swift) provides an XCTestCase extension to take care of that boilerplate.
49+
[XCTestCase+InspectChangingView.swift](https://github.com/jonreid/TestableView/blob/main/XCTestCase+InspectChangingView.swift) provides an XCTestCase extension to take care of that boilerplate.
5050

5151
## Adding it to your project
5252

@@ -68,7 +68,7 @@ The new XCTestCase method relies on a TestableView type to define the hook for V
6868

6969
### Test code
7070

71-
1. Copy [InspectChangingView.swift](https://github.com/jonreid/TestableView/blob/main/InspectChangingView.swift) into your test code. You can also [subscribe to my blog](https://qualitycoding.org/subscribe-swiftui-tdd/), install the custom code snippets, and expand “inspectchange” into a new file.
71+
1. Copy [XCTestCase+InspectChangingView.swift](https://github.com/jonreid/TestableView/blob/main/XCTestCase+InspectChangingView.swift) into your test code.
7272
2. Change the `YourModule` placeholder so it does an `@testable import` from the module that defines `TestableView`.
7373

7474
## Use it in your test

SampleApp/CounterTests/InspectChangingView.swift renamed to SampleApp/CounterTests/XCTestCase+InspectChangingView.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import ViewInspector
77
import XCTest
88

99
extension XCTestCase {
10-
// swiftlint:disable file_name
1110
@MainActor func inspectChangingView<V: TestableView>(
1211
_ sut: inout V,
1312
actionCapturingResult: @escaping ((InspectableView<ViewType.View<V>>) throws -> Void),
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import ViewInspector
77
import XCTest
88

99
extension XCTestCase {
10-
// swiftlint:disable file_name
1110
@MainActor func inspectChangingView<V: TestableView>(
1211
_ sut: inout V,
1312
action: @escaping ((InspectableView<ViewType.View<V>>) throws -> Void),

0 commit comments

Comments
 (0)