diff options
Diffstat (limited to 'spec/ruby/core/array/to_h_spec.rb')
-rw-r--r-- | spec/ruby/core/array/to_h_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/ruby/core/array/to_h_spec.rb b/spec/ruby/core/array/to_h_spec.rb index f5a7e546e6..f4578211a1 100644 --- a/spec/ruby/core/array/to_h_spec.rb +++ b/spec/ruby/core/array/to_h_spec.rb @@ -1,5 +1,6 @@ require_relative '../../spec_helper' require_relative 'fixtures/classes' +require_relative 'shared/iterable_and_tolerating_size_increasing' describe "Array#to_h" do it "converts empty array to empty hash" do @@ -77,3 +78,8 @@ describe "Array#to_h" do end end end + +describe "Array#to_h" do + @value_to_return = -> e { [e, e.to_s] } + it_behaves_like :array_iterable_and_tolerating_size_increasing, :to_h +end |