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

14 lines
403 B
Ruby
Raw Normal View History

require 'spec_helper'
describe V8::C::External do
include C::ContextHelper
it "can run a script and return a polymorphic result" do
V8::C::HandleScope() do
2012-05-18 09:48:46 -05:00
source = V8::C::String::New("(new Array())")
filename = V8::C::String::New("<eval>")
script = V8::C::Script::New(source, filename)
result = script.Run()
2012-05-18 09:48:46 -05:00
result.should be_kind_of V8::C::Array
end
end
end