From be88020d4453fd0bce833e48f162edd6a0f059d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ana=20Mar=C3=ADa=20Mart=C3=ADnez=20G=C3=B3mez?= Date: Wed, 8 Aug 2018 23:46:29 +0200 Subject: [PATCH] Add retry? method to Hash to be used in shrinkify `Rantly::Property#shrinkify` calls `retry?` which is defined for all classes in `shrinks.rb` except `Hash`. Consecuently it raises an `NoMethodError` when being called over a Hash. Fixes https://github.com/rantly-rb/rantly/issues/39 --- lib/rantly/shrinks.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/rantly/shrinks.rb b/lib/rantly/shrinks.rb index 7cbfcb1..1ee4c4d 100644 --- a/lib/rantly/shrinks.rb +++ b/lib/rantly/shrinks.rb @@ -191,4 +191,8 @@ def shrinkable? self.any?{|_,v| v.respond_to?(:shrinkable?) && v.shrinkable? } || !self.empty? end + + def retry? + false + end end