Coder Social home page Coder Social logo

maxitest's Introduction

Minitest + all the features you always wanted.

Failure

Features

  • Ctrl+c stops tests and prints failures
  • pastable rerun snippet for failures (disabled/integrated on rails 5)
  • multiple before & after blocks
  • around blocks around { |t| Dir.chdir(...) { t.call } }
  • red-green output (disabled/integrated on rails 5)
  • mtest executable to run by line number and by folder (disabled/integrated on rails 5)
  • full backtrace for errors and assertions with verbose (-v)
  • let!
  • let_all execute once for all tests in a class and it's subclasses
  • order_dependent! to make your tests run in given order
  • Maxitest.static_class_order = true no longer sort tests class/sub-classes in random order
  • context for more expression
  • pending { assert false } is skip when it fails, but fails when it passes
  • implicit subject via require 'maxitest/implicit_subject'
  • xit to skip test (also does not call setup or teardown)
  • require 'maxitest/timeout' to make hanging tests fail after Maxitest.timeout seconds
  • require 'maxitest/threads' fail tests that leave extra threads running
  • require 'maxitest/global_must' (before autorun) disable deprecation on global must_* or global_expectations gem

Install

gem install maxitest

Usage

require "maxitest/autorun"

... normal tests ...

Development

  • everything vendored into 1 gem to avoid dependency madness
  • tested via rspec to avoid messing up our own tests by accident
  • fixes should go back to the original libraries
  • restrictive minitest dependency so nothing breaks by accident
  • ruby >=2.2
  • rake bundle to update all vendored gems

Author

Michael Grosser
[email protected]
License: MIT
CI

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.