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

Add extension functions for table assertions. #349

Merged
merged 1 commit into from
Jun 1, 2018

Conversation

ajalt
Copy link
Contributor

@ajalt ajalt commented Jun 1, 2018

These extensions simplify the common case of creating a table and
immediately asserting on its contents. They let you write code like
this:

table(...).forAll { a, b -> ...}

instead of needing an intermediate variable:

val myTable = table(...)
forAll(myTable) { a, b -> ... }

I deliberately did not change any documentation in this PR. If it's
accepted, documentation can be updated in another commit.

These extensions simplify the common case of creating a table and
immediately asserting on its contents. They let you write code like
this:

```kotlin
table(...).forAll { a, b -> ...}
```

instead of needing an intermediate variable:

```kotlin
val myTable = table(...)
forAll(myTable) { a, b -> ... }
```

I deliberately did not change any documentation in this PR. If it's
accepted, documentation can be updated in another commit.
@sksamuel sksamuel merged commit ea6940b into kotest:master Jun 1, 2018
@sksamuel
Copy link
Member

sksamuel commented Jun 1, 2018

Excellent!

@ajalt ajalt deleted the table-extensions branch June 1, 2018 20:00
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