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.11.0 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.11.0.rc3 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.11.0.rc2 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.11.0.rc1 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.10.3.1 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.10.2 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.10.1 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.10.0 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.10.0.rc.3 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.10.0.rc.2 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.10.0.rc.1 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.9.2 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.9.1 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.9.0 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.8.2.1 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.8.1 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.8.0 spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.7.1.beta-java spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.7.1.beta spec/lib/models/hash_struct/merge_spec.rb
sproutcore-1.6.0.1-java spec/lib/models/hash_struct/merge_spec.rb