summaryrefslogtreecommitdiffhomepage
path: root/test/image_spec.rb
diff options
context:
space:
mode:
authorTom Black <[email protected]>2018-12-12 00:10:14 -0800
committerGitHub <[email protected]>2018-12-12 00:10:14 -0800
commit241093f3ea07255af6d36fa9e07c2a1ecb7c712f (patch)
treec9987a2eb4d98820ba5a8845909e4c9430d31307 /test/image_spec.rb
parent0f52b2115a5f910ae4d3350f7400bb11622ea899 (diff)
downloadruby2d-241093f3ea07255af6d36fa9e07c2a1ecb7c712f.tar.gz
ruby2d-241093f3ea07255af6d36fa9e07c2a1ecb7c712f.zip
Make `contains?` inclusive (#137)
If point is over the visual area, it's true. Also add default rectangle implementation to `renderable.rb`.
Diffstat (limited to 'test/image_spec.rb')
-rw-r--r--test/image_spec.rb15
1 files changed, 0 insertions, 15 deletions
diff --git a/test/image_spec.rb b/test/image_spec.rb
index e2ef37e..7d4f96d 100644
--- a/test/image_spec.rb
+++ b/test/image_spec.rb
@@ -8,19 +8,4 @@ RSpec.describe Ruby2D::Image do
end
end
- describe "#contains?" do
- it "returns true if point is inside the image" do
- image = Image.new("test/media/image.bmp")
- expect(image.contains?(50, 50)).to be true
- end
-
- it "returns true if point is outside the image" do
- image = Image.new("test/media/image.bmp")
- expect(image.contains?(-50, 50)).to be false
- expect(image.contains?(50, -50)).to be false
- expect(image.contains?(50, 150)).to be false
- expect(image.contains?(150, 50)).to be false
- end
- end
-
end