summaryrefslogtreecommitdiffhomepage
path: root/test/sound_spec.rb
diff options
context:
space:
mode:
authorTom Black <[email protected]>2019-01-06 02:22:14 -0800
committerTom Black <[email protected]>2019-01-06 02:22:14 -0800
commit9994b770686428ebbde636081156abb5a50dc6c2 (patch)
tree745d89e4d017b4b6dda4056d98c6a8fbcc956a72 /test/sound_spec.rb
parent742bb574dc506fbb7a8d1774c44736ad0e228c54 (diff)
downloadruby2d-9994b770686428ebbde636081156abb5a50dc6c2.tar.gz
ruby2d-9994b770686428ebbde636081156abb5a50dc6c2.zip
Tests and fixes to the public API
Namely to ensure attribute getters/setters are consistent
Diffstat (limited to 'test/sound_spec.rb')
-rw-r--r--test/sound_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/sound_spec.rb b/test/sound_spec.rb
index 5458abe..f181b61 100644
--- a/test/sound_spec.rb
+++ b/test/sound_spec.rb
@@ -6,6 +6,11 @@ RSpec.describe Ruby2D::Sound do
it "raises exception if audio file doesn't exist" do
expect { Sound.new("bad_sound.wav") }.to raise_error(Ruby2D::Error)
end
+
+ it "creates sound" do
+ snd = Sound.new('test/media/music.mp3')
+ expect(snd.path).to eq('test/media/music.mp3')
+ end
end
end