diff --git a/test/test-android/app/rubymotion/proc_spec.rb b/test/test-android/app/rubymotion/proc_spec.rb new file mode 100644 index 00000000..514c645e --- /dev/null +++ b/test/test-android/app/rubymotion/proc_spec.rb @@ -0,0 +1,15 @@ +describe "Procs" do + it "are based on com.rubymotion.Proc" do + obj = Proc.new {} + obj.class.should == Proc + obj.class.getName.should == 'com.rubymotion.Proc' + end + + it "can be passed to Java methods expecting a java.lang.Runnable" do + $proc_runnable_ok = false + thr = Java::Lang::Thread.new -> { $proc_runnable_ok = true } + thr.start + thr.join + $proc_runnable_ok.should be_true + end +end