Skip to content

Instantly share code, notes, and snippets.

@benolee
Last active December 17, 2015 08:38
Show Gist options
  • Save benolee/5581133 to your computer and use it in GitHub Desktop.
Save benolee/5581133 to your computer and use it in GitHub Desktop.
source 'https://rubygems.org'
gem 'minitest', '~> 5.0'
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
@steveklabnik
Copy link

Change line 20 to assert true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment