Permalink
Browse files

Make the readme example work

  • Loading branch information...
1 parent 1fc0670 commit 6a1bf0c9c8e1f50190fe110b3514b5f092b20d24 @sstephenson committed Feb 7, 2011
Showing with 12 additions and 0 deletions.
  1. +12 −0 test/test_execjs.rb
View
12 test/test_execjs.rb
@@ -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

0 comments on commit 6a1bf0c

Please sign in to comment.