Sha256: 75c7d3da82128ef1aac31acf39ff4b419cd861874fe3f39a9141b2432e4176cd

Contents?: true

Size: 336 Bytes

Versions: 24

Compression:

Stored size: 336 Bytes

Contents

RSpec.describe "EitilCore Array#slice_hashes" do

  it "should slice each hash in an array of hashes with the given keys" do

    array    = [{"a"=>1, "b"=>2, "c"=>3}, {"a"=>1, "b"=>2, "c"=>3}]
    result   = array.slice_hashes("a", "b")
    expected = [{"a"=>1, "b"=>2}, {"a"=>1, "b"=>2}]

    expect(result).to eq expected

  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
eitil-2.0.8 spec/eitil_core/array/slice_hashes_spec.rb
eitil-2.0.7 spec/eitil_core/array/slice_hashes_spec.rb
eitil-2.0.6 spec/eitil_core/array/slice_hashes_spec.rb
eitil-2.0.5 spec/eitil_core/array/slice_hashes_spec.rb
eitil-2.0.4 spec/eitil_core/array/slice_hashes_spec.rb
eitil-2.0.3 spec/eitil_core/array/slice_hashes_spec.rb
eitil-2.0.2 spec/eitil_core/array/slice_hashes_spec.rb
eitil-2.0.1 spec/eitil_core/array/slice_hashes_spec.rb
eitil-2.0.0 spec/eitil_core/array/slice_hashes_spec.rb
eitil-1.4.1 spec/eitil_core/array/slice_hashes_spec.rb
eitil-1.4.0 spec/eitil_core/array/slice_hashes_spec.rb
eitil-1.3.12 spec/eitil_core/array/slice_hashes_spec.rb
eitil-1.3.11 spec/eitil_core/array/slice_hashes_spec.rb
eitil-1.3.10 spec/eitil_core/array/slice_hashes_spec.rb
eitil-1.3.9 spec/eitil_core/array/slice_hashes_spec.rb
eitil-1.3.8 spec/eitil_core/array/slice_hashes_spec.rb
eitil-1.3.7 spec/eitil_core/array/slice_hashes_spec.rb
eitil-1.3.6 spec/eitil_core/array/slice_hashes_spec.rb
eitil-1.3.5 spec/eitil_core/array/slice_hashes_spec.rb
eitil-1.3.4 spec/eitil_core/array/slice_hashes_spec.rb