Sha256: f5e4c775f7e21a21d318f2cbff71395f2d5bbaa5f8018245ac05a8cf10097ff5
Contents?: true
Size: 723 Bytes
Versions: 35
Compression:
Stored size: 723 Bytes
Contents
describe "Hash literal" do describe "new-style hash syntax" do it "constructs a new hash with the given elements" do {foo: 123}.should == {:foo => 123} {rbx: :cool, specs: 'fail_sometimes'}.should == {:rbx => :cool, :specs => 'fail_sometimes'} end it "ignores a hanging comma" do {foo: 123,}.should == {:foo => 123} {rbx: :cool, specs: 'fail_sometimes',}.should == {:rbx => :cool, :specs => 'fail_sometimes'} end it "can mix and match syntax styles" do {rbx: :cool, :specs => 'fail_sometimes'}.should == {:rbx => :cool, :specs => 'fail_sometimes'} {'rbx' => :cool, specs: 'fail_sometimes'}.should == {'rbx' => :cool, :specs => 'fail_sometimes'} end end end
Version data entries
35 entries across 35 versions & 3 rubygems