[macruby-changes] [3224] MacRuby/trunk/spec/macruby
source_changes at macosforge.org
source_changes at macosforge.org
Fri Jan 8 17:47:16 PST 2010
Revision: 3224
http://trac.macosforge.org/projects/ruby/changeset/3224
Author: ernest.prabhakar at gmail.com
Date: 2010-01-08 17:47:16 -0800 (Fri, 08 Jan 2010)
Log Message:
-----------
Added stubs for various Dispatch::Source types
Modified Paths:
--------------
MacRuby/trunk/spec/macruby/core/gcd/source_spec.rb
MacRuby/trunk/spec/macruby/tags/macruby/core/gcd/source_tags.txt
Modified: MacRuby/trunk/spec/macruby/core/gcd/source_spec.rb
===================================================================
--- MacRuby/trunk/spec/macruby/core/gcd/source_spec.rb 2010-01-09 01:32:07 UTC (rev 3223)
+++ MacRuby/trunk/spec/macruby/core/gcd/source_spec.rb 2010-01-09 01:47:16 UTC (rev 3224)
@@ -77,7 +77,6 @@
@i.should == 42
end
-
it "coalesces data for source in event handler" do
@i = 0
src = Dispatch::Source.new(@type, 0, 0, @q) do |source|
@@ -92,7 +91,6 @@
end
end
-
describe :DATA_OR do
before :each do
@@ -108,7 +106,6 @@
src = Dispatch::Source.new(@type, 0, 0, @q) { }
src.suspended?.should == false
end
-
it "fires event handler on merge" do
@i = 0
@@ -139,7 +136,64 @@
@i.should == 42 #0b101_010
end
end
+
+ describe :PROC do
+ before :each do
+ @type = Dispatch::Source::PROC
+ end
+
+ it "returns an instance of Dispatch::Source" do
+ src = Dispatch::Source.new(@type, $$, 0, @q) { }
+ src.should be_kind_of(Dispatch::Source)
+ end
+ end
+
+ describe :SIGNAL do
+ before :each do
+ @type = Dispatch::Source::SIGNAL
+ end
+
+ it "returns an instance of Dispatch::Source" do
+ src = Dispatch::Source.new(@type, $$, 0, @q) { }
+ src.should be_kind_of(Dispatch::Source)
+ end
+ end
+
+ describe :READ do
+ before :each do
+ @type = Dispatch::Source::READ
+ end
+
+ it "returns an instance of Dispatch::Source" do
+ src = Dispatch::Source.new(@type, 0, 0, @q) { }
+ src.should be_kind_of(Dispatch::Source)
+ end
+ end
+
+
+ describe :WRITE do
+ before :each do
+ @type = Dispatch::Source::WRITE
+ end
+
+ it "returns an instance of Dispatch::Source" do
+ src = Dispatch::Source.new(@type, 0, 0, @q) { }
+ src.should be_kind_of(Dispatch::Source)
+ end
+ end
+
+ describe :VNODE do
+ before :each do
+ @type = Dispatch::Source::VNODE
+ end
+
+ it "returns an instance of Dispatch::Source" do
+ src = Dispatch::Source.new(@type, 0, 0, @q) { }
+ src.should be_kind_of(Dispatch::Source)
+ end
+ end
+
end
-
+
end
end
Modified: MacRuby/trunk/spec/macruby/tags/macruby/core/gcd/source_tags.txt
===================================================================
--- MacRuby/trunk/spec/macruby/tags/macruby/core/gcd/source_tags.txt 2010-01-09 01:32:07 UTC (rev 3223)
+++ MacRuby/trunk/spec/macruby/tags/macruby/core/gcd/source_tags.txt 2010-01-09 01:47:16 UTC (rev 3224)
@@ -1 +1 @@
-
+fails:Dispatch::Source of type SIGNAL returns an instance of Dispatch::Source
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100108/540d0187/attachment-0001.html>
More information about the macruby-changes
mailing list