1
0
Fork 0
mirror of https://github.com/rails/execjs synced 2023-03-27 23:21:20 -04:00

Make the readme example work

This commit is contained in:
Sam Stephenson 2011-02-06 19:10:05 -06:00
parent 1fc0670769
commit 6a1bf0c9c8

12
test/test_execjs.rb Normal file
View file

@ -0,0 +1,12 @@
require "execjs"
require "test/unit"
class TestExecJS < Test::Unit::TestCase
def test_exec
assert_equal true, ExecJS.exec("return true")
end
def test_eval
assert_equal ["red", "yellow", "blue"], ExecJS.eval("'red yellow blue'.split(' ')")
end
end