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
2012-06-20 13:20:54 -05:00

9 lines
265 B
Ruby

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