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