AsyncSpec
open class AsyncSpec : AsyncSpecBase
extension AsyncSpec: AsyncDSLUser
Undocumented
-
Returns the currently executing spec. Use in specs that require XCTestCase methods, e.g. expectation(description:).
If you’re using
beforeSuite
/afterSuite
, you should consider thecurrentSpec()
helper.Declaration
Swift
public private(set) static var current: AsyncSpec! { get }
-
Undocumented
Declaration
Swift
open class func spec()
-
This method is used as a hook for the following two purposes
- Performing all configurations
- Gathering examples for each spec classes
On Linux, those are done in
LinuxMain.swift
andQuick.QCKMain
. But SwiftPM on macOS does not have the mechanism (test cases are automatically discovered powered by Objective-C runtime), so we needed the alternative way.Declaration
Swift
override open class var defaultTestSuite: XCTestSuite { get }
-
This method is used as a hook for injecting test methods into the Objective-C runtime on individual test runs.
When
xctest
runs a test on a single method, it does not calldefaultTestSuite
on the test class but rather callsinstancesRespondToSelector:
to build its own suite.In normal conditions, Quick uses the implicit call to
defaultTestSuite
to both generate examples and inject them as methods by way oftestInvocations
. Under single test conditions, there’s no implicit call todefaultTestSuite
so we make it explicitly here.Declaration
Swift
open override class func instancesRespond(to aSelector: Selector!) -> Bool
-
-
-
-