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

Add coffeescript smoke test

This commit is contained in:
Joshua Peek 2012-05-20 12:35:12 -05:00
parent 535313bf26
commit bfe14c23b7

View file

@ -159,4 +159,11 @@ class TestExecJS < Test::Unit::TestCase
ExecJS.exec("throw 'hello'")
end
end
def test_coffeescript
require "open-uri"
assert source = open("http://jashkenas.github.com/coffee-script/extras/coffee-script.js").read
context = ExecJS.compile(source)
assert_equal 64, context.call("CoffeeScript.eval", "((x) -> x * x)(8)")
end
end