1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00
therubyracer/spec/v8/function_spec.rb

10 lines
265 B
Ruby
Raw Normal View History

require 'spec_helper'
describe V8::Function do
it "uses the global context if it is invoked with nil as the context" do
@cxt = V8::Context.new
@cxt['foo'] = 'bar'
@cxt.eval('(function() {return this.foo})').methodcall(nil).should eql 'bar'
end
end