Code Monkey home page Code Monkey logo

minitest-snail's Introduction

Minitest Snail

Prints a list of tests that take too long.

Installation

gem install minitest-snail

Usage

Minitest Snail can be enabled from the command line using the max-duration parameter:

ruby test/example_test.rb --max-duration 2

This would print out a list of any tests taking longer than 2 seconds to run:

# Running:

....

Finished in 5.001143s

4 runs, 7 assertions, 0 failures, 0 errors, 0 skips

2 slow tests.
  0) ExampleTest#test_alpha: 2.30 s
  1) ExampleTest#test_beta: 2.11 s

If you don't run your tests directly, you can programmatically enable Minitest Snail:

Minitest::SnailReporter.enable!

You can also configure it using enable!:

Minitest::SnailReporter.enable! :max_duration => 2.5

If you are using Rails, your test/test_helper.rb file is good place to do this initialization.

Authors

Adam Sanderson (http://monkeyandcrow.com)

minitest-snail's People

Contributors

adamsanderson avatar practicingruby avatar

Stargazers

 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.