Skip to content

Clarify pending docs

gitlab-qa-bot requested to merge clarify-pending-main into main

Created by: pirj

A summary of what is done here:

  1. Replaced a confusing "an example" docstring of a describe statement:
- describe "an example" do
+ describe "some behaviour" do
  1. Removed the misleading notion of a possibility to bypass hooks for any notation of a pending example:
- #`before(:example)` hooks are eval'd when you use the `pending`
- #   method within an example. If you want to declare an example `pending`
- #   and bypass the `before` hooks as well,

just because hooks are run either way.

  1. Wrapped the example of pending example group alias into describe to make a distinction between pending example alias and pending example-scope method:
it "is pending with no message" do
  pending
end

vs

describe "SomeClass" do
  pending "does not implement something yet" do
    # ...
  end
end
  1. Clarified the difference between different applications of pending when the failure happens inside before hook.

See the discussion:

Merge request reports