Sha256: 5e35e965cc7d0bf7be1826dcb24735bfc9a0a6d0fbe957ca73f9bd93c8595fe6

Contents?: true

Size: 658 Bytes

Versions: 33

Compression:

Stored size: 658 Bytes

Contents

require 'spec_helper'

describe Lev::Utilities do

  it "should merge properly" do
    default_options = {
      translations: {
        outputs: {
          scope: :blah
        }
      }
    }

    options = {
      translations: {
        inputs: {
          type: :verbatim
        },
        outputs: {
          map: {foo: :bar}
        }
      }
    }

    expected = {
      translations: {
        outputs: {
          scope: :blah,
          map: {foo: :bar}
        },
        inputs: {
          type: :verbatim
        }
      }
    }

    merged = Lev::Utilities.deep_merge(default_options, options)
    expect(merged).to eq expected
  end

end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
lev-9.0.4 spec/deep_merge_spec.rb
lev-9.0.3 spec/deep_merge_spec.rb
lev-9.0.2 spec/deep_merge_spec.rb
lev-9.0.1 spec/deep_merge_spec.rb
lev-9.0.0 spec/deep_merge_spec.rb
lev-8.1.0 spec/deep_merge_spec.rb
lev-8.0.0 spec/deep_merge_spec.rb
lev-7.1.0 spec/deep_merge_spec.rb
lev-7.0.3 spec/deep_merge_spec.rb
lev-2.2.2 spec/deep_merge_spec.rb
lev-7.0.2 spec/deep_merge_spec.rb
lev-7.0.1 spec/deep_merge_spec.rb
lev-7.0.0 spec/deep_merge_spec.rb
lev-6.0.0 spec/deep_merge_spec.rb
lev-5.0.0 spec/deep_merge_spec.rb
lev-4.3.2 spec/deep_merge_spec.rb
lev-4.3.1 spec/deep_merge_spec.rb
lev-4.3.0 spec/deep_merge_spec.rb
lev-4.2.0 spec/deep_merge_spec.rb
lev-4.1.0 spec/deep_merge_spec.rb