1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00
therubyracer/spec/c/handles_spec.rb
2012-05-25 16:01:31 -05:00

20 lines
No EOL
470 B
Ruby

require 'spec_helper'
describe "setting up handles scopes" do
include C::ContextHelper
it "can allocate handle scopes" do
V8::C::HandleScope() do
V8::C::Object::New()
end.class.should eql V8::C::Object
end
it "isn't the end of the world if a ruby exception is raised inside a HandleScope" do
begin
V8::C::HandleScope() do
raise "boom!"
end
rescue StandardError => e
e.message.should eql "boom!"
end
end
end