[macruby-changes] [3304] MacRuby/trunk/spec/macruby/core/gcd/prelude_spec.rb

source_changes at macosforge.org source_changes at macosforge.org
Tue Jan 19 15:56:53 PST 2010


Revision: 3304
          http://trac.macosforge.org/projects/ruby/changeset/3304
Author:   ernest.prabhakar at gmail.com
Date:     2010-01-19 15:56:52 -0800 (Tue, 19 Jan 2010)
Log Message:
-----------
gcd_prelude spec cleanup

Modified Paths:
--------------
    MacRuby/trunk/spec/macruby/core/gcd/prelude_spec.rb

Modified: MacRuby/trunk/spec/macruby/core/gcd/prelude_spec.rb
===================================================================
--- MacRuby/trunk/spec/macruby/core/gcd/prelude_spec.rb	2010-01-19 23:56:50 UTC (rev 3303)
+++ MacRuby/trunk/spec/macruby/core/gcd/prelude_spec.rb	2010-01-19 23:56:52 UTC (rev 3304)
@@ -3,7 +3,7 @@
 
 if MACOSX_VERSION >= 10.6
 
-  describe "Dispatch::Queue convenience method:" do
+  describe "Dispatch::Queue source from" do
     before :each do
       @q = Dispatch::Queue.new('org.macruby.gcd_spec.prelude')
       @src = nil
@@ -28,7 +28,7 @@
     describe "on_or" do
       it "fires with data on ORed inputs" do
         @count = 0
-        @src = @q.on_or {|s| p @count += s.data}
+        @src = @q.on_or {|s| @count += s.data}
         @src << 0b101_000
         @src << 0b000_010
         @q.sync {}
@@ -47,7 +47,7 @@
         Process.kill(@signal, $$)
         Signal.trap(@signal, "DEFAULT")
         @q.sync {}
-        @event.should == Dispatch::Source::PROC_SIGNAL
+        @event.should == Dispatch::Source.proc_event(:signal)
       end
     end
 
@@ -66,10 +66,10 @@
       end
     end    
 
-    describe "file:" do
+    describe "file" do
       before :each do
-        @msg = "#{$$}: #{Time.now}"
-        @filename = "/var/tmp/gcd_spec_source-#{$$}-#{Time.now}"
+        @msg = "#{$$}-#{Time.now}"
+        @filename = "/var/tmp/gcd_spec_source-#{@msg}"
         @file = nil
         @src = nil
       end
@@ -125,11 +125,11 @@
           @q.sync { }
           #while (@fired == false) do; end
           @fired.should == true
-          @flag.should == Dispatch::Source::VNODE_WRITE
+          @flag.should == Dispatch::Source.vnode_event(:write)
         end
       end          
+    end
 
-    end
     describe "on_interval" do
       it "fires with data on how often the timer has fired" do
         @count = -1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100119/4fa9407c/attachment-0001.html>


More information about the macruby-changes mailing list