gui_geometry 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gui_geometry/rectangle.rb +1 -1
- data/lib/gui_geometry/version.rb +1 -1
- data/spec/rectangle_spec.rb +5 -0
- metadata +1 -1
data/lib/gui_geometry/version.rb
CHANGED
data/spec/rectangle_spec.rb
CHANGED
@@ -65,6 +65,11 @@ describe "Rectangle" do
|
|
65
65
|
(rect(0,0,10,10) | rect(-5,-5,10,10)).should == rect(0,0,5,5)
|
66
66
|
end
|
67
67
|
|
68
|
+
it "default intersection and union" do
|
69
|
+
(rect(0,0,10,10) | nil).should == rect(0,0,10,10)
|
70
|
+
(rect(0,0,10,10) & nil).should == rect(0,0,10,10)
|
71
|
+
end
|
72
|
+
|
68
73
|
it ".present?" do
|
69
74
|
rect(0,0,1,1).present?.should == true
|
70
75
|
rect(0,0,1,0).present?.should == false
|