Quick: Using pending causes custom Configuration hooks not to run

If you create a custom Configuration class and add your own custom closures for:

beforeSuite, afterSuite, beforeEach afterEach and then use pending (instead of it/xit/fit) on your Quick tests, none of the configuration closures for beforeEach and afterEach are called, beforeSuite or afterSuite are called.

I typically begin my testing by writing out my describe/context(s) and use pending on everything. When I run a test with ALL pending and no it/xit/fit, none of the hooks are invoked.

Here is a very simple example of what I’m talking about:

class SQLQueryOperationPendingSpec : QuickSpec {
    override func spec() {
        describe("With a SQLQueryOperation") {

            context("when executing a query without a table") {

                pending("it will throw a MissingTableName exception") {}

            }

            context("when executing a query with named parameters") {

                pending("it will execute the query against the database") {}

            }

            context("when executing a query with an array of parameters") {

                pending("it will execute the query against the database") {}
            }

        }
    }
}

FWIW, I have not tested what happens when I have tests with a mix of pending/it, so I don’t know what happens there.

About this issue

  • Original URL
  • State: open
  • Created 8 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

Closing this issue since @takecian has filed a PR which addresses this functionality. Still haven’t got around to reviewing it (sorry @takecian!). I’ll actually try to get around to it soon. 😃

I will review your PR soon, @takecian.