diff options
| author | Tom Black <[email protected]> | 2017-05-19 22:24:02 -0400 |
|---|---|---|
| committer | Tom Black <[email protected]> | 2017-05-20 18:15:53 -0400 |
| commit | f69598768e9a3002d9e7c2acbed109016fac6ae9 (patch) | |
| tree | c716af50d3d98676704518ce9ab84f9afb7368f4 /test/sound_spec.rb | |
| parent | 8ce4acf745b27c3f1209b02cc6aeec2c40b5aa1b (diff) | |
| download | ruby2d-f69598768e9a3002d9e7c2acbed109016fac6ae9.tar.gz ruby2d-f69598768e9a3002d9e7c2acbed109016fac6ae9.zip | |
Check if audio file exists for `Sound` and `Music`
Diffstat (limited to 'test/sound_spec.rb')
| -rw-r--r-- | test/sound_spec.rb | 11 |
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 |
