- zenspider.com
- zenspider projects
- minitest-trump
For when the reality of your tests is just too much to bear, turn your failures into fake news and errors into alt-facts.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
require "minitest/autorun" require "minitest/trump" class TestTrump < Minitest::Test def test_failure assert_equal 1, 2 end def bad_method raise "You're fired!" end def test_error bad_method end end |
outputs:
# Running:
FA
Finished in 0.000959s, 2085.5057 runs/s, 1042.7529 assertions/s.
1) FAKE NEWS!:
TestTrump#test_failure [example.rb:6]:
Expected: 1
Actual: 2
2) Alt-Fact:
TestTrump#test_error:
RuntimeError: You're fired!
example.rb:10:in `bad_method'
example.rb:14:in `test_error'
2 runs, 1 assertions, 1 failures, 1 errors, 0 skips
gem install minitest-trump
git clone git://github.com/seattlerb/minitest-trump