lib/prop_check/generator.rb in prop_check-0.17.0 vs lib/prop_check/generator.rb in prop_check-0.18.0
- old
+ new
@@ -114,10 +114,10 @@
# where `config` is the current `PropCheck::Property::Configuration`.
# This can be used to inspect the configuration inside a `#map` or `#where`
# and act on it.
#
# >> Generators.choose(0..100).with_config.map { |int, conf| Date.jd(conf[:default_epoch].jd + int) }.call(size: 10, rng: Random.new(42), config: PropCheck::Property::Configuration.new)
- # => Date.new(2023, 01, 10)
+ # => Date.new(2023, 01, 12)
def with_config
Generator.new do |**kwargs|
result = generate(**kwargs)
result.map { |val| [val, kwargs[:config]] }
end