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: Allow skipping before/after hook in examples #1200

@billychan

Description

@billychan

Sometimes I found it would be nice if I could skip before hook in certain examples. I have setup something in before hook, but within this context I have some examples need different setup.

Ideally the supposed syntax would be like:

describe "Skip hook demo" do
    before(:unskipped) do
        puts "before hook"
    end

    it "will use before hook" do
    end

    it "will not use before hook", skip: true do
    end

end

Expected output

  # before hook used only one time
 "before hook"  

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions