Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Feature request: shortcut for pending-block within it #1208

Closed
@grddev

Description

@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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions