public
Rubygem
Description: Johnson wraps JavaScript in a loving Ruby embrace.
Homepage: http://github.com/jbarnette/johnson/wikis
Clone URL: git://github.com/jbarnette/johnson.git
Search Repo:
adding a threading todo test file
aaronp (author)
Tue Apr 29 22:43:33 -0700 2008
commit  3361d7c4c9265f431ed3b7ae61c4273fa0e69fbe
tree    c80cd79bdf77ef0fe6afec2d0d00af6aacc7602a
parent  faeef59aae1926e2bda69f1da515eb6d1cbbcd36
...
1
2
3
4
5
6
7
...
 
 
 
 
 
 
 
0
@@ -1,8 +1 @@
0
-require File.expand_path(File.join(File.dirname(__FILE__), "/../test/helper"))
0
-
0
-class ParserTest < Test::Unit::TestCase
0
- def test_nothing
0
- assert false
0
- end
0
-end
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
0
@@ -1 +1,23 @@
0
+require File.expand_path(File.join(File.dirname(__FILE__), "/../test/helper"))
0
+
0
+module Johnson
0
+ module Conversions
0
+ class ThreadTest < Johnson::TestCase
0
+ def setup
0
+ @context = Johnson::Context.new
0
+ end
0
+
0
+ def test_new_js_thread
0
+ @context.evaluate('function testing() { Ruby.sleep(10); }')
0
+ @context.evaluate('new Ruby.Thread(function() { testing(); })')
0
+ end
0
+
0
+ def test_js_thread_read_file
0
+ @context['filename'] = File.expand_path(__FILE__)
0
+ @context.evaluate('function testing() { Ruby.File.read(filename); }')
0
+ @context.evaluate('new Ruby.Thread(function() { testing(); })')
0
+ end
0
+ end
0
+ end
0
+end

Comments

    No one has commented yet.