CheckOps home

Tools directory

P

CheckOps

PBT (Ruby)

PBT is an MIT-licensed property-based testing library for Ruby with experimental parallel execution of test cases using Ractor.

Visit website

Latest public signals

Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.

Visit Website

Introduction

PBT brings property-based testing to Ruby. Instead of writing tests for predefined inputs and outputs, you specify properties your code should always satisfy, and PBT generates inputs automatically, shrinking failures to minimal counterexamples.

It includes experimental features to run test cases in parallel; results of the experiment are covered in the RubyKaigi 2024 talk “Unlocking Potential of Property Based Testing with Ractor”. Pbt.assert is the runner that executes a property, and Pbt.property describes the generated values and the check to run on them.

The source code is at ohbarye/pbt on GitHub under the MIT licence, with about 241 stars; the most recent commit was on 23 August 2026.

Launch and background: PBT was posted to Hacker News as a Show HN on 22 May 2024.

Features

  1. Property-based testing: Generated inputs.
  2. Shrinking: Minimal counterexamples.
  3. Arbitraries: Built-in generators.
  4. Experimental parallelism: Ractor-based.

Pros

  1. Free to use: Open source under the MIT licence, so the core tool costs nothing to use.
  2. Actively maintained: The repository had commits as recent as 23 August 2026.

Cons

  1. Small project: Single-maintainer library.
  2. Experimental parallelism: Not for every codebase.
Pbt.assert do
  Pbt.property(Pbt.array(Pbt.integer)) do |numbers|
    raise unless numbers.sort == numbers.sort.sort
  end
end

Resources:

Pricing

PBT (Ruby) is free and open source under the MIT licence.

  1. Ruby developers wanting Hypothesis-style testing.

Conclusion

PBT fills a gap in Ruby’s testing toolbox.

Use it for parsers, serialisers and pure functions.

On CheckOps, PBT (Ruby) is filed under the Unit testing stage. Related tools listed here include RSpec, Minitest, Hypothesis, fast-check, proptest and Kotest. A short trial on a real project, with your own code, data and pipeline, is usually the fastest way to choose between them, because fit matters more than feature lists. Facts here come from the official site, documentation and repository, checked on 11 November 2026.

Alternatives

Other tools on CheckOps that cover similar ground. Open a page, or compare one with PBT (Ruby) side by side.