Sha256: 5806163819026f31cf81a46e248e0c841491c424844280dbbc55078cf1ba98da
Contents?: true
Size: 714 Bytes
Versions: 14
Compression:
Stored size: 714 Bytes
Contents
require "core/spec_helper" describe 'OpenObject' do it 'should be comparable with hashes' do {}.to_openobject.should == {} {}.should == {}.to_openobject {a: :b}.to_openobject.should == {a: :b} {'a' => :b}.to_openobject.should == {a: :b} {a: :b}.to_openobject.should == {'a' => :b} {'a' => :b}.to_openobject.should == {'a' => :b} {a: :b}.to_openobject.should_not == {a: :c} end it "must be hash (from error)" do {}.to_openobject.is_a?(Hash).should be_true end it 'merge! should be indifferent to string and symbol' do oo = OpenObject.new oo.merge! a: true oo.a.should be_true oo.merge! 'b' => true oo.b.should be_true end end
Version data entries
14 entries across 14 versions & 1 rubygems