From bfe14c23b713b8c558218c316d9e666f06675912 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sun, 20 May 2012 12:35:12 -0500 Subject: [PATCH] Add coffeescript smoke test --- test/test_execjs.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test_execjs.rb b/test/test_execjs.rb index 34896a0..e5f8294 100644 --- a/test/test_execjs.rb +++ b/test/test_execjs.rb @@ -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