hdjrkaofbdjwm
Great work, looks really clean! Check out Minithesis [1] and the paper explaining internal shrinking [2]. It will strongly improve your library's shrinking capabilities and prevent users from having to write their own shrinkers for custom objects in most cases.

[1] https://github.com/DRMacIver/minithesis

[2] https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.E...

cortesoft
Can this be used alongside rspec? Like have these be tests that are included in the rspec test run, and have the results alongside your other rspec tests?
jack_riminton
Interesting! I wonder how this could be applied to a Rails project (since that's what ruby is most used for). For example how would it know to test a wide selection of possible values for different variables if they're not explicitly set up?
parentheses
Very specific question: when tests fail due to a single example, you suggest creating a specific assertion with the given seed.

I imagine the seed is used to generate data and depending on the order of your generators, it produces different results.

For example, in:

    PBT.assert(seed = ..) do
      PBT.property(PBT.integer, PBT.string) ...
    end
Would changing the order of parameters to `property` change the actual test case?
bloopernova
Can anyone recommend an introduction to PBT for someone who knows nothing about it?

Edited to add: D'oh! There's an explanation in the linked repo.

Lio
Lovely stuff, thank you.

It would be cool if we could eventually make use of RBS or inline Sorbet or something better than both to get the types for property testing for free.

mberning
Very cool. Wonder how much time this adds to a test suite as you incorporate it more. Might need to have some different test targets to keep things fast.
lijok
Amazing work ! Happy to see any effort towards PBT.
Lammy
Excited to see libraries using Ractors as somebody who has also fallen in love with them ♡
slackstation
They missed the opportunity to name this library 'Double Shot'.