Repository: Quick/Quick (swift)

Issue:
Make `xitBehavesLike` with a `String` as a name publicly available (sync and async)
- [X] I have read [CONTRIBUTING](https://github.com/Quick/Quick/blob/main/CONTRIBUTING.md) and have done my best to follow them.

### What did you do?

I was trying to quickly `xit` a `itBehavesLike` function which uses the `itBehavesLike(_ name: String)` signature. But it turned out that this method overload does not exist.

### What did you expect to happen?

That the `xitBehavesLike(_ name: String)` is available on the `SyncDSLUser` and `AsyncDSLUser`.

### Environment

List the software versions you're using:

 - Quick: *7.0.1*
 - Nimble: *N/A*
 - Xcode Version: *N/A*
 - Swift Version: *N/A*

Please also mention which package manager you used and its version. Delete the
other package managers in this list:

 - CocoaPods: *N/A*
 - Carthage: *N/A*
 - Swift Package Manager *N/A*

Pull request description:
Fixes #1227 for SyncDSLUser. I have no plans to make `itBehavesLike(_ name: String)`, `fitBehavesLike(_ name: String)`, nor `xitBehavesLike(_ name: String)` a thing for Async tests.

This adds a public `xitBehavesLike` for quickly pending out the string-based `itBehavesLike` api in `QuickSpec` and `Behavior`. Something which I apparently forgot to do when I created `SyncDSLUser`.

Patch:
diff --git a/Sources/Quick/DSL/DSL.swift b/Sources/Quick/DSL/DSL.swift
index 037b4d9c..b1485deb 100644
--- a/Sources/Quick/DSL/DSL.swift
+++ b/Sources/Quick/DSL/DSL.swift
@@ -297,6 +297,22 @@ extension SyncDSLUser {
         World.sharedWorld.xitBehavesLike(behavior, context: context, file: file, line: line)
     }
 
+    /**
+     Use this to quickly mark an `itBehavesLike` closure as pending.
+     This disables the example group defined by this behavior and ensures the code within is never run.
+     */
+    public static func xitBehavesLike(_ name: String, file: FileString = #file, line: UInt = #line) {
+        xitBehavesLike(name, file: file, line: line, sharedExampleContext: { return [:] })
+    }
+
+    /**
+     Use this to quickly mark an `itBehavesLike` closure as pending.
+     This disables the example group defined by this behavior and ensures the code within is never run.
+     */
+    public static func xitBehavesLike(_ name: String, file: FileString = #file, line: UInt = #line, sharedExampleContext: @escaping SharedExampleContext) {
+        World.sharedWorld.xitBehavesLike(name, sharedExampleContext: sharedExampleContext, file: file, line: line)
+    }
+
     // MARK: - Focused
     /**
      Use this to quickly focus a `describe` closure, focusing the examples in the closure.


Test patch:
diff --git a/Tests/QuickTests/QuickTests/FunctionalTests/PendingTests.swift b/Tests/QuickTests/QuickTests/FunctionalTests/PendingTests.swift
index bf6874f6..6f5f7aba 100644
--- a/Tests/QuickTests/QuickTests/FunctionalTests/PendingTests.swift
+++ b/Tests/QuickTests/QuickTests/FunctionalTests/PendingTests.swift
@@ -14,10 +14,18 @@ class FunctionalTests_PendingSpec_Behavior: Behavior<Void> {
 }
 class FunctionalTests_PendingSpec: QuickSpec {
     override class func spec() {
+        sharedExamples("shared pending behavior") { aContext in
+            it("will not run") {
+                fail()
+            }
+        }
+
         xit("an example that will not run") {
             expect(true).to(beFalsy())
         }
         xitBehavesLike(FunctionalTests_PendingSpec_Behavior.self) { () -> Void in }
+        xitBehavesLike("shared pending behavior")
+        xitBehavesLike("shared pending behavior", sharedExampleContext: { [:] })
         describe("a describe block containing only one enabled example") {
             beforeEach { oneExampleBeforeEachExecutedCount += 1 }
             it("an example that will run") {}