xcfit 2.0.6 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.swift-version +1 -0
- data/.travis.yml +13 -13
- data/README.md +57 -35
- data/XCFit.podspec +6 -16
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/BaseScreen.swift +14 -12
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/CommonStepDefinitions.swift +16 -15
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/Extensions.swift +11 -11
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/HomeScreen.swift +5 -5
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/HomeScreenSteps.swift +9 -8
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/Hooks.swift +7 -6
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___-Bridging-Header.h +7 -5
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___.swift +10 -8
- data/homebrew/xcfit +155 -0
- data/lib/XCFit/version.rb +1 -1
- metadata +15 -177
- data/XCFit/Classes/.gitkeep +0 -0
- data/XCFit/Classes/CliSwift.swift +0 -87
- data/XCFit/Classes/CopyDir.swift +0 -26
- data/XCFit/Classes/Cucumberish/Core/CCIBlockDefinitions.h +0 -400
- data/XCFit/Classes/Cucumberish/Core/Managers/CCIFeaturesManager.h +0 -72
- data/XCFit/Classes/Cucumberish/Core/Managers/CCIFeaturesManager.m +0 -141
- data/XCFit/Classes/Cucumberish/Core/Managers/CCIStepsManager.h +0 -51
- data/XCFit/Classes/Cucumberish/Core/Managers/CCIStepsManager.m +0 -245
- data/XCFit/Classes/Cucumberish/Core/Models/CCIArgument.h +0 -62
- data/XCFit/Classes/Cucumberish/Core/Models/CCIArgument.m +0 -117
- data/XCFit/Classes/Cucumberish/Core/Models/CCIAroundHock.h +0 -37
- data/XCFit/Classes/Cucumberish/Core/Models/CCIAroundHock.m +0 -37
- data/XCFit/Classes/Cucumberish/Core/Models/CCIBackground.h +0 -46
- data/XCFit/Classes/Cucumberish/Core/Models/CCIBackground.m +0 -117
- data/XCFit/Classes/Cucumberish/Core/Models/CCIExample.h +0 -89
- data/XCFit/Classes/Cucumberish/Core/Models/CCIExample.m +0 -128
- data/XCFit/Classes/Cucumberish/Core/Models/CCIFeature.h +0 -49
- data/XCFit/Classes/Cucumberish/Core/Models/CCIFeature.m +0 -174
- data/XCFit/Classes/Cucumberish/Core/Models/CCIHock.h +0 -36
- data/XCFit/Classes/Cucumberish/Core/Models/CCIHock.m +0 -34
- data/XCFit/Classes/Cucumberish/Core/Models/CCILocation.h +0 -61
- data/XCFit/Classes/Cucumberish/Core/Models/CCILocation.m +0 -91
- data/XCFit/Classes/Cucumberish/Core/Models/CCIScenarioDefinition.h +0 -97
- data/XCFit/Classes/Cucumberish/Core/Models/CCIScenarioDefinition.m +0 -224
- data/XCFit/Classes/Cucumberish/Core/Models/CCIStep.h +0 -85
- data/XCFit/Classes/Cucumberish/Core/Models/CCIStep.m +0 -98
- data/XCFit/Classes/Cucumberish/Core/Models/CCIStepDefinition.h +0 -43
- data/XCFit/Classes/Cucumberish/Core/Models/CCIStepDefinition.m +0 -65
- data/XCFit/Classes/Cucumberish/Cucumberish.h +0 -133
- data/XCFit/Classes/Cucumberish/Cucumberish.m +0 -604
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHAstBuilder.h +0 -15
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHAstBuilder.m +0 -312
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHAstNode.h +0 -20
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHAstNode.m +0 -79
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHBackground.h +0 -12
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHBackground.m +0 -18
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHComment.h +0 -11
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHComment.m +0 -27
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHDataTable.h +0 -14
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHDataTable.m +0 -30
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHDocString.h +0 -14
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHDocString.m +0 -29
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHExamples.h +0 -24
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHExamples.m +0 -49
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHFeature.h +0 -24
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHFeature.m +0 -50
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialect.h +0 -25
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialect.m +0 -64
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialectProvider.h +0 -9
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialectProvider.m +0 -124
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialectProviderProtocol.h +0 -10
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLanguageConstants.h +0 -9
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLanguageConstants.m +0 -10
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLanguageSetting.h +0 -17
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLanguageSetting.m +0 -18
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLine.h +0 -12
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLine.m +0 -179
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLineProtocol.h +0 -64
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLineSpan.h +0 -9
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLineSpan.m +0 -26
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasDescriptionProtocol.h +0 -8
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasLocationProtocol.h +0 -8
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasRowsProtocol.h +0 -8
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasStepsProtocol.h +0 -8
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasTagsProtocol.h +0 -8
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHLocation.h +0 -12
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHLocation.m +0 -41
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHNode.h +0 -4
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHNode.m +0 -5
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParser+Extensions.h +0 -10
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParser+Extensions.m +0 -18
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParser.h +0 -132
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParser.m +0 -2735
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParserException.h +0 -55
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParserException.m +0 -192
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenario.h +0 -14
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenario.m +0 -18
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioDefinition.h +0 -23
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioDefinition.m +0 -41
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioDefinition_Private.h +0 -6
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioOutline.h +0 -15
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioOutline.m +0 -26
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHStep.h +0 -16
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHStep.m +0 -35
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHStepArgument.h +0 -4
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHStepArgument.m +0 -5
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTableCell.h +0 -13
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTableCell.m +0 -28
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTableRow.h +0 -13
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTableRow.m +0 -29
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTag.h +0 -13
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTag.m +0 -28
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHToken.h +0 -26
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHToken.m +0 -50
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTokenMatcher.h +0 -29
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTokenMatcher.m +0 -283
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTokenScanner.h +0 -12
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTokenScanner.m +0 -59
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/NSString+Trim.h +0 -7
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/NSString+Trim.m +0 -28
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/gherkin-languages.json +0 -2969
- data/XCFit/Classes/Cucumberish/Utils/NSArray+Hashes.h +0 -24
- data/XCFit/Classes/Cucumberish/Utils/NSArray+Hashes.m +0 -44
- data/XCFit/Classes/Cucumberish/Utils/NSObject+Dictionary.h +0 -7
- data/XCFit/Classes/Cucumberish/Utils/NSObject+Dictionary.m +0 -83
- data/XCFit/Classes/Cucumberish/Utils/NSString+Formatter.h +0 -32
- data/XCFit/Classes/Cucumberish/Utils/NSString+Formatter.m +0 -70
- data/XCFit_Templates/XCFit/Mac Acceptance Testing Bundle.xctemplate/TemplateIcon.icns +0 -0
- data/XCFit_Templates/XCFit/Mac Acceptance Testing Bundle.xctemplate/TemplateInfo.plist +0 -40
- data/XCFit_Templates/XCFit/Mac Acceptance Tests.xctemplate/Empty.xib +0 -12
- data/XCFit_Templates/XCFit/Mac Acceptance Tests.xctemplate/TemplateIcon.icns +0 -0
- data/XCFit_Templates/XCFit/Mac Acceptance Tests.xctemplate/TemplateInfo.plist +0 -61
- data/XCFit_Templates/XCFit/MacOS UI Cucumberish Testing Bundle.xctemplate/TemplateInfo.plist +0 -39
- data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/TemplateIcon.icns +0 -0
- data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/TemplateInfo.plist +0 -134
- data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/___PACKAGENAMEASIDENTIFIER___.m +0 -17
- data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/___PACKAGENAMEASIDENTIFIER___.swift +0 -13
- data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/___POD_NAME___.m +0 -25
- data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/AcceptanceTests-Bridging-Header.h +0 -1
- data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/FixtureExample.swift +0 -35
- data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/SlimTables.h +0 -28
- data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/TemplateInfo.plist +0 -155
- data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/___PACKAGENAMEASIDENTIFIER___-Bridging-Header.h +0 -12
- data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/___PACKAGENAMEASIDENTIFIER___.m +0 -33
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/BaseScreen.swift +0 -41
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/CommonStepDefinitions.swift +0 -92
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/Extensions.swift +0 -58
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/HomeScreen.swift +0 -24
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/HomeScreenSteps.swift +0 -28
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/Hooks.swift +0 -26
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/TemplateIcon.png +0 -0
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/TemplateIcon@2x.png +0 -0
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/TemplateInfo.plist +0 -159
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___-Bridging-Header.h +0 -15
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___.h +0 -23
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___.m +0 -28
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___.swift +0 -37
- data/Xcode7-Templates/XCFit/Mac Acceptance Testing Bundle.xctemplate/TemplateIcon.icns +0 -0
- data/Xcode7-Templates/XCFit/Mac Acceptance Testing Bundle.xctemplate/TemplateInfo.plist +0 -40
- data/Xcode7-Templates/XCFit/Mac Acceptance Tests.xctemplate/Empty.xib +0 -12
- data/Xcode7-Templates/XCFit/Mac Acceptance Tests.xctemplate/TemplateIcon.icns +0 -0
- data/Xcode7-Templates/XCFit/Mac Acceptance Tests.xctemplate/TemplateInfo.plist +0 -61
- data/Xcode7-Templates/XCFit/MacOS UI Cucumberish Testing Bundle.xctemplate/TemplateInfo.plist +0 -39
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/BaseScreen.swift +0 -42
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/Extensions.swift +0 -60
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/HomeElements.swift +0 -31
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/HomeProtocol.swift +0 -25
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/HomeScreen.swift +0 -24
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/HomeScreenTest.swift +0 -30
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/ProtocolOrientedTest.swift +0 -45
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/TemplateIcon.png +0 -0
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/TemplateIcon@2x.png +0 -0
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/TemplateInfo.plist +0 -141
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___TestBase.swift +0 -30
- data/Xcode7-Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateIcon-old.icns +0 -0
- data/Xcode7-Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateIcon.png +0 -0
- data/Xcode7-Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateIcon@2x.png +0 -0
- data/Xcode7-Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateInfo.plist +0 -40
- data/Xcode7-Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateIcon-old.icns +0 -0
- data/Xcode7-Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateIcon.png +0 -0
- data/Xcode7-Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateIcon@2x.png +0 -0
- data/Xcode7-Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateInfo.plist +0 -59
- data/Xcode7-Templates/XCFit/iOS UI Cucumberish Testing Bundle.xctemplate/TemplateInfo.plist +0 -39
- data/Xcode7-Templates/XCFit/iOS XCUI POM Test Bundle.xctemplate/TemplateInfo.plist +0 -39
data/XCFit/Classes/.gitkeep
DELETED
File without changes
|
@@ -1,87 +0,0 @@
|
|
1
|
-
// import Foundation
|
2
|
-
|
3
|
-
// func printShell(launchPath launchPath: String, arguments: [String], output: String?) {
|
4
|
-
// let args = arguments.reduce("") {
|
5
|
-
// $0 + $1 + " "
|
6
|
-
// }
|
7
|
-
// print("Ran shell script: \(launchPath) \(args)\nOutput:\n" + (output ?? "--No Output--"))
|
8
|
-
// }
|
9
|
-
|
10
|
-
// func shell(launchPath launchPath: String, arguments: [String] = [], debugPrint: Bool = false) -> String? {
|
11
|
-
|
12
|
-
// let task = NSTask()
|
13
|
-
// task.launchPath = launchPath
|
14
|
-
// task.arguments = arguments
|
15
|
-
|
16
|
-
// let pipe = NSPipe()
|
17
|
-
// task.standardOutput = pipe
|
18
|
-
// task.launch()
|
19
|
-
|
20
|
-
// let data = pipe.fileHandleForReading.readDataToEndOfFile()
|
21
|
-
// let output: String? = NSString(data: data, encoding: NSUTF8StringEncoding) as String?
|
22
|
-
|
23
|
-
// if debugPrint {
|
24
|
-
// printShell(launchPath: launchPath, arguments: arguments, output: output)
|
25
|
-
// }
|
26
|
-
// return output
|
27
|
-
// }
|
28
|
-
|
29
|
-
// func environmentVariable(named named: String) -> String? {
|
30
|
-
// return NSProcessInfo.processInfo().environment[named]
|
31
|
-
// }
|
32
|
-
|
33
|
-
// func say(message: String) {
|
34
|
-
// print("😀 " + TerminalColor.Green + message + TerminalColor.Default)
|
35
|
-
// }
|
36
|
-
|
37
|
-
// func warn(message: String) {
|
38
|
-
// print("😰 " + TerminalColor.Yellow + message + TerminalColor.Default)
|
39
|
-
// }
|
40
|
-
|
41
|
-
// @noreturn
|
42
|
-
// func fail(message: String) {
|
43
|
-
// print("😭 " + TerminalColor.Red + message + TerminalColor.Default)
|
44
|
-
// exit(1)
|
45
|
-
// }
|
46
|
-
|
47
|
-
// protocol Script {
|
48
|
-
// var usage: String { get }
|
49
|
-
// var expectedNumberOfArguments: Int { get }
|
50
|
-
// func run(arguments arguments: [String])
|
51
|
-
|
52
|
-
// func run()
|
53
|
-
// }
|
54
|
-
|
55
|
-
// extension Script {
|
56
|
-
|
57
|
-
// func run() {
|
58
|
-
// let args = createArguments()
|
59
|
-
// guard expectedNumberOfArguments == args.count else {
|
60
|
-
// fail("Expected \(expectedNumberOfArguments) arguments. Got: \(args). \n\nUsage: \(usage)")
|
61
|
-
// }
|
62
|
-
// run(arguments: args)
|
63
|
-
// }
|
64
|
-
|
65
|
-
// func createArguments() -> [String] {
|
66
|
-
// let args = Process.arguments
|
67
|
-
// guard args.count > 1 else {
|
68
|
-
// return []
|
69
|
-
// }
|
70
|
-
// return Array(args[1 ..< args.count])
|
71
|
-
// }
|
72
|
-
// }
|
73
|
-
|
74
|
-
// enum TerminalColor: String {
|
75
|
-
// case Red = "\u{001B}[0;31m"
|
76
|
-
// case Yellow = "\u{001B}[0;33m"
|
77
|
-
// case Green = "\u{001B}[0;32m"
|
78
|
-
// case Default = "\u{001B}[0m"
|
79
|
-
// }
|
80
|
-
|
81
|
-
// func +(lhs: TerminalColor, rhs: String) -> String {
|
82
|
-
// return lhs.rawValue + rhs
|
83
|
-
// }
|
84
|
-
|
85
|
-
// func +(lhs: String, rhs: TerminalColor) -> String {
|
86
|
-
// return lhs + rhs.rawValue
|
87
|
-
// }
|
data/XCFit/Classes/CopyDir.swift
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
// import Foundation
|
2
|
-
|
3
|
-
// struct CopyDir: Script {
|
4
|
-
|
5
|
-
// var usage: String {
|
6
|
-
// return "Usage: swift CopyDir.swift <DIR1> <DIR2>"
|
7
|
-
// }
|
8
|
-
|
9
|
-
// var expectedNumberOfArguments = 2
|
10
|
-
|
11
|
-
// func run(arguments arguments: [String]) {
|
12
|
-
// let dir1 = arguments[0]
|
13
|
-
// let dir2 = arguments[1]
|
14
|
-
// }
|
15
|
-
|
16
|
-
// func copyDir(dir1: String, dir2: String) {
|
17
|
-
// let sourcePath = "XCFit_Template/"
|
18
|
-
// let destinationPath = "~/Library/Developer/Xcode/Templates/"
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
// shell(launchPath: "/bin/cp", arguments: ["-rf", sourcePath, destinationPath)
|
23
|
-
// }
|
24
|
-
// }
|
25
|
-
|
26
|
-
// CopyDir().run()
|
@@ -1,400 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// CCIBlockDefinitions.h
|
3
|
-
// Pods
|
4
|
-
//
|
5
|
-
// Created by Ahmed Ali on 23/01/16.
|
6
|
-
//
|
7
|
-
//
|
8
|
-
|
9
|
-
#import <Foundation/Foundation.h>
|
10
|
-
@class CCIScenarioDefinition;
|
11
|
-
|
12
|
-
extern const NSString * kDataTableKey;
|
13
|
-
extern const NSString * kDocStringKey;
|
14
|
-
extern const NSString * kXCTestCaseKey;
|
15
|
-
|
16
|
-
#pragma mark - Block types
|
17
|
-
/**
|
18
|
-
You pass this block when ever you define an implementation for a step.
|
19
|
-
|
20
|
-
@param args strings array which corresponds to your regular express capturing groups.
|
21
|
-
@param userInfo is a dictionary that currently can have one of two keys kDataTableKey or kDocStringKey. If your step definition is expected to match a data table or a doc string, then you can expect this user info dictionary to contain kDataTableKey or kDocStringKey key respectively. Moreover, it will contain the key kXCTestCaseKey which will hold reference to the XCTestCase that currently executing this step. The value of kXCTestCaseKey will be nil if the step is being executed by a call of "step" or "SStep" C functions and you did not pass a reference to the XCTestCase.
|
22
|
-
*/
|
23
|
-
typedef void(^CCIStepBody)(NSArray <NSString *>* args, NSDictionary * userInfo);
|
24
|
-
|
25
|
-
/**
|
26
|
-
This block is passed to all the hocks (except around hock).
|
27
|
-
@param scenario the scenario the current scenario
|
28
|
-
*/
|
29
|
-
typedef void (^CCIScenarioHockBlock)(CCIScenarioDefinition * scenario);
|
30
|
-
|
31
|
-
/**
|
32
|
-
This block is passed to around hocks.
|
33
|
-
@param scenario the scenario the current scenario.
|
34
|
-
@param scenarioExectionBlock the block that will execute the scenario. If you did not call it, the scenario will never bee executed.
|
35
|
-
*/
|
36
|
-
typedef void (^CCIScenarioExecutionHockBlock)(CCIScenarioDefinition * scenario, void (^scenarioExectionBlock)(void) );
|
37
|
-
|
38
|
-
|
39
|
-
#pragma mark - Step definitions and prepositions
|
40
|
-
|
41
|
-
@class CCIStep;
|
42
|
-
@class CCIStepDefinition;
|
43
|
-
|
44
|
-
/**
|
45
|
-
Defines a Given implementations.
|
46
|
-
|
47
|
-
@code
|
48
|
-
Given(@"the app is running" , ^void(NSArray *args, id userInfo) {
|
49
|
-
//Your step implementation goes here
|
50
|
-
//The definition string in this case will match only the following step
|
51
|
-
//Given the app is running
|
52
|
-
});
|
53
|
-
@endcode
|
54
|
-
|
55
|
-
@Note
|
56
|
-
Step definitions are checked in a "Last In First Out" order. If it happens that there are more than one definition matches a step, the last registered definition will be used.
|
57
|
-
|
58
|
-
@param definitionString the regular expression that will checked against each Given step line.
|
59
|
-
@param body the code block that will be executed if match is occured.
|
60
|
-
*/
|
61
|
-
OBJC_EXTERN void Given(NSString * definitionString, CCIStepBody body);
|
62
|
-
|
63
|
-
/**
|
64
|
-
Defines a When step implementations.
|
65
|
-
|
66
|
-
@b Example:
|
67
|
-
@code
|
68
|
-
When(@"^I tap (?:the )?\"([^\\\"]*)\" (?:button|view|label)$" , ^void(NSArray *args, id userInfo) {
|
69
|
-
//Step implementation goes here
|
70
|
-
//The definition string in this case can match all the following steps
|
71
|
-
//When I tap the "MyButton" button
|
72
|
-
//When I tap "MyButton" button
|
73
|
-
//When I tap "Header" view
|
74
|
-
//When I tap "FAQ" label
|
75
|
-
});
|
76
|
-
@endcode
|
77
|
-
|
78
|
-
@Note
|
79
|
-
Step definitions are checked in a "Last In First Out" order. If it happens that there are more than one definition matches a step, the last registered definition will be used.
|
80
|
-
|
81
|
-
@param definitionString the regular expression that will checked against each Given step line.
|
82
|
-
@param body the code block that will be executed if match is occured.
|
83
|
-
*/
|
84
|
-
OBJC_EXTERN void When(NSString * definitionString, CCIStepBody body);
|
85
|
-
|
86
|
-
/**
|
87
|
-
Defines a Then step implementations.
|
88
|
-
|
89
|
-
@b Example:
|
90
|
-
@code
|
91
|
-
Then(@"^I should see \"([^\\\"]*)\" in (?:the )?\"([^\\\"]*)\" (?:button|view|label)$" , ^void(NSArray *args, id userInfo) {
|
92
|
-
//Step implementation goes here
|
93
|
-
//The definition string in this case can match all the following steps
|
94
|
-
//Then I should see "Button Title" in "MyButton" button
|
95
|
-
//Then I should see "Button Title" in the "MyButton" Button
|
96
|
-
//Then I should see "The Screen Title" in "Header" view
|
97
|
-
//Then I should see "FAQ" in "FAQ" label
|
98
|
-
});
|
99
|
-
@endcode
|
100
|
-
|
101
|
-
@Note
|
102
|
-
Step definitions are checked in a "Last In First Out" order. If it happens that there are more than one definition matches a step, the last registered definition will be used.
|
103
|
-
|
104
|
-
@param definitionString the regular expression that will checked against each Given step line.
|
105
|
-
@param body the code block that will be executed if match is occured.
|
106
|
-
*/
|
107
|
-
OBJC_EXTERN void Then(NSString * definitionString, CCIStepBody body);
|
108
|
-
|
109
|
-
/**
|
110
|
-
Defines an And step implementations.
|
111
|
-
|
112
|
-
@b Example:
|
113
|
-
@code
|
114
|
-
And(@"^I should see \"([^\\\"]*)\" in (?:the )?\"([^\\\"]*)\" (?:button|view|label)$" , ^void(NSArray *args, id userInfo) {
|
115
|
-
//Step implementation goes here
|
116
|
-
//The definition string in this case can match all the following steps
|
117
|
-
//And I should see "Button Title" in "MyButton" button
|
118
|
-
//And I should see "Button Title" in the "MyButton" Button
|
119
|
-
//And I should see "The Screen Title" in "Header" view
|
120
|
-
//And I should see "FAQ" in "FAQ" label
|
121
|
-
});
|
122
|
-
@endcode
|
123
|
-
|
124
|
-
@Note
|
125
|
-
Step definitions are checked in a "Last In First Out" order. If it happens that there are more than one definition matches a step, the last registered definition will be used.
|
126
|
-
|
127
|
-
@param definitionString the regular expression that will checked against each Given step line.
|
128
|
-
@param body the code block that will be executed if match is occured.
|
129
|
-
*/
|
130
|
-
OBJC_EXTERN void And(NSString * definitionString, CCIStepBody body);
|
131
|
-
|
132
|
-
/**
|
133
|
-
Defines a But step implementations.
|
134
|
-
|
135
|
-
@code
|
136
|
-
But(@"^I should see \"([^\\\"]*)\" in (?:the )?\"([^\\\"]*)\" (?:button|view|label)$" , ^void(NSArray *args, id userInfo) {
|
137
|
-
//Step implementation goes here
|
138
|
-
//The definition string in this case can match all the following steps
|
139
|
-
//But I should see "Button Title" in "MyButton" button
|
140
|
-
//But I should see "Button Title" in the "MyButton" Button
|
141
|
-
//But I should see "The Screen Title" in "Header" view
|
142
|
-
//But I should see "FAQ" in "FAQ" label
|
143
|
-
});
|
144
|
-
@endcode
|
145
|
-
|
146
|
-
@Note
|
147
|
-
Step definitions are checked in a "Last In First Out" order. If it happens that there are more than one definition matches a step, the last registered definition will be used.
|
148
|
-
|
149
|
-
@param definitionString the regular expression that will checked against each Given step line.
|
150
|
-
@param body the code block that will be executed if match is occured.
|
151
|
-
*/
|
152
|
-
OBJC_EXTERN void But(NSString * definitionString, CCIStepBody body);
|
153
|
-
|
154
|
-
/**
|
155
|
-
Defines a step implementations that will be registered with When, Then, And, and But.
|
156
|
-
The implementation of this function simply calls:
|
157
|
-
@code
|
158
|
-
When(definitionString, body);
|
159
|
-
Then(definitionString, body);
|
160
|
-
And(definitionString, body);
|
161
|
-
But(definitionString, body);
|
162
|
-
@endcode
|
163
|
-
Which concluds that the registered definitions will be checked with any of these four prepositions.
|
164
|
-
|
165
|
-
@b Example:
|
166
|
-
@code
|
167
|
-
MatchAll(@"^I should see \"([^\\\"]*)\" in (?:the )?\"([^\\\"]*)\" (?:button|view|label)$" , ^void(NSArray *args, id userInfo) {
|
168
|
-
//Step implementation goes here
|
169
|
-
//The definition string in this case can match all the following steps
|
170
|
-
//When I should see "Button Title" in "MyButton" button
|
171
|
-
//Then I should see "Button Title" in "MyButton" button
|
172
|
-
//And I should see "Button Title" in "MyButton" button
|
173
|
-
//But I should see "Button Title" in "MyButton" button
|
174
|
-
});
|
175
|
-
@endcode
|
176
|
-
|
177
|
-
@Note
|
178
|
-
Step definitions are checked in a "Last In First Out" order. If it happens that there are more than one definition matches a step, the last registered definition will be used.
|
179
|
-
|
180
|
-
@param definitionString the regular expression that will checked against each Given step line.
|
181
|
-
@param body the code block that will be executed if match is occured.
|
182
|
-
*/
|
183
|
-
OBJC_EXTERN void MatchAll(NSString * definitionString, CCIStepBody body);
|
184
|
-
|
185
|
-
/**
|
186
|
-
Defines a step implementations that will be registered with specified prepositions.
|
187
|
-
|
188
|
-
@b Example:
|
189
|
-
@code
|
190
|
-
Match(@[@"When", @"And", @"Then"], @"^I should see \"([^\\\"]*)\" in (?:the )?\"([^\\\"]*)\" (?:button|view|label)$" , ^void(NSArray *args, id userInfo) {
|
191
|
-
//Step implementation goes here
|
192
|
-
//The definition string in this case can match all the following steps
|
193
|
-
//When I should see "Button Title" in "MyButton" button
|
194
|
-
//And I should see "Button Title" in "MyButton" button
|
195
|
-
//Then I should see "Button Title" in "MyButton" button
|
196
|
-
});
|
197
|
-
@endcode
|
198
|
-
|
199
|
-
@Note
|
200
|
-
Step definitions are checked in a "Last In First Out" order. If it happens that there are more than one definition matches a step, the last registered definition will be used.
|
201
|
-
|
202
|
-
@param prepositions array of strings to be used as the preposition of the step definiton
|
203
|
-
@param definitionString the regular expression that will checked against each Given step line.
|
204
|
-
@param body the code block that will be executed if match is occured.
|
205
|
-
*/
|
206
|
-
OBJC_EXTERN void Match(NSArray *prepositions, NSString * definitionString, CCIStepBody body);
|
207
|
-
|
208
|
-
/**
|
209
|
-
Step implementation can be also a useable code.
|
210
|
-
If it the case that you want to call a previously defined step implementation, you can call this definition using this special step function.
|
211
|
-
|
212
|
-
@Note
|
213
|
-
Using this function, you do not need to worry about the preposition of the step; you just pass in the step line without defining the preposition.
|
214
|
-
|
215
|
-
@b Example:
|
216
|
-
@code
|
217
|
-
//The first step definiton
|
218
|
-
Match(@[@"When", @"And", @"Then"], @"^I should see \"([^\\\"]*)\" in (?:the )?\"([^\\\"]*)\" (?:button|view|label)$" , ^void(NSArray *args, id userInfo) {
|
219
|
-
//Step implementation goes here
|
220
|
-
});
|
221
|
-
|
222
|
-
//The another step definiton that will make use of the previousely defined step
|
223
|
-
When(@"^I write \"([^\\\"]*)\" (?:in|into) \"([^\\\"]*)\" field$" , ^void(NSArray *args, id userInfo) {
|
224
|
-
//Step implementation goes here
|
225
|
-
//Here you can call the previously defined step.
|
226
|
-
step(@"I should see \"%@\" in the \"%@\" label", args[0], args[1]);
|
227
|
-
});
|
228
|
-
@endcode
|
229
|
-
|
230
|
-
@param testCase the test case that will execute this step. Can be nil.
|
231
|
-
@param stepLine the step line string to be executed
|
232
|
-
*/
|
233
|
-
OBJC_EXPORT void step(id testCase, NSString * stepLine, ...);
|
234
|
-
|
235
|
-
/**
|
236
|
-
Swift alias for step(stepLine) function.
|
237
|
-
@param testCase the test case that will execute this step. Can be nil.
|
238
|
-
@param stepLine the step line string to be executed
|
239
|
-
*/
|
240
|
-
OBJC_EXTERN void SStep(id testCase, NSString * stepLine);
|
241
|
-
|
242
|
-
|
243
|
-
#pragma mark - Hocks
|
244
|
-
/**
|
245
|
-
C function that registers a code block to be called only once before executing any test case.
|
246
|
-
You can call this function as much as you want, but only the last registerd code block will be used.
|
247
|
-
|
248
|
-
@Note
|
249
|
-
This function should not be called after calling @a beginExecution.
|
250
|
-
|
251
|
-
@param beforeStartBlock code block that will be executed once before any test cases.
|
252
|
-
*/
|
253
|
-
OBJC_EXTERN void beforeStart(void(^beforeStartBlock)(void));
|
254
|
-
|
255
|
-
|
256
|
-
/**
|
257
|
-
C function that registers a code block to be called only once after executing all test cases.
|
258
|
-
You can call this function as much as you want, but only the last registerd code block will be used.
|
259
|
-
|
260
|
-
@Note
|
261
|
-
This function should not be called after calling @a beginExecution.
|
262
|
-
|
263
|
-
@param afterFinishBlock code block that will be executed once after all test cases finish execution.
|
264
|
-
*/
|
265
|
-
OBJC_EXTERN void afterFinish(void(^afterFinishBlock)(void));
|
266
|
-
|
267
|
-
|
268
|
-
/**
|
269
|
-
C function that registers a code block to be called before each scenario.
|
270
|
-
Code blocks registerd with this function will run before each scenario in the same order they were orignally registered; that's it, FIFO (First In First Out).
|
271
|
-
|
272
|
-
@Note
|
273
|
-
This function should not be called after calling @a beginExecution.
|
274
|
-
|
275
|
-
@param beforeEachBlock code block that will be executed before executing the scenario, this block receives an instance of the scenario that will be executed.
|
276
|
-
*/
|
277
|
-
OBJC_EXTERN void before(CCIScenarioHockBlock beforeEachBlock);
|
278
|
-
|
279
|
-
|
280
|
-
/**
|
281
|
-
C function that registers a code block to be called after each scenario.
|
282
|
-
Code blocks registerd with this function will run after each scenario in reversed order compared to the order they were orignally registered; that's it, LIFO (Last In First Out)
|
283
|
-
|
284
|
-
@Note
|
285
|
-
All code blocks registerd with this function, will run regardless the scenario has been passed or not
|
286
|
-
|
287
|
-
@Note
|
288
|
-
This function should not be called after calling @a beginExecution.
|
289
|
-
|
290
|
-
@param afterEachBlock code block that will be executed after executing the scenario, this block receives an instance of the scenario that has been executed.
|
291
|
-
*/
|
292
|
-
OBJC_EXTERN void after(CCIScenarioHockBlock afterEachBlock);
|
293
|
-
|
294
|
-
|
295
|
-
/**
|
296
|
-
C function that registers a code block to be called before each scenario that has one or more tag that matches one or more tags passed to this function.
|
297
|
-
Code blocks registerd with this function will run before each matching scenario in the same order they were orignally registered; that's it, FIFO (First In First Out)
|
298
|
-
|
299
|
-
@Note
|
300
|
-
Do not prefix any tag you pass with @ symbol
|
301
|
-
|
302
|
-
@Note
|
303
|
-
This function should not be called after calling @a beginExecution.
|
304
|
-
|
305
|
-
@param tags array of strings that will be used to match specific scenarios
|
306
|
-
@param beforeTaggedBlock code block that will be executed before executing the scenario, this block receives an instance of the scenario that will be executed.
|
307
|
-
*/
|
308
|
-
OBJC_EXTERN void beforeTagged(NSArray * tags, CCIScenarioHockBlock beforeTaggedBlock);
|
309
|
-
|
310
|
-
|
311
|
-
/**
|
312
|
-
C function that registers a code block to be called after each scenario that has one or more tag that matches one or more tags passed to this function.
|
313
|
-
Code blocks registerd with this function will run after each matching scenario in reversed order compared to the order they were orignally registered; that's it, LIFO (Last In First Out)
|
314
|
-
|
315
|
-
@Note
|
316
|
-
This function should not be called after calling @a beginExecution.
|
317
|
-
|
318
|
-
@Note
|
319
|
-
All code blocks registerd with this function, will run regardless the matching scenario has been passed or not
|
320
|
-
|
321
|
-
@Note
|
322
|
-
Do not prefix any tag you pass with @ symbol
|
323
|
-
|
324
|
-
@param tags array of strings that will be used to match specific scenarios
|
325
|
-
@param afterTaggedBlock code block that will be executed after executing the scenario, this block receives an instance of the scenario that has been executed.
|
326
|
-
*/
|
327
|
-
OBJC_EXTERN void afterTagged(NSArray * tags, CCIScenarioHockBlock afterTaggedBlock);
|
328
|
-
|
329
|
-
|
330
|
-
/**
|
331
|
-
C function that registers a code block to be used to call the scenario execution block.
|
332
|
-
Code blocks registerd with this function will receive two parameters: scenario instance and scenario execution block as a parameter.
|
333
|
-
|
334
|
-
If more than one code block matches the scenario, you are still required to call the scenario execution from each registered code block. However, your scenario will be executed once as it is supposed to be.
|
335
|
-
|
336
|
-
Matching against around blocks happens in FIFO (First In First Out) order; in case more than one block has matched the same scenario, then they are nested.
|
337
|
-
|
338
|
-
@Note
|
339
|
-
Failing to call the scenario execution block, will prevent the scenario from being executed.
|
340
|
-
|
341
|
-
@b Example of more than one match
|
342
|
-
|
343
|
-
There are three registerd blocks with tags that matches the same scenario, the followin nesting calls will happen:
|
344
|
-
|
345
|
-
@code
|
346
|
-
Third Around Match
|
347
|
-
Block = contains code block that executes the Second Around Match
|
348
|
-
Second Around Match
|
349
|
-
Block = contains code block that executes the First Around Match
|
350
|
-
First Around Match
|
351
|
-
Block = A call Scenario Exection Block@endcode
|
352
|
-
|
353
|
-
|
354
|
-
@Note
|
355
|
-
Do not prefix any tag you pass with @@ symbol
|
356
|
-
|
357
|
-
@Note
|
358
|
-
This function should not be called after calling @a beginExecution.
|
359
|
-
|
360
|
-
|
361
|
-
@param tags array of strings that will be used to match specific scenarios
|
362
|
-
@param aroundScenarioBlock code block that will be executed for each scneario, this block receives an instance of the scenario and the scenario execution block.
|
363
|
-
*/
|
364
|
-
OBJC_EXTERN void around(NSArray * tags, CCIScenarioExecutionHockBlock aroundScenarioBlock);
|
365
|
-
|
366
|
-
#pragma mark - Assertion and Errors
|
367
|
-
/**
|
368
|
-
Boolean assertion function. Use it where you usually use NSAssert or assert.
|
369
|
-
|
370
|
-
Using this assertion function in your step implementations, guarantees proper error reporting
|
371
|
-
|
372
|
-
@param expression boolean expression
|
373
|
-
@param failureMessage formatted a string describe what went wrong in case expression is evaluated to false
|
374
|
-
*/
|
375
|
-
OBJC_EXTERN void CCIAssert(BOOL expression, NSString * failureMessage, ...);
|
376
|
-
|
377
|
-
/**
|
378
|
-
Swift alias for CCIAssert
|
379
|
-
@param expression boolean expression
|
380
|
-
@param failureMessage a string describe what went wrong in case expression is evaluated to false
|
381
|
-
*/
|
382
|
-
OBJC_EXTERN void CCISAssert(BOOL expression, NSString * failureMessage);
|
383
|
-
|
384
|
-
|
385
|
-
/**
|
386
|
-
Throws an exception with the specified reason.
|
387
|
-
Cucumberish will handle this exception and show it as an issue with executing the current step
|
388
|
-
|
389
|
-
@param reason the failure reason
|
390
|
-
*/
|
391
|
-
|
392
|
-
OBJC_EXTERN void throwCucumberishException(NSString *reason, ...);
|
393
|
-
|
394
|
-
|
395
|
-
/**
|
396
|
-
Swift alias for throwCucumberishException;
|
397
|
-
@param reason the failure reason
|
398
|
-
*/
|
399
|
-
OBJC_EXTERN void SThrowCucumberishException(NSString *reason);
|
400
|
-
|