mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
654b808ac5
This fixes segmentation fault in the tests as extending the examples in a before block with override of `#instance_eval` seems to not work. Also, the context wrap is now opt-in with a helper method, instead of opt-out and relying on `#described_class` (which has slightly different behavior in RSpec 3). Tested on Ruby 2.1.5 and RSpec 2.99.2.
22 lines
551 B
Ruby
22 lines
551 B
Ruby
require 'spec_helper'
|
|
|
|
describe V8::C do
|
|
requires_v8_context
|
|
|
|
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
|
|
|
|
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
|
|
|
|
it "can access the V8 version" do
|
|
V8::C::V8::GetVersion().should match /^3\.16/
|
|
end
|
|
end
|