1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00
therubyracer/spec/v8/error_spec.rb
2012-06-14 22:34:38 -05:00

21 lines
517 B
Ruby

require 'spec_helper'
describe V8::Error do
it "uses the same ruby exception through multiple language boundaries" do
V8::Context.new do |cxt|
error = StandardError.new('potato')
cxt['one'] = lambda do
cxt.eval('two()', 'one.js')
end
cxt['two'] = lambda do
cxt.eval('three()', 'two.js')
end
cxt['three'] = lambda do
raise error
end
lambda {
cxt.eval('three()')
}.should raise_error {|e| e.should be error}
end
end
end