summaryrefslogtreecommitdiffhomepage
path: root/test/rectangle_spec.rb
diff options
context:
space:
mode:
authorTom Black <[email protected]>2018-09-26 17:21:34 -0700
committerTom Black <[email protected]>2018-09-26 17:21:34 -0700
commite2fb9c34d6f56ec833e0451b26a02c304afaf71b (patch)
tree35029a30d2d0074ad783926fcd83e6dfe1401a37 /test/rectangle_spec.rb
parent6351fe4b374000ba78e3a7795f0f05e63cbdbc29 (diff)
downloadruby2d-e2fb9c34d6f56ec833e0451b26a02c304afaf71b.tar.gz
ruby2d-e2fb9c34d6f56ec833e0451b26a02c304afaf71b.zip
Documentation and style updates
Diffstat (limited to 'test/rectangle_spec.rb')
-rw-r--r--test/rectangle_spec.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/rectangle_spec.rb b/test/rectangle_spec.rb
index 940b6cc..bbf1616 100644
--- a/test/rectangle_spec.rb
+++ b/test/rectangle_spec.rb
@@ -1,13 +1,14 @@
require 'ruby2d'
RSpec.describe Ruby2D::Rectangle do
- describe '#contains?' do
- it "returns true if point is inside rectangle" do
+
+ describe "#contains?" do
+ it "returns true if point is inside the rectangle" do
rectangle = Rectangle.new(x: 0, y: 0, width: 50, height: 50)
expect(rectangle.contains?(25, 25)).to be true
end
- it "returns true if point is not inside rectangle" do
+ it "returns true if point is outside the rectangle" do
rectangle = Rectangle.new(x: 0, y: 0, width: 50, height: 50)
expect(rectangle.contains?(-25, 25)).to be false
expect(rectangle.contains?( 25, -25)).to be false
@@ -15,4 +16,5 @@ RSpec.describe Ruby2D::Rectangle do
expect(rectangle.contains?( 50, 25)).to be false
end
end
+
end