diff options
Diffstat (limited to 'spec/doubles/hash.rb')
-rw-r--r-- | spec/doubles/hash.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/doubles/hash.rb b/spec/doubles/hash.rb index 32c5b98058..fd9edd34ad 100644 --- a/spec/doubles/hash.rb +++ b/spec/doubles/hash.rb @@ -3,18 +3,22 @@ class Hash to_a.sort { |(key1, value1), (key2, value2)| key1.hash <=> key2.hash } end + undef :keys def keys ordered_array.collect(&:first) end + undef :values def values ordered_array.collect { |_, v| v } end + undef :each def each(&block) ordered_array.each(&block) end + undef :shift def shift returning to_a.first do |k, v| delete(k) |