Feature request: shortcut for pending-block within it
Created by: grddev
Using pending
inside an it
block is a useful feature for ensuring that tests fail before touching the code, but there seems to be no shortcut for that kind of pending. That is, I would like to have an alternative to
pending 'returns truthy' do
expect(true).to be(true)
end
or
it 'returns truthy' do
pending
expect(true).to be(true)
end
that works exactly like:
it 'returns truthy' do
pending do
expect(true).to be(true)
end
end
The difference being that in the latter case, the code is executed and a failure is reported unless the inner test actually fails. Perhaps the name pending!
could be used in both of the above cases to signify the case where the tests should still be executed.
The main motivation would to allow a work flow where a forced "red before green" workflow can be enforced by separating the commits, while not having to fiddle with indentation in the subsequent commit test cases.