Last active
December 17, 2015 08:38
-
-
Save benolee/5581133 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'minitest', '~> 5.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "minitest/autorun" | |
class PendingTest < Minitest::Test | |
def pending | |
begin | |
yield | |
fail "OMG pending test passed." | |
rescue MiniTest::Assertion | |
skip "Still pending" | |
end | |
end | |
def test_with_normal_skip | |
skip | |
assert false | |
end | |
def test_with_pending | |
pending do | |
assert false | |
end | |
end | |
end | |
__END__ | |
$ ruby -r bundler/setup test.rb | |
Run options: --seed 8125 | |
# Running: | |
SS | |
Finished in 0.001369s, 1460.9204 runs/s, 730.4602 assertions/s. | |
2 runs, 1 assertions, 0 failures, 0 errors, 2 skips |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Change line 20 to
assert true