Death to haphazard monkey-patching! Extend MiniTest through simple hooks.
gem install minitest-reporters
test_helper.rb file, add the following lines:
require "minitest/reporters" ::.
This will swap out the MiniTest runner to the custom one used by minitest-reporters and use the correct reporters for Textmate, Rubymine, and the console. If you would like to write your own reporter, just
include MiniTest::Reporter and override the methods you'd like. Take a look at the provided reporters for examples.
Don't like the default progress bar reporter?
Want to use multiple reporters?
::. [::::., ::::.new]
The following reporters are provided:
:::: # => Redgreen-capable version of standard MiniTest reporter :::: # => Turn-like output that reads like a spec :::: # => Fuubar-like output with a progress bar :::: # => Simple reporter designed for RubyMate ::::RubyMineReporter # => Reporter designed for RubyMine IDE and TeamCity CI server :::: # => Integrates with guard-minitest to provide on-screen notifications :::: # => JUnit test reporter designed for JetBrains TeamCity
Options can be passed to these reporters at construction-time, e.g. to force
color output from
::. [::::.(:color => true)]
If you are using minitest-reporters with ActiveSupport 3.x, make sure that you require ActiveSupport before invoking
MiniTest::Reporters.use!. Minitest-reporters fixes incompatibilities caused by monkey patches in ActiveSupport 3.x. ActiveSupport 4.x is unaffected.
Note on Patches/Pull Requests
- Fork the project.
- Make your feature addition or bug fix.
- Add tests for it. This is important so I don't break it in a future version unintentionally.
- Commit, but do not mess with the
Rakefile. If you want to have your own version, that is fine but bump the version in a commit by itself in another branch so I can ignore it when I pull.
- Send me a pull request. Bonus points for git flow feature branches.
Minitest-reporters is licensed under the MIT License. See
LICENSE for details.