Skip to content

Bundle the TAP-Y and TAP-J reporters - #11

Merged
trans merged 1 commit into
masterfrom
feature/bundle-tapy-tapj
Nov 17, 2026
Merged

trans merged 1 commit into
masterfrom
feature/bundle-tapy-tapj

Conversation

@trans

@trans trans commented Nov 17, 2026

Copy link
Copy Markdown
Member

#9 brought the summary, outline, progress and TAP 13 reporters into rubytest, and removed the -y and -j shortcuts because TAP-Y and TAP-J were left in the separate rubytest-tap gem. This brings those two in as well and restores the shortcuts, so rubytest-tap is no longer needed for any format.

Changes

  • lib/rubytest/format/tapy.rb and tapj.rb, adapted from rubytest-tap 0.1.0. Like the TAP reporter, they take an output: stream.
  • -y/--tapy and -j/--tapj are back, and both formats are in the known list. -f tap still selects TAP 13.
  • AbstractHash#skip_case no longer calls the public skip_test, so a subclass that writes each record doesn't write a skipped case twice.

Differences from rubytest-tap

  • The TAP-Y stream opens with a YAML document. rubytest-tap wrote the suite record as JSON.
  • The TAP-J stream no longer ends with a ... line, which isn't JSON.
  • Skipped tests and cases are written, as omit. rubytest-tap's reporters defined omit, which the runner never called, so skips were missing from the stream.

Testing

  • bundle exec rake test: 5 demos, 36 steps, 108 assertions, all passing. A new section in demo/05_builtin_reporters.md parses both streams and checks the suite record, one record per result, the statuses, and the final counts, and that the shortcuts set the format.
  • rubytest -y and rubytest -j on a file with a passing, a failing and a skipped test: output read by eye.
  • Not tried against tapout.

Independent of #10; the two touch different lines.

🤖 Generated with Claude Code

Bring both in from rubytest-tap and restore the -y and -j shortcuts, which
were removed because the formats weren't in the gem.

The TAP-Y stream now opens with a YAML document (rubytest-tap wrote the
suite record as JSON), the TAP-J stream no longer ends with a `...` line,
and both report skipped tests and cases, which rubytest-tap's never
printed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@trans
trans merged commit 1fe05d9 into master Nov 17, 2026
4 checks passed
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.

1 participant