README.md in prop_check-0.8.0 vs README.md in prop_check-0.9.0
- old
+ new
@@ -88,12 +88,12 @@
array.sum / array.length
end
# And then in a test case:
include PropCheck::Generators
-PropCheck.forall(array(integer)) do |array|
- result = naive_average(array)
+PropCheck.forall(numbers: array(integer)) do |numbers:|
+ result = naive_average(numbers)
unless result.is_a?(Integer) do
raise "Expected the average to be an integer!"
end
end
```
@@ -103,11 +103,11 @@
```ruby
ZeroDivisionError:
(after 6 successful property test runs)
Failed on:
`{
- :array => []
+ :numbers => []
}`
Exception message:
---
divided by 0
@@ -131,11 +131,11 @@
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:
-- `x = 100`(fails),`
-- x = 50`(fails),
+- `x = 100`(fails),
+- `x = 50`(fails),
- `x = 25`(fails),
- `x = 12`(fails),
- `x = 6`(fails),
- `x = 3`(fails),
- `x = 1` (succeeds), `x = 2` (fails).