Files
SwiftLint/Source/SwiftLintFramework/Rules/QuickDiscouragedPendingTestRuleExamples.swift
T
Ornithologist Coder c1a63db729 Adds xitBehavesLike
2017-10-17 16:06:05 +02:00

78 lines
2.3 KiB
Swift

//
// QuickDiscouragedPendingTestRuleExamples.swift
// SwiftLint
//
// Created by Ornithologist Coder on 10/16/17.
// Copyright © 2017 Realm. All rights reserved.
//
import Foundation
internal struct QuickDiscouragedPendingTestRuleExamples {
static let nonTriggeringExamples = [
"class TotoTests: QuickSpec {\n" +
" override func spec() {\n" +
" describe(\"foo\") {\n" +
" describe(\"bar\") { } \n" +
" context(\"bar\") {\n" +
" it(\"bar\") { }\n" +
" }\n" +
" it(\"bar\") { }\n" +
" itBehavesLike(\"bar\")\n" +
" }\n" +
" }\n" +
"}\n"
]
static let triggeringExamples = [
"class TotoTests: QuickSpec {\n" +
" override func spec() {\n" +
" ↓xdescribe(\"foo\") { }\n" +
" }\n" +
"}\n",
"class TotoTests: QuickSpec {\n" +
" override func spec() {\n" +
" ↓xcontext(\"foo\") { }\n" +
" }\n" +
"}\n",
"class TotoTests: QuickSpec {\n" +
" override func spec() {\n" +
" ↓xit(\"foo\") { }\n" +
" }\n" +
"}\n",
"class TotoTests: QuickSpec {\n" +
" override func spec() {\n" +
" describe(\"foo\") {\n" +
" ↓xit(\"bar\") { }\n" +
" }\n" +
" }\n" +
"}\n",
"class TotoTests: QuickSpec {\n" +
" override func spec() {\n" +
" context(\"foo\") {\n" +
" ↓xit(\"bar\") { }\n" +
" }\n" +
" }\n" +
"}\n",
"class TotoTests: QuickSpec {\n" +
" override func spec() {\n" +
" describe(\"foo\") {\n" +
" context(\"bar\") {\n" +
" ↓xit(\"toto\") { }\n" +
" }\n" +
" }\n" +
" }\n" +
"}\n",
"class TotoTests: QuickSpec {\n" +
" override func spec() {\n" +
" ↓pending(\"foo\")\n" +
" }\n" +
"}\n",
"class TotoTests: QuickSpec {\n" +
" override func spec() {\n" +
" ↓xitBehavesLike(\"foo\")\n" +
" }\n" +
"}\n"
]
}