Code Monkey home page Code Monkey logo

minitest-reporters's Introduction

minitest-reporters - create customizable MiniTest output formats Build Status

Death to haphazard monkey-patching! Extend MiniTest through simple hooks.

Looking for a new maintainer!

I no longer use minitest-reporters, and would like to pass on the project to someone else who will be able to dedicate more time to it. Contact me via email or Twitter if you're interested in maintaining this project.

Installation

gem install minitest-reporters

Usage

In your test_helper.rb file, add the following lines:

require "minitest/reporters"
MiniTest::Reporters.use!

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?

MiniTest::Reporters.use! MiniTest::Reporters::SpecReporter.new

Want to use multiple reporters?

MiniTest::Reporters.use! [MiniTest::Reporters::SpecReporter.new, MiniTest::Reporters::GuardReporter.new]

The following reporters are provided:

MiniTest::Reporters::DefaultReporter  # => Redgreen-capable version of standard MiniTest reporter
MiniTest::Reporters::SpecReporter     # => Turn-like output that reads like a spec
MiniTest::Reporters::ProgressReporter # => Fuubar-like output with a progress bar
MiniTest::Reporters::RubyMateReporter # => Simple reporter designed for RubyMate
MiniTest::Reporters::RubyMineReporter # => Reporter designed for RubyMine IDE and TeamCity CI server
MiniTest::Reporters::GuardReporter    # => Integrates with guard-minitest to provide on-screen notifications
MiniTest::Reporters::JUnitReporter    # => JUnit test reporter designed for JetBrains TeamCity

Options can be passed to these reporters at construction-time, e.g. to force color output from DefaultReporter:

MiniTest::Reporters.use! [MiniTest::Reporters::SpecReporter.new(:color => true)]

Caveats

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.

Resources

License

Minitest-reporters is licensed under the MIT License. See LICENSE for details.

minitest-reporters's People

Contributors

grosser avatar bensomers avatar randycoulman avatar iromeo avatar bramswenson avatar chiku avatar aspiers avatar cehoffman avatar djantea avatar dzajic avatar sax avatar ferrous26 avatar os97673 avatar phlipper avatar bolshakov avatar winston avatar

Watchers

James Cloos avatar girijabrahme avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.