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 TAP formatter to spec suite #6286

Merged
merged 3 commits into from
Aug 1, 2018

Conversation

straight-shoota
Copy link
Member

This PR adds a formatter for test anything protocol (TAP) to Spec.

The first two commits refactor some aspects of spec formatter implementation, the third finally implements TAPFormatter.

  • The first commit decouples spec formatters from directly writing to STDOUT ti make it easier to test them.
  • The second commit moves responsibility for printing the final results to the formatter. They are only written by DotFormatter and VerboseFormatter


def report(result)
case result.kind
when :success
Copy link
Contributor

@wooster0 wooster0 Jun 28, 2018

Choose a reason for hiding this comment

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

This should be when :success, :pending. And the when :pending should be removed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nope, that would reduce visibility. Separate entries makes it obvious what we're looking at.

@RX14
Copy link
Contributor

RX14 commented Jun 29, 2018

Might want to think about printing the version line, but it's not required for this version of the spec.

@straight-shoota
Copy link
Member Author

@RX14 I had the idea to attach some diagnostics (location, failure message) to the test reports similar to this: https://github.com/MakeNowJust/tap/blob/master/spec/fizzbuzz.txt
But for now, I'd like to merge this PR and discuss extensions afterwards.

@straight-shoota
Copy link
Member Author

Rebased to squash changes in logical commits and trigger CI-rebuild.

@RX14 RX14 added this to the 0.26.0 milestone Aug 1, 2018
@RX14 RX14 merged commit 6fc15ba into crystal-lang:master Aug 1, 2018
@straight-shoota straight-shoota deleted the jm/feature/spec-tap branch August 1, 2018 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants