Project

rspec-todo

0.01
Repository is archived
No commit activity in last 3 years
No release in over 3 years
todo: pending if failed
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0
>= 0

Runtime

>= 0
 Project Readme

Rspec::Todo Build Status

  • todo
  • pending if failed
  • not_todo
  • result errors if passed

Installation

Add this line to your application's Gemfile:

gem 'rspec-todo'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rspec-todo

Usage

require "rspec/todo"

describe "rspec-todo" do
  include ::RSpec::Todo

  it "todo results pending if failed" do
    todo {
      # your test code which may fail and will fix later
    }
  end

  it "not_todo report error when test passed" do
    not_todo {
      # your test code which is not correct but cannot fix for some reason
      #  (e.g. released with the bug and user have already integrated system using the bug)
    }
  end
end

if: and unless:

switch use to_do and not to_do with options.

it "todo results pending if failed and if: is true" do
  todo(if: true) {
    # your code which may fail and will fix later
  }
end

it "todo ignored if if: is true" do
  todo(if: false) { # todo is ignored and expectation is evaled directly
  }
end

Comparison

methods no errors (passed) raise error (failed)
pending failure pending
todo success pending
not_todo failure success

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request