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

Improve output for times verification failures #85

Closed
searls opened this issue Mar 20, 2016 · 1 comment
Closed

Improve output for times verification failures #85

searls opened this issue Mar 20, 2016 · 1 comment

Comments

@searls
Copy link
Member

searls commented Mar 20, 2016

See this test:

      context '1 time, unsatisfied (with 2)', ->
        When -> @testDouble()
        And -> @testDouble()
        Then -> shouldThrow (=> td.verify(@testDouble(), times: 1)), """
          Unsatisfied verification on test double.

            Wanted:
              - called with `()` 1 time.

            But was actually called:
              - called with `()`.
              - called with `()`.
          """

I'd rather see it end with:

          """
            But was actually called:
              - called with `()` 2 times.
          """

This would require some care to make sure we account for matchers of different types of calls when we compare and print the actuals (since if the matchers satisfy they'll 'look' the same to the lib. We'd need a way to disable matchers for this purpose)

@searls
Copy link
Member Author

searls commented Dec 14, 2016

This will be resolved indirectly via #161, tracking it there

@searls searls closed this as completed Dec 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant