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
2012-05-25 16:01:31 -05:00

14 lines
No EOL
403 B
Ruby

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
source = V8::C::String::New("(new Array())")
filename = V8::C::String::New("<eval>")
script = V8::C::Script::New(source, filename)
result = script.Run()
result.should be_kind_of V8::C::Array
end
end
end