diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/music_spec.rb | 13 | ||||
| -rw-r--r-- | test/sound_spec.rb | 2 |
2 files changed, 9 insertions, 6 deletions
diff --git a/test/music_spec.rb b/test/music_spec.rb index c384c94..37fdc65 100644 --- a/test/music_spec.rb +++ b/test/music_spec.rb @@ -2,15 +2,18 @@ require 'ruby2d' RSpec.describe Ruby2D::Music do - # On AppVeyor: - # Error: (Mix_OpenAudio) WASAPI can't find requested audio endpoint: Element not found. + # Audio cannot be opened on CI + # On macOS: + # Mix_GetError: CoreAudio error (AudioDeviceGetProperty (kAudioDevicePropertyDeviceIsAlive)): 560947818 + # On Windows: + # Mix_GetError: WASAPI can't find requested audio endpoint: Element not found. describe "#new" do it "raises exception if audio file doesn't exist" do expect { Music.new('no_music_here.mp3') }.to raise_error(Ruby2D::Error) end - unless ENV['APPVEYOR'] + unless ENV['CI'] it "creates music with options" do mus = Music.new('test/media/music.mp3', loop: true) expect(mus.path).to eq('test/media/music.mp3') @@ -20,7 +23,7 @@ RSpec.describe Ruby2D::Music do end describe "attributes" do - unless ENV['APPVEYOR'] + unless ENV['CI'] it "can be set and read" do mus = Music.new('test/media/music.mp3') expect(mus.loop).to be false @@ -31,7 +34,7 @@ RSpec.describe Ruby2D::Music do end describe "#volume" do - unless ENV['APPVEYOR'] + unless ENV['CI'] it "sets the volume on music instances" do mus = Music.new('test/media/music.mp3') expect(mus.volume).to eq(100) diff --git a/test/sound_spec.rb b/test/sound_spec.rb index e5f0dc6..006e1f7 100644 --- a/test/sound_spec.rb +++ b/test/sound_spec.rb @@ -7,7 +7,7 @@ RSpec.describe Ruby2D::Sound do expect { Sound.new("no_sound_here.wav") }.to raise_error(Ruby2D::Error) end - unless ENV['APPVEYOR'] + unless ENV['CI'] # audio cannot be opened on CI; see `music_spec.rb` it "creates sound" do snd = Sound.new('test/media/sound.wav') expect(snd.path).to eq('test/media/sound.wav') |
