Skip to content

Modernize, and tell skipped examples from pending ones - #4

Merged
trans merged 2 commits into
masterfrom
modernize
Nov 22, 2026
Merged

trans merged 2 commits into
masterfrom
modernize

Conversation

@trans

@trans trans commented Nov 22, 2026

Copy link
Copy Markdown
Member

RSpec On Tap 0.3.1 still works on RSpec 3.13, so this is mostly upkeep, with a rewrite of the formatter along the lines of Minitap's new reporter.

Changes in the stream

  • An example skipped with skip or xit has the status omit. A pending one, or one with no body, is still todo. All four were todo before.
  • Both give their reason, as the message of the record's exception section.
  • A pending example that passes is a failure, as it is to RSpec. It was an error.
  • A failed mock expectation is a failure too.
  • What RSpec says outside of an example, such as an error while loading a spec file, is passed on as a note. It was dropped. A note that comes before the suite record waits until after it.
  • The seed is left out when the examples don't run in random order.

Structure

  • lib/rspec/ontap.rb: RSpec::TapBaseFormatter with RSpec::TapY and RSpec::TapJ, the names RSpec's -f option uses, unchanged.
  • Plain gemspec, Rakefile and GitHub Actions in place of .index, Assembly, MANIFEST and Travis.
  • The try/ example, which used a syntax RSpec no longer accepts, is replaced by QED demos.

Testing

Five QED demos (43 steps) write a spec file, run it with the rspec command and check the stream, including a pass through Tapout. I ran them locally in containers on Ruby 2.7 and 4.0 with the latest RSpec, and on Ruby 2.7 with RSpec 3.0, 3.4, 3.6, 3.7 and 3.8. Everything works from RSpec 3.0; the note for a load error needs RSpec 3.6, where RSpec began reporting those.

Version is 0.4.0 in version.rb; HISTORY has the entry under Unreleased, and gains the missing entry for 0.3.1.

🤖 Generated with Claude Code

trans and others added 2 commits November 21, 2026 23:16
The formatter is rewritten on the same lines as Minitap's reporter.
Skipped examples are reported as omit and pending ones as todo, both
with their reason; a pending example that passes is a failure; what
RSpec says outside of an example becomes a note.

Packaging is a plain gemspec with GitHub Actions, testing Ruby 2.7 to
4.0 and the oldest RSpec 3.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Ruby 3.1 appends the highlighted source line to a NameError's message.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@trans
trans merged commit fea2247 into master Nov 22, 2026
16 checks passed
@trans
trans deleted the modernize branch November 22, 2026 05:42
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