Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktm committed Jan 11, 2019
1 parent e6a6abc commit 7d1a4de
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion 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.

Expand Down
13 changes: 8 additions & 5 deletions test/music_spec.rb
Expand Up @@ -2,15 +2,18 @@

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')
Expand All @@ -20,7 +23,7 @@
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
Expand All @@ -31,7 +34,7 @@
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)
Expand Down
2 changes: 1 addition & 1 deletion test/sound_spec.rb
Expand Up @@ -7,7 +7,7 @@
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')
Expand Down

0 comments on commit 7d1a4de

Please sign in to comment.