1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00
therubyracer/spec/c/external_spec.rb
2015-07-06 00:36:25 -05:00

23 lines
538 B
Ruby

require 'c_spec_helper'
describe V8::C::External do
let(:isolate) { V8::C::Isolate::New() }
let(:value) { @external::Value() }
around { |example| V8::C::HandleScope(isolate) { example.run } }
before do
Object.new.tap do |object|
@object_id = object.object_id
@external = V8::C::External::New(isolate, object)
end
end
it "exists" do
expect(@external).to be
end
it "can retrieve the ruby object out from V8 land" do
expect(value).to be
expect(value.object_id).to eql @object_id
end
end