Sha256: d11b6ec1c714effffe1333c4343b3f65552b8c4ea18599432c4bb802f67123ff

Contents?: true

Size: 398 Bytes

Versions: 3

Compression:

Stored size: 398 Bytes

Contents

require 'spec_helper'

describe V8::C::Array do
  requires_v8_context

  it "can store and retrieve a value" do
    o = V8::C::Object::New()
    a = V8::C::Array::New()
    a.Length().should eql 0
    a.Set(0, o)
    a.Length().should eql 1
    a.Get(0).Equals(o).should be_truthy
  end

  it "can be initialized with a length" do
    a = V8::C::Array::New(5)
    a.Length().should eql 5
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
therubyracer-0.12.3 spec/c/array_spec.rb
therubyracer-xcode-0.12.3 spec/c/array_spec.rb
therubyracer-xcode-0.12.2 spec/c/array_spec.rb