summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.travis.yml1
-rw-r--r--README.md2
-rw-r--r--test/music_spec.rb13
-rw-r--r--test/sound_spec.rb2
4 files changed, 11 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml
index 289f4a6..ec0f2d6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,6 +2,7 @@ os: osx
osx_image: xcode10.1
language: ruby
before_install:
+ - brew update
- brew tap simple2d/tap
- brew install simple2d mruby
script:
diff --git a/README.md b/README.md
index 6491517..0668e11 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Welcome to Ruby 2D!
-[![Gem](https://img.shields.io/gem/v/ruby2d.svg)](https://rubygems.org/gems/ruby2d) [![Build Status](https://travis-ci.org/ruby2d/ruby2d.svg?branch=master)](https://travis-ci.org/ruby2d/ruby2d) [![Gitter](https://badges.gitter.im/ruby2d/ruby2d.svg)](https://gitter.im/ruby2d/ruby2d)
+[![Gem](https://img.shields.io/gem/v/ruby2d.svg)](https://rubygems.org/gems/ruby2d) [![Build Status](https://travis-ci.com/ruby2d/ruby2d.svg?branch=master)](https://travis-ci.com/ruby2d/ruby2d) [![Gitter](https://badges.gitter.im/ruby2d/ruby2d.svg)](https://gitter.im/ruby2d/ruby2d)
This is the [Ruby 2D gem](https://rubygems.org/gems/ruby2d). Check out the [Ruby 2D website](http://www.ruby2d.com) to learn how to get started building 2D apps in Ruby.
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')