y-yagi / minitest-sound

MIT License
6 stars 0 forks source link

Minitest::Sound

Build Status Gem Version Code Climate

minitest-sound plays sound when test finished.

Requirements

Installation

Add this line to your application's Gemfile:

gem 'minitest-sound'

And then execute:

$ bundle

Usage

require 'minitest/sound'

Minitest::Sound.success = '/aaa/bbb/xxx.mp3' # Sound file which does play when a test succeeded.
Minitest::Sound.failure = '/aaa/bbb/xxx.mp3' # Sound file which does play when a test failed.
Minitest::Sound.during_test = '/aaa/bbb/xxx.mp3' # Sound file which does play during test.

When use with minitest-reporters

When use it with minitest-reporters, it is necessary to set Minitest::Sound::Reporter in Minitest::Reporters.use!

Example:

require 'minitest/sound/reporter'

Minitest::Sound.success = '/aaa/bbb/xxx.mp3'
Minitest::Sound.failure = '/aaa/bbb/xxx.mp3'
Minitest::Sound.during_test = '/aaa/bbb/xxx.mp3'

Minitest::Reporters.use! [Minitest::Reporters::SpecReporter.new, Minitest::Sound::Reporter.new]

Contributing

  1. Fork it ( https://github.com/y-yagi/minitest-sound/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

TODO