PRSpec: Test Review for the AI Coding Era - yubeleのスライド | slidict.io
slidict.io

JA | EN

PRSpec: Test Review for the AI Coding Era

Google Translate: 日本語 英語
yubele
yubele
フォロワー 0人
最終更新: 2026/06/19
読む時間: 03:07

共有

コード

通報

AI-powered test review for Ruby pull requests.

  • Your AI wrote the code.

  • Did it write the right specs?

  • Catch missing specs before you merge.

詳細説明
PRSpec is a test review tool for the AI coding era.
It does not try to replace code review.
Instead, it asks a narrower and more dangerous question:
did this pull request change behavior without changing the specs?

AI generated code ships fast.

AI generated bugs ship faster.

  • PRs are getting bigger

  • Reviews are getting faster

  • Specs are getting easier to fake

詳細説明
AI coding tools can produce useful Ruby code quickly.
But they can also generate shallow specs, happy-path examples, or tests that only prove a mock was called.
Green CI does not always mean the behavior is covered.
PRSpec focuses on that gap.
  • Missing specs

  • Risky Ruby changes

  • Shallow specs

詳細説明
The first version does not need to understand everything.
It starts with practical RSpec signals:
a Ruby file changed but the matching spec did not,
a service object changed without behavioral specs,
a job changed without failure-case coverage,
or a public method was added without examples.
Small signals. Useful warnings.
flowchart LR
  A[Pull Request] --> B[prspec review]
  B --> C[Changed Ruby files]
  C --> D[Missing specs]
  C --> E[Risky changes]
  D --> F[Review before merge]
  E --> F
詳細説明
PRSpec starts as a CLI, not a dashboard.
You run `prspec review` locally or in CI.
It inspects changed files, maps them to likely spec expectations, and reports missing or risky areas before the PR is merged.
$ gem install prspec-ruby
$ prspec review

MISSING SPEC
lib/billing/refund_calculator.rb
No spec for partial refund behavior

RISKY CHANGE
lib/user_status_transition.rb
State transition changed without edge-case coverage

MISSING SPEC
lib/invoice_sender.rb
Invoice sending changed without failure-case specs
詳細説明
The product needs to feel obvious in five seconds.
A Ruby developer should immediately understand what it does from the terminal output.
The value is not another AI chat box.
The value is a warning before a bad PR slips through.
  • Specs describe behavior

  • Examples are easy to underwrite

  • Mock-heavy tests can look green

  • Missing edge cases hide in plain sight

詳細説明
RSpec is powerful because it lets Ruby teams describe behavior clearly.
But that also means shallow examples can create false confidence.
A spec can pass while still missing the behavior that matters.
PRSpec focuses on the gap between changed code and meaningful examples.

Not a code review.

A test review.

  • AI writes codeews test risk

詳細説明
PRSpec should not compete head-on with generic code review tools.
The positioning is narrower:
review the testing implications of a Ruby pull request.
That makes the product easier to understand, easier to build, and easier to explain to Ruby developers.

Your code should not have to leave your machine.

  • Works from the CLI

  • Designed for local LLMs

  • Cloud can come later

詳細説明
Security matters, especially for code review tools.
PRSpec starts local-first.
That means the first version can work without a SaaS account, without GitHub permissions, and without sending private code to a PRSpec server.
This makes adoption easier for individual developers.

Don’t merge the landmine.

https://prspec.io

詳細説明
The goal of this slide is not to explain every feature.
The goal is to make Ruby developers feel the problem quickly:
AI can write code, but someone still has to check whether the right specs exist.
PRSpec is the warning light before merge.
PRSpec: Test Review for the AI Coding Eraのサムネイル(1ページ目)
1 / 9