Sha256: a9a01b9b16e2b4273874e921ad730590f20a1b7d68e347961f198545686a7647
Contents?: true
Size: 724 Bytes
Versions: 52
Compression:
Stored size: 724 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
52 entries across 52 versions & 2 rubygems