Sunday, October 25, 2026 4,350 lists 78,100 records on file
List your app or device

  1. Home
  2. Property-Based Testing Tools
  3. PropCheck

PropCheck

What it is

PropCheck is a Ruby library for property-based testing: it generates inputs and checks whether assertions hold across examples. When a generated case fails, the library attempts to reduce it to a minimal counterexample. Built-in generators cover integers, floats, strings, symbols, arrays, hashes, sets, dates, times, and datetimes; a DSL and generator API support custom generators, mapping, binding, alternatives, and weighted selection. Before, after, and around hooks provide setup and cleanup around generated examples. The README gives examples with RSpec, MiniTest, test-unit, and vanilla Ruby, and says the gem has no external dependencies. Installation uses a Gemfile entry or `gem install prop_check`. PropCheck requires Ruby 2.5.1 or later and is released under the MIT License. The Community library plan is free. The README identifies stateful property testing as a possible separate future add-on and lists some work as unfinished before v1.0.

For and against

For

  • Shrinks failing cases to smaller counterexamples.
  • Includes generators for common Ruby data types.
  • Works with RSpec, MiniTest, and test-unit.
  • Requires no external dependencies.

Against

  • Requires Ruby 2.5.1 or later.
  • Some project work is listed as unfinished.
  • Stateful property testing is described as a possible add-on.

The verdict

PropCheck offers generated input testing with built-in and custom generators, plus shrinking for failures. Ruby version requirements and the project's listed unfinished work are worth reviewing before adopting it.

Who it suits

PropCheck suits Ruby developers who want generated examples to check assertions with RSpec, MiniTest, test-unit, or vanilla Ruby. Database-backed examples call for cleaning database state around each example.

Plans and prices

Community library

Free

MIT licensed Ruby gem · requires Ruby >= 2.5.1

Every plan, in full

On the record

Current published version
RubyGems lists version 1.0.2, released March 14, 2025.rubygems.org · read 8 Oct 2026
Custom generators
Its generator API includes mapping, binding, choosing among alternatives, and weighted frequency selection.github.com · read 8 Oct 2026
Database usage
For generated examples that use a database, the README recommends cleaning database state around each example and mentions the DatabaseCleaner gem.github.com · read 8 Oct 2026
Dependencies
The README says PropCheck requires no external dependencies.github.com · read 8 Oct 2026
Generator coverage
Listed built-in generators cover integers, floats, strings, symbols, arrays, hashes, sets, dates, times, and datetimes.github.com · read 8 Oct 2026
Generators
It includes generators for common Ruby data types and a DSL for defining custom generators.github.com · read 8 Oct 2026
Hooks
PropCheck provides before, after, and around hooks for setup and cleanup around generated examples.github.com · read 8 Oct 2026
Installation
The README says to add `gem 'prop_check'` to a Gemfile or install it with `gem install prop_check`.github.com · read 8 Oct 2026
License
The project is released under the MIT License.github.com · read 8 Oct 2026
Project status
The README lists several items as unfinished before v1.0, including finalizing the testing DSL, configurable sample counts, and filtering generators.github.com · read 8 Oct 2026
Purpose
PropCheck is a Ruby library for property-based testing that checks assertions against generated inputs.github.com · read 8 Oct 2026
Ruby requirement
The gem requires Ruby version 2.5.1 or later.rubygems.org · read 8 Oct 2026
Shrinking
When a generated case fails, PropCheck attempts to simplify it to a minimal counterexample.github.com · read 8 Oct 2026
Stateful testing
The README lists stateful property testing as a possible future separate add-on library.github.com · read 8 Oct 2026
Support and contributions
The README invites bug reports and pull requests on GitHub.github.com · read 8 Oct 2026
Test framework integrations
The README gives usage examples with RSpec, MiniTest, test-unit, and vanilla Ruby.github.com · read 8 Oct 2026
Test hooks
It provides hooks for setup and cleanup around generated example cases.github.com · read 8 Oct 2026
What it does
PropCheck is a Ruby library for property-based testing that generates inputs and checks whether assertions hold across them.github.com · read 8 Oct 2026

Alternatives to PropCheck

Every alternative, ranked