mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
9 lines
265 B
Ruby
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
|