Skip to content

Files

Latest commit

 

History

History
95 lines (72 loc) · 1.48 KB

quick_discouraged_pending_test.md

File metadata and controls

95 lines (72 loc) · 1.48 KB

Pattern: Use of pending test

Issue: -

Description

Used to discourage pending test. This test won't run while it's marked as pending.

Examples of correct code:

class TotoTests: QuickSpec {
   override func spec() {
       describe("foo") {
           describe("bar") { } 
           context("bar") {
               it("bar") { }
           }
           it("bar") { }
           itBehavesLike("bar")
       }
   }
}

Examples of incorrect code:

class TotoTests: QuickSpec {
   override func spec() {
       xdescribe("foo") { }
   }
}


class TotoTests: QuickSpec {
   override func spec() {
       xcontext("foo") { }
   }
}


class TotoTests: QuickSpec {
   override func spec() {
       xit("foo") { }
   }
}


class TotoTests: QuickSpec {
   override func spec() {
       describe("foo") {
           xit("bar") { }
       }
   }
}


class TotoTests: QuickSpec {
   override func spec() {
       context("foo") {
           xit("bar") { }
       }
   }
}


class TotoTests: QuickSpec {
   override func spec() {
       describe("foo") {
           context("bar") {
               xit("toto") { }
           }
       }
   }
}


class TotoTests: QuickSpec {
   override func spec() {
       pending("foo")
   }
}


class TotoTests: QuickSpec {
   override func spec() {
       xitBehavesLike("foo")
   }
}

Further Reading