Sha256: 6efdebbe994a183940016c4c6adf9beabeb1d8e7987c44cdb41faefdba24ebe0

Contents?: true

Size: 219 Bytes

Versions: 6

Compression:

Stored size: 219 Bytes

Contents

describe "Hash#default" do
  it "returns the default value" do
    h = Hash.new 5
    h.default.should == 5
    h.default(4).should == 5
    Hash.new.default.should == nil
    Hash.new.default(4).should == nil
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
opal-0.3.26 spec/core/hash/default_spec.rb
opal-0.3.25 spec/core/hash/default_spec.rb
opal-0.3.22 spec/core/hash/default_spec.rb
opal-0.3.21 test/core/hash/default_spec.rb
opal-0.3.20 test/core/hash/default_spec.rb
opal-0.3.19 test/core/hash/default_spec.rb