README.md in prop_check-0.18.2 vs README.md in prop_check-1.0.0

- old
+ new

@@ -3,19 +3,21 @@ PropCheck allows you to do Property Testing in Ruby. [![Gem](https://img.shields.io/gem/v/prop_check.svg)](https://rubygems.org/gems/prop_check) [![Ruby RSpec tests build status](https://github.com/Qqwy/ruby-prop_check/actions/workflows/run_tests.yaml/badge.svg)](https://github.com/Qqwy/ruby-prop_check/actions/workflows/run_tests.yaml) [![Maintainability](https://api.codeclimate.com/v1/badges/71897f5e6193a5124a53/maintainability)](https://codeclimate.com/github/Qqwy/ruby-prop_check/maintainability) -[![RubyDoc](https://img.shields.io/badge/%F0%9F%93%9ARubyDoc-documentation-informational.svg)](https://www.rubydoc.info/github/Qqwy/ruby-prop_check/master/) +[![RubyDoc](https://img.shields.io/badge/%F0%9F%93%9ARubyDoc-documentation-informational.svg)](https://www.rubydoc.info/github/Qqwy/ruby-prop_check/main/) It features: - Generators for most common Ruby datatypes. - An easy DSL to define your own generators (by combining existing ones, as well as completely custom ones). - Shrinking to a minimal counter-example on failure. - Hooks to perform extra set-up/cleanup logic before/after every example case. +It requires _no_ external dependencies, and integrates well with all common test frameworks (see below). + ## What is PropCheck? PropCheck is a Ruby library to create unit tests which are simpler to write and more powerful when run, finding edge-cases in your code you wouldn't have thought to look for. It works by letting you write tests that assert that something should be true for _every_ case, rather than just the ones you happen to think of. @@ -216,20 +218,19 @@ For instance, when a failure happens with the input `x = 100`, PropCheck will see if the failure still happens with `x = 50`. If it does , it will try `x = 25`. If not, it will try `x = 75`, and so on. -This means if something only goes wrong for `x = 2`, the program will try: +This means for example that if something only goes for wrong for `x >= 8`, the program will try: - `x = 100`(fails), - `x = 50`(fails), - `x = 25`(fails), - `x = 12`(fails), -- `x = 6`(fails), -- `x = 3`(fails), -- `x = 1` (succeeds), `x = 2` (fails). +- `x = 6`(succeeds), `x = 9` (fails) +- `x = 7`(succeeds), `x = 8` (fails). -and thus the simplified case of `x = 2` is shown in the output. +and thus the simplified case of `x = 8` is shown in the output. The documentation of the provided generators explain how they shrink. A short summary: - Integers shrink to numbers closer to zero. - Negative integers also attempt their positive alternative. @@ -237,11 +238,11 @@ - Arrays and hashes shrink to fewer elements, as well as shrinking their elements. - Strings shrink to shorter strings, as well as characters earlier in their alphabet. ### Builtin Generators -PropCheck comes with [many builtin generators in the PropCheck::Generators](https://www.rubydoc.info/github/Qqwy/ruby-prop_check/master/PropCheck/Generators) module. +PropCheck comes with [many builtin generators in the PropCheck::Generators](https://www.rubydoc.info/github/Qqwy/ruby-prop_check/main/PropCheck/Generators) module. It contains generators for: - (any, positive, negative, etc.) integers, - (any, only real-valued) floats, - (any, printable only, alphanumeric only, etc) strings and symbols @@ -303,12 +304,12 @@ #### Others There are even more functions in the `Generator` class and the `Generators` module that you might want to use, although above are the most generally useful ones. -[PropCheck::Generator documentation](https://www.rubydoc.info/github/Qqwy/ruby-prop_check/master/PropCheck/Generator) -[PropCheck::Generators documentation](https://www.rubydoc.info/github/Qqwy/ruby-prop_check/master/PropCheck/Generators) +[PropCheck::Generator documentation](https://www.rubydoc.info/github/Qqwy/ruby-prop_check/main/PropCheck/Generator) +[PropCheck::Generators documentation](https://www.rubydoc.info/github/Qqwy/ruby-prop_check/main/PropCheck/Generators) ## Usage within Rails / with a database Using PropCheck for unit tests in a Rails, Sinatra, Hanami, etc. project is very easy. @@ -346,10 +347,10 @@ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). ## Code of Conduct -Everyone interacting in the PropCheck project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/Qqwy/ruby-prop_check/blob/master/CODE_OF_CONDUCT.md). +Everyone interacting in the PropCheck project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/Qqwy/ruby-prop_check/blob/main/CODE_OF_CONDUCT.md). ## Attribution and Thanks I want to thank the original creators of QuickCheck (Koen Claessen, John Hughes) as well as the authors of many great property testing libraries that I was/am able to use as inspiration. I also want to greatly thank Thomasz Kowal who made me excited about property based testing [with his great talk about stateful property testing](https://www.youtube.com/watch?v=q0wZzFUYCuM),