Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/y-yagi/minitest-sound
https://github.com/y-yagi/minitest-sound
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/y-yagi/minitest-sound
- Owner: y-yagi
- License: mit
- Created: 2014-05-29T07:26:12.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-05-01T22:12:02.000Z (over 7 years ago)
- Last Synced: 2024-04-09T21:48:17.036Z (7 months ago)
- Language: Ruby
- Size: 3.34 MB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Minitest::Sound
[![Build Status](https://travis-ci.org/y-yagi/minitest-sound.svg?branch=master)](https://travis-ci.org/y-yagi/minitest-sound)
[![Gem Version](https://badge.fury.io/rb/minitest-sound.svg)](http://badge.fury.io/rb/minitest-sound)
[![Code Climate](https://codeclimate.com/github/y-yagi/minitest-sound/badges/gpa.svg)](https://codeclimate.com/github/y-yagi/minitest-sound)minitest-sound plays sound when test finished.
## Requirements
* [`mpg123`](http://www.mpg123.de/)
* `minitest ~> 5.0`## Installation
Add this line to your application's Gemfile:
gem 'minitest-sound'
And then execute:
$ bundle
## Usage
```ruby
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:
```ruby
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
* Add test
* Support soundcloud api