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

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