Skip to content

Commit f2180b8

Browse files
freak4pckzaher
authored andcommitted
Some more minor cleanups around RxBlocking docs
1 parent d13751d commit f2180b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Documentation/UnitTests.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ It's easy to define `RxTests` extensions so you can write your tests in a readab
8686

8787
It is also possible to write integration tests by using `RxBlocking` operators.
8888

89-
Importing operators from the `RxBlocking` library will enable blocking the current thread and wait for sequence results.
89+
Using `RxBlocking`'s `toBlocking()` method, you can block the current thread and wait for the sequence to complete, allowing you to synchronously access its result.
9090

9191
A simple way to test the result of your sequence is using the `toArray` method. It will return an array of all elements emitted once a sequence has completed successfully, or `throw` if an error caused the sequence to terminate.
9292

@@ -98,7 +98,7 @@ let result = try fetchResource(location)
9898
XCTAssertEqual(result, expectedResult)
9999
```
100100

101-
Another option is to use the `materialize` operator which allows you to more granularly examine your sequence. It will return a `MaterializedSequenceResult` enumeration that could be either `.completed` along with the emitted elements if the sequence completed successfully, or `failed` if the sequence terminated with an error, along with the emitted error.
101+
Another option would be to use the `materialize` operator which lets you more granularly examine your sequence. It will return a `MaterializedSequenceResult` enumeration that could be either `.completed` along with the emitted elements if the sequence completed successfully, or `failed` if the sequence terminated with an error, along with the emitted error.
102102

103103
```swift
104104
let result = try fetchResource(location)

0 commit comments

Comments
 (0)