Skip to content

Conversation

roschlau
Copy link
Contributor

@roschlau roschlau commented Jul 2, 2016

This would fix the incorrect labeling of Free Spec as Flat Spec, as reported in issue #52.

Fix incorrect labeling of Free Spec as Flat Spec
@sksamuel sksamuel merged commit 3833c72 into kotest:master Jul 2, 2016
@sksamuel
Copy link
Member

sksamuel commented Jul 2, 2016

👍

@roschlau roschlau deleted the patch-1 branch July 3, 2016 11:20
github-merge-queue bot pushed a commit that referenced this pull request Jul 20, 2024
add search for similarity to `contain` for example:
```
         "print a similar key when no exact match" {
            val message = shouldThrow<AssertionError> {
               mapOf(sweetGreenApple to 1, sweetRedApple to 2) should contain(sweetGreenPear, 1)
            }.message
            message shouldContain """
               | expected: Fruit(name=apple, color=green, taste=sweet),
               |  but was: Fruit(name=pear, color=green, taste=sweet),
               |  The following fields did not match:
               |    "name" expected: <"apple">, but was: <"pear">
            """.trimMargin()
         }
         "print entries with same value" {
            val message = shouldThrow<AssertionError> {
               mapOf(sweetGreenApple to 1, sweetRedApple to 2) should contain(sweetGreenPear, 1)
            }.message
            message shouldContain """
               |Same value found for the following entries: [Fruit(name=apple, color=green, taste=sweet)=1]
            """.trimMargin()
         }
         "print entries with similar values" {
            val message = shouldThrow<AssertionError> {
               mapOf(1 to sweetGreenApple, 2 to sweetRedApple) should contain(3, sweetGreenPear)
            }.message
            message shouldContain """
               | expected: Fruit(name=apple, color=green, taste=sweet),
               |  but was: Fruit(name=pear, color=green, taste=sweet),
               |  The following fields did not match:
               |    "name" expected: <"apple">, but was: <"pear">
            """.trimMargin()
         }
```

Co-authored-by: Sam <sam@sksamuel.com>
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