Sha256: 57a758035ec2db8bdfc44337256b9a375418c51dec4f6015c19eab3011b44e2f
Contents?: true
Size: 585 Bytes
Versions: 24
Compression:
Stored size: 585 Bytes
Contents
RSpec.describe "EitilCore Array#map_strings" do it "should transforms all strings in infinite recursion" do array = ["hey", ["hi", {a: "ho", b: {d: "he"}}]] result = array.map_strings { |str| str.upcase } expect(result).to eq ["HEY", ["HI", {a: "HO", b: {d: "HE"}}]] end end RSpec.describe "EitilCore Array#map_strings!" do it "should transforms all strings in infinite recursion" do array = ["hey", ["hi", {a: "ho", b: {d: "he"}}]] array.map_strings! { |str| str.upcase } expect(array).to eq ["HEY", ["HI", {a: "HO", b: {d: "HE"}}]] end end
Version data entries
24 entries across 24 versions & 1 rubygems