GithubHelp home page GithubHelp logo

rspec-rerun's Introduction

rspec-rerun

Gem Version Build Status Dependency Status Code Climate

rspec-rerun reruns failed RSpec examples (for brittle tests).

It writes failed examples to the file rspec.failures and feeds these back to RSpec via -e.

Usage

(For RSpec 2 use version '~> 0.3.1'. )

# Gemfile
group :development, :test do
  gem 'rspec-rerun'
end
# Rakefile
require 'rspec-rerun/tasks'
task default: 'rspec-rerun:spec'
echo rspec.failures >> .gitignore

Run rake or rake rspec-rerun:spec. Failed examples will be rerun automatically.

Parameters

The rspec-rerun:spec task accepts the following parameters:

  • retry_count: number of retries, defaults to 1

e.g. rake rspec-rerun:spec[3]. ZSH users will want to try noglob or quote around the task name: rake 'rspec-rerun:spec[3]'.

You can set the following global environment variables:

  • RSPEC_RERUN_RETRY_COUNT: number of retries, defaults to the value of retry_count or 1
  • RSPEC_RERUN_PATTERN: spec file pattern, defaults to the value defined by RSpec::Core::RakeTask
  • RSPEC_RERUN_TAG: only execute the tag specified
  • RSPEC_RERUN_VERBOSE: if 'false', don't show the rspec command invoked by Rake

History

Rerunning failed specs has been a long requested feature #456 in RSpec. A viable approach was suggested in #596. The infrastructure from that pull request was merged and released with rspec-core 2.11, which enabled re-running specs outside of RSpec, as described in our blog post. This gem has evolved from it.

Contributing

See CONTRIBUTING.

Copyright and License

MIT License, see LICENSE for details.

(c) 2012-2015 Artsy Inc., Daniel Doubrovkine and Contributors

rspec-rerun's People

Contributors

dblock avatar grosser avatar kurtpreston avatar thekendalmiller avatar errm avatar kinopyo avatar nertzy avatar jonleighton avatar nightscape avatar nruth avatar

Watchers

James Cloos avatar Mike Dalton avatar  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.