Method: PropCheck::Generators.future_date
- Defined in:
- lib/prop_check/generators.rb
.future_date(epoch: Date.today) ⇒ Object
variant of #date that only generates dates in the future (relative to :epoch).
>> Generators.future_date(epoch: Date.new(2022, 01, 01)).sample(2, rng: Random.new(42))
=> [Date.new(2022, 01, 06), Date.new(2022, 01, 11)]
742 743 744 |
# File 'lib/prop_check/generators.rb', line 742 def future_date(epoch: Date.today) date_from_offset(positive_integer, epoch: epoch) end |