summaryrefslogtreecommitdiffhomepage
path: root/test/image_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/image_spec.rb')
-rw-r--r--test/image_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/image_spec.rb b/test/image_spec.rb
new file mode 100644
index 0000000..43950c9
--- /dev/null
+++ b/test/image_spec.rb
@@ -0,0 +1,11 @@
+require 'ruby2d'
+
+RSpec.describe Ruby2D::Image do
+
+ describe '#new' do
+ it "raises exception if image file doesn't exist" do
+ expect { Image.new(0, 0, 'bad_image.png') }.to raise_error(Ruby2D::Error)
+ end
+ end
+
+end