0.0
No commit activity in last 3 years
No release in over 3 years
Bad tests shall not pass!
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 2.13
 Project Readme

rspec_gandalf

Because some objects shall not pass.

Installation

Add this line to your application's Gemfile:

gem 'rspec_gandalf'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install rspec_gandalf

Usage

  1. Create a file named "gandalf_test.rb"
  2. Put this:
# coding: utf-8
require 'rspec_gandalf'

class Balrog;end;

class Men;end;

class Hobbit;end;

class TrollRog < Balrog;end;

class PretaGil < Balrog;end;

describe Men do
  it { shall pass }
end

describe Balrog do
  it { shall pass }
end

describe TrollRog do
  it { shall pass }
end

describe PretaGil do
  it { shall_not pass }
end
  1. Test it

    $ rspec gandalf_test.rb

  2. See the result

    1. Balrog Failure/Error: it { shall pass } ATTENTION: Balrog is a flame of Udun and SHALL NOT PASS.

    2. TrollRog Failure/Error: it { shall pass } RUN YOU FOOL. Your disguise doesn't trick me. ATTENTION: TrollRog is a flame of Udun and SHALL NOT PASS 4 examples, 2 failures Failed examples:

    rspec ./test.rb:19 # Balrog rspec ./test.rb:23 # TrollRog