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