Skip to content
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

Reorganize test cases #59

Merged
merged 3 commits into from
Nov 29, 2016
Merged

Reorganize test cases #59

merged 3 commits into from
Nov 29, 2016

Conversation

ishkawa
Copy link
Member

@ishkawa ishkawa commented Nov 28, 2016

Most test cases that I added in #56 overlap existing test cases, but they're written in different way. The new tests check logic on the virtual time. IMHO, the new test method is more appropriate for testing Rx library, so I would like to replace the old tests by the new tests.

Copy link
Member

@ashfurrow ashfurrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic work on a simplification to our test suite, thanks 🙇

@@ -91,6 +105,10 @@ class ActionTests: QuickSpec {
next(20, false),
])
}

it("executes twice") {
XCTAssertEqual(executionObservables.events.count, 2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the tests use Quick/Nimble, I think using a Nimble matcher instead of XCTAsserts might make sense. Something like expect(executionObservables) == 2. What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can use Nimble matchers here. I used XCTAssertEqual in other places for matching Recorded<Event<T>>, which is provided in RxTests, but other than that, Nimble matchers might be better choice.

I'll replace the matchers that can be replaced by Nimble matchers.

@ishkawa
Copy link
Member Author

ishkawa commented Nov 28, 2016

@ashfurrow Thank you for reviewing. I've just replaced the matchers in 1b816f2!

@ishkawa ishkawa merged commit e672085 into master Nov 29, 2016
@ishkawa ishkawa deleted the reorganize-test branch November 29, 2016 02:58
@ishkawa ishkawa mentioned this pull request Nov 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants