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:
parent
1fc0670769
commit
6a1bf0c9c8
1 changed files with 12 additions and 0 deletions
12
test/test_execjs.rb
Normal file
12
test/test_execjs.rb
Normal 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
|
Loading…
Reference in a new issue