Sha256: 11f4dc468d32c8ca00d2754d59629c409df4740f6da61add3213863eb8f4dfc2

Contents?: true

Size: 433 Bytes

Versions: 62

Compression:

Stored size: 433 Bytes

Contents

require "spec_helper"

describe SC::HashStruct, 'merge!' do

  it "should do nothing if we merge self!" do
    a = SC::HashStruct.new :foo => :bar
    a.merge! a
    a[:foo].should eql(:bar)
    a.keys.size.should eql(1)
  end

  it "should do nothing if we merge nil" do
    a = SC::HashStruct.new :foo => :bar
    lambda { a.merge! nil }.should_not raise_error
    a[:foo].should eql(:bar)
    a.keys.size.should eql(1)
  end

end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
sproutcore-1.5.0.rc.1 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.5.0.pre.5 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.5.0.pre.4.1 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.5.0.pre.4 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.5.0.pre.3 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.4.5 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.4.5-java spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.4.4-java spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.4.4 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.4.3.1 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.4.3-java spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.4.3 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.4.2-java spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.4.2 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.4.1-java spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.4.1 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.4.0-java spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.4.0 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.4.0.rc.5 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.4.0.rc.4 spec/lib/models/hash_struct/merge_spec.rb