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:
parent
535313bf26
commit
bfe14c23b7
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue