ohbarye / pbt

Property-Based Testing tool for Ruby, supporting multiple concurrency methods (Ractor, multiprocesses, multithreads).
https://rubygems.org/gems/pbt
MIT License
207 stars 4 forks source link

Refactor with MapArbitrary #11

Closed ohbarye closed 6 months ago

ohbarye commented 6 months ago

Change

This pull request adds abstract Arbitrary class to give all arbitraries abilities that can transform/filter generated values. They are named MapArbitrary and FilterArbitrary.

They're useful to define custom arbitrary by reusing existing ones. The refactoring of e0eb0ee is a good example.