Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

PropCheck

github.com

  • Free plan
  • Linux
  • Self-hosted
7.0 Club score Visit github.com

What PropCheck is

PropCheck is a Ruby library for property-based testing. It generates inputs and checks whether assertions hold across examples, then tries to reduce a failing case to a smaller counterexample. Built-in generators cover integers, floats, strings, symbols, arrays, hashes, sets, dates, times, and datetimes. Developers can define custom generators with a DSL; the generator API also supports mapping and binding values, choosing alternatives, and weighted frequency selection.

Before, after, and around hooks support setup and cleanup for generated examples. The README gives usage examples with RSpec, MiniTest, test-unit, and vanilla Ruby, and says the gem has no external dependencies. PropCheck requires Ruby 2.5.1 or later and uses the MIT License. It can be installed through a Gemfile or with `gem install prop_check`. For generated examples that use a database, the README recommends cleaning database state around each example and mentions the DatabaseCleaner gem. The project describes stateful property testing as a possible future separate add-on library.

Who it suits

PropCheck suits Ruby developers who want to check assertions against generated inputs, including teams using RSpec, MiniTest, or test-unit. It may also help when a failing generated case needs to be reduced to a smaller example.

Good to know, and what to watch

  • No external dependencies
  • Includes generators for common Ruby data types
  • Shrinks failing cases toward smaller counterexamples
  • Works with RSpec, MiniTest, and test-unit
  • Requires Ruby 2.5.1 or later
  • Stateful property testing is a possible future add-on

Community library

Free

Free plan

Getting started

  1. Open the PropCheck GitHub repository.
  2. Use Ruby version 2.5.1 or later.
  3. Add `gem 'prop_check'` to your Gemfile.
  4. Alternatively, install the gem with `gem install prop_check`.
  5. Use its examples with RSpec, MiniTest, test-unit or vanilla Ruby.

The Club's review

Overview

Ruby teams that want to check behavior across many generated inputs can use PropCheck within familiar test setups. Its hooks and counterexample shrinking help make failures easier to investigate, but unfinished testing features make it a less settled choice for teams that need a highly configurable workflow.

Key features

Generators and shrinking

PropCheck supplies generators for integers, floats, strings, symbols, arrays, hashes, sets, dates, times, and datetimes. Its API can map and bind values, choose between alternatives, and weight those choices, giving teams ways to build domain-specific input without leaving Ruby. When an assertion fails, shrinking attempts to reduce the generated case to a minimal counterexample, which can make the underlying problem clearer.

Hooks and test integration

Before, after, and around hooks support setup and cleanup for generated examples. For cases that use a database, the README recommends cleaning state around each example and mentions DatabaseCleaner. Usage examples cover RSpec, MiniTest, test-unit, and vanilla Ruby, so teams can apply property-based checks in several existing Ruby workflows. PropCheck requires no external dependencies; installation is through a Gemfile entry or gem install prop_check.

Scope and maturity

The project requires Ruby 2.5.1 or later and is released under the MIT License. The README identifies stateful property testing as a possible future separate add-on, and lists unfinished work including finalizing the testing DSL, configurable sample counts, and generator filtering. Those gaps matter for teams that need control over test volume or filtering; PropCheck is a better fit when its current generator and hook model covers the job.

Pricing

The Community library plan is free. It is an MIT-licensed Ruby gem requiring Ruby 2.5.1 or later, with no paid tier or seat or usage quota described. That makes it suitable for individual developers and teams evaluating property-based testing without a software fee. There is no shorter trial or higher plan to compare: the free library is the offering.

Platforms

PropCheck targets Ruby and is listed for Linux and self-hosted use. It fits projects that run their own Ruby test environment; teams using another language will need a language-specific alternative.

Who it's for

PropCheck suits Ruby developers who want generated examples, shrinking, and setup or cleanup hooks alongside RSpec, MiniTest, test-unit, or plain Ruby tests. It is especially practical when common data types and custom generator composition are enough. Teams that depend on stateful property testing, configurable sample counts, or generator filtering should look for a tool that supports those needs.

Pros and cons

  • Broad built-in data coverage: generators span common scalar, collection, and date/time types, reducing the need to build basic inputs yourself.
  • Useful failure reduction: shrinking attempts to produce a smaller failing case, which can help narrow down the cause of a property violation.
  • Fits established Ruby tests: examples for three test frameworks and vanilla Ruby let teams use it without adopting a new runner.
  • No external dependencies and no license fee: the MIT-licensed gem keeps the dependency footprint and direct software cost low.
  • Some workflow controls remain unfinished: the README's unfinished DSL, sample-count, and filtering work may constrain teams that need those controls.
  • Ruby-only scope: projects written in other languages need a different property-testing library.

Alternatives

Property-Based Testing Tools is a useful place to compare options across the category. Choose JSVerify for a free JavaScript property-based testing library, or fast-check for a free, MIT-licensed JavaScript/TypeScript option. QCheck is the free OCaml choice, while Racket QuickCheck targets Racket and supports Linux, macOS, and Windows. For Scala, ScalaCheck is a free open-source library; for .NET, FsCheck is a free BSD-licensed option distributed through NuGet packages. Gopter is the free MIT-licensed Go library. Haskell developers can consider QuickCheck, a free library for random testing of program properties.

Verdict

Choose PropCheck when you need a free Ruby library that generates varied inputs, shrinks failures, and fits familiar test frameworks without external dependencies. Its main draw is that focused Ruby workflow; its main reason to look elsewhere is the unfinished support for controls such as configurable sample counts and generator filtering, or the absence of stateful property testing.

The verdict

PropCheck offers generated examples, custom generators, and shrinking for Ruby property-based tests. Its listed framework integrations and lack of external dependencies make it a focused option for Ruby projects.

Questions people ask

How much does PropCheck cost?

Its Community library plan is free. PropCheck is released under the MIT License.

Which Ruby versions does it require?

The gem requires Ruby version 2.5.1 or later.

Which test frameworks can I use with PropCheck?

The README gives usage examples with RSpec, MiniTest, test-unit and vanilla Ruby.

Can PropCheck reduce a failing test case?

Yes. When a generated case fails, PropCheck attempts to simplify it to a minimal counterexample.

Does PropCheck have built-in generators?

Yes. They cover integers, floats, strings, symbols, arrays, hashes, sets, dates, times and datetimes; a DSL also supports custom generators.

How do I install PropCheck?

Add `gem 'prop_check'` to a Gemfile or run `gem install prop_check`.

What the maker publishes

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

Checked against the maker's pages on 8 Oct 2026.