Sha256: 370b1f6c39e729492250a5d9ee51a9e6df03346fc7ab270a5455c08ecc77d409

Contents?: true

Size: 382 Bytes

Versions: 74

Compression:

Stored size: 382 Bytes

Contents

require 'native'

describe Hash do
  describe '#initialize' do
    it "returns a hash with a nil value" do
      h = Hash.new(`{a: null}`)
      h[:a].should == nil
    end
  end

  describe '#to_n' do
    it "should return a js object representing hash" do
      Hash.new({:a => 100, :b => 200}.to_n).should == {:a => 100, :b => 200}
    end
  end
end

describe "Hash#to_n" do
end

Version data entries

74 entries across 74 versions & 3 rubygems

Version Path
opal-1.7.4 spec/opal/stdlib/native/ext_spec.rb
opal-1.7.3 spec/opal/stdlib/native/ext_spec.rb
opal-1.7.2 spec/opal/stdlib/native/ext_spec.rb
opal-1.7.1 spec/opal/stdlib/native/ext_spec.rb
opal-1.7.0 spec/opal/stdlib/native/ext_spec.rb
opal-1.7.0.rc1 spec/opal/stdlib/native/ext_spec.rb
opal-1.6.1 spec/opal/stdlib/native/ext_spec.rb
opal-1.6.0 spec/opal/stdlib/native/ext_spec.rb
opal-1.6.0.rc1 spec/opal/stdlib/native/ext_spec.rb
opal-1.6.0.alpha1 spec/opal/stdlib/native/ext_spec.rb
opal-1.5.1 spec/opal/stdlib/native/ext_spec.rb
opal-1.5.0 spec/opal/stdlib/native/ext_spec.rb
opal-1.5.0.rc1 spec/opal/stdlib/native/ext_spec.rb
opal-1.4.1 spec/opal/stdlib/native/ext_spec.rb
opal-1.4.0 spec/opal/stdlib/native/ext_spec.rb
opal-1.4.0.alpha1 spec/opal/stdlib/native/ext_spec.rb
opal-1.3.2 spec/opal/stdlib/native/ext_spec.rb
opal-1.3.1 spec/opal/stdlib/native/ext_spec.rb
opal-1.3.0 spec/opal/stdlib/native/ext_spec.rb
opal-1.3.0.rc1 spec/opal/stdlib/native/ext_spec.rb