2012-06-08 03:56:04 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe V8::C do
|
|
|
|
it "has constant methods for Undefined, Null, True and False" do
|
|
|
|
[:Undefined, :Null, :True, :False].each do |name|
|
|
|
|
constant = V8::C.send(name)
|
|
|
|
constant.should_not be_nil
|
|
|
|
V8::C.send(name).should be constant
|
|
|
|
end
|
|
|
|
end
|
2012-06-11 05:03:51 -05:00
|
|
|
|
|
|
|
it "has a value for the Empty handle" do
|
|
|
|
V8::C::Value::Empty.should_not be_nil
|
|
|
|
V8::C::Value::Empty.should be V8::C::Value::Empty
|
|
|
|
end
|
2012-06-14 03:52:32 -05:00
|
|
|
|
|
|
|
it "can access the V8 version" do
|
2012-06-15 11:52:12 -05:00
|
|
|
V8::C::V8::GetVersion().should match /^3\.11/
|
2012-06-14 03:52:32 -05:00
|
|
|
end
|
2012-06-08 03:56:04 -05:00
|
|
|
end
|