1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00
therubyracer/spec/v8/context_spec.rb
2012-06-19 04:32:58 -05:00

19 lines
400 B
Ruby

require 'spec_helper'
describe V8::Context do
it "can be disposed of" do
cxt = V8::Context.new
cxt.enter do
cxt['object'] = V8::Object.new
end
cxt.dispose()
lambda {cxt.eval('1 + 1')}.should raise_error
lambda {cxt['object']}.should raise_error
end
it "can be disposed of any number of times" do
cxt = V8::Context.new
10.times {cxt.dispose()}
end
end