Reputation: 9316
And if this is possible, what is the syntax for this?
Upvotes: 96
Views: 22157
Reputation: 9316
I figured this out. With minitest you don't mark tests as pending. But you can skip them:
http://docs.seattlerb.org/minitest/Minitest/Assertions.html#method-i-skip
Upvotes: 11
Reputation: 2367
It took me a few minutes poking around on the RubyDocs to figure out the actual syntax for pulling this off. Figured I'd toss it here to save some future person a few clicks.
From inside your test, simply call the skip()
method, like so:
skip("reason for skipping the test")
The method is MiniTest::Assertions#skip
- http://docs.seattlerb.org/minitest/Minitest/Assertions.html#method-i-skip
Upvotes: 161
Reputation: 111
Also, when using MiniTest::Spec, if you don't pass a block to it(), the test is marked as skipped.
Upvotes: 8