Skip to content

Instantly share code, notes, and snippets.

@steveklabnik
Last active December 17, 2015 06:59
Embed
What would you like to do?
Pending in minitest
# in your test_helper.rb
def pending
begin
yield
fail "OMG pending test passed."
rescue MiniTest::Assertion
skip "Still pending"
end
end
# in your foo_test.rb
pending do
assert false
end
@blowmage
Copy link

FWIW, I would prefer something like this:

Test style:

def pending_instead_of_test_in_method_name
  assert false
end

Spec style:

pending "instead of 'it' with test description" do
  true.must_equal false
end

/cc @zenspider

@zenspider
Copy link

I use

def test_whatever
  # ...
  flunk "not done yet"
end

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