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

23 lines
485 B
Ruby
Raw Normal View History

2015-03-18 22:08:34 +00:00
require 'v8/init'
describe 'handles' do
describe '#HandleScope' do
let(:isolate) { V8::C::Isolate.New }
it 'can allocate handle scopes' do
V8::C::HandleScope(isolate) do
end
end
it 'isn\'t the end of the world if a ruby exception is raised inside a HandleScope' do
begin
V8::C::HandleScope(isolate) do
raise 'boom!'
end
rescue StandardError => e
expect(e.message).to eq 'boom!'
end
end
end
end