├── Cartfile ├── Carthage ├── Build │ ├── Mac │ │ ├── Quick.framework │ │ │ ├── Versions │ │ │ │ ├── Current │ │ │ │ └── A │ │ │ │ │ ├── Quick │ │ │ │ │ ├── Modules │ │ │ │ │ ├── Quick.swiftmodule │ │ │ │ │ │ ├── x86_64.swiftdoc │ │ │ │ │ │ └── x86_64.swiftmodule │ │ │ │ │ └── module.modulemap │ │ │ │ │ ├── Headers │ │ │ │ │ ├── Quick.h │ │ │ │ │ └── QuickConfiguration.h │ │ │ │ │ └── Resources │ │ │ │ │ └── Info.plist │ │ │ ├── Quick │ │ │ ├── Headers │ │ │ ├── Modules │ │ │ └── Resources │ │ └── Nimble.framework │ │ │ ├── Nimble │ │ │ ├── Info.plist │ │ │ ├── Modules │ │ │ ├── Nimble.swiftmodule │ │ │ │ ├── x86_64.swiftdoc │ │ │ │ └── x86_64.swiftmodule │ │ │ └── module.modulemap │ │ │ └── Headers │ │ │ ├── Nimble.h │ │ │ └── NMBExceptionCapture.h │ └── iOS │ │ ├── Quick.framework │ │ ├── Quick │ │ ├── Info.plist │ │ ├── Modules │ │ │ ├── Quick.swiftmodule │ │ │ │ ├── arm.swiftdoc │ │ │ │ ├── arm64.swiftdoc │ │ │ │ ├── i386.swiftdoc │ │ │ │ ├── arm.swiftmodule │ │ │ │ ├── i386.swiftmodule │ │ │ │ ├── x86_64.swiftdoc │ │ │ │ ├── arm64.swiftmodule │ │ │ │ └── x86_64.swiftmodule │ │ │ └── module.modulemap │ │ └── Headers │ │ │ ├── Quick.h │ │ │ └── QuickConfiguration.h │ │ └── Nimble.framework │ │ ├── Nimble │ │ ├── Info.plist │ │ ├── Modules │ │ ├── Nimble.swiftmodule │ │ │ ├── arm.swiftdoc │ │ │ ├── arm64.swiftdoc │ │ │ ├── i386.swiftdoc │ │ │ ├── arm.swiftmodule │ │ │ ├── arm64.swiftmodule │ │ │ ├── i386.swiftmodule │ │ │ ├── x86_64.swiftdoc │ │ │ └── x86_64.swiftmodule │ │ └── module.modulemap │ │ └── Headers │ │ ├── Nimble.h │ │ └── NMBExceptionCapture.h └── Checkouts │ ├── Quick │ ├── QuickTests │ │ ├── Helpers │ │ │ ├── QuickTestsBridgingHeader.h │ │ │ ├── QCKSpecRunner.h │ │ │ ├── XCTestObservationCenter+QCKSuspendObservation.h │ │ │ └── QCKSpecRunner.m │ │ ├── QuickConfigurationTests.m │ │ ├── FunctionalTests │ │ │ ├── Configuration │ │ │ │ ├── AfterEach │ │ │ │ │ ├── Configuration+AfterEach.swift │ │ │ │ │ └── Configuration+AfterEachTests.swift │ │ │ │ └── BeforeEach │ │ │ │ │ ├── Configuration+BeforeEach.swift │ │ │ │ │ └── Configuration+BeforeEachTests.swift │ │ │ ├── ItTests.swift │ │ │ ├── ItTests+ObjC.m │ │ │ ├── BeforeSuiteTests.swift │ │ │ ├── SharedExamplesTests.swift │ │ │ ├── BeforeSuiteTests+ObjC.m │ │ │ ├── AfterSuiteTests.swift │ │ │ ├── AfterSuiteTests+ObjC.m │ │ │ ├── FailureTests+ObjC.m │ │ │ ├── FailureUsingXCTAssertTests+ObjC.m │ │ │ └── SharedExamples+BeforeEachTests.swift │ │ ├── Info.plist │ │ └── Fixtures │ │ │ └── FunctionalTests_SharedExamplesTests_SharedExamples.swift │ ├── .gitmodules │ ├── .travis.yml │ ├── Externals │ │ └── Nimble │ │ │ ├── NimbleTests │ │ │ ├── objc │ │ │ │ ├── NimbleTests-Bridging-Header.h │ │ │ │ ├── Nimble-OSXTests-Bridging-Header.h │ │ │ │ ├── ObjCSyncTest.m │ │ │ │ ├── ObjCBeNilTest.m │ │ │ │ ├── ObjCBeFalseTest.m │ │ │ │ ├── ObjCBeTrueTest.m │ │ │ │ ├── NimbleSpecHelper.h │ │ │ │ ├── ObjCBeFalsyTest.m │ │ │ │ ├── ObjCBeTruthyTest.m │ │ │ │ ├── ObjCBeLessThanTest.m │ │ │ │ ├── ObjCEqualTest.m │ │ │ │ ├── ObjCBeGreaterThanTest.m │ │ │ │ ├── ObjCMatchTest.m │ │ │ │ ├── ObjCBeLessThanOrEqualToTest.m │ │ │ │ ├── ObjCBeginWithTest.m │ │ │ │ ├── ObjCBeKindOfTest.m │ │ │ │ ├── ObjCBeGreaterThanOrEqualToTest.m │ │ │ │ ├── ObjCEndWithTest.m │ │ │ │ ├── ObjCBeCloseToTest.m │ │ │ │ ├── ObjCBeAnInstanceOfTest.m │ │ │ │ ├── ObjCBeIdenticalToTest.m │ │ │ │ ├── ObjCAsyncTest.m │ │ │ │ └── ObjCAllPassTest.m │ │ │ ├── Helpers │ │ │ │ └── ObjectWithLazyProperty.swift │ │ │ ├── Matchers │ │ │ │ ├── BeNilTest.swift │ │ │ │ ├── MatchTest.swift │ │ │ │ ├── BeGreaterThanTest.swift │ │ │ │ ├── BeLessThanTest.swift │ │ │ │ ├── BeIdenticalToTest.swift │ │ │ │ ├── EndWithTest.swift │ │ │ │ ├── HaveCountTest.swift │ │ │ │ ├── BeLessThanOrEqualToTest.swift │ │ │ │ ├── BeginWithTest.swift │ │ │ │ └── BeGreaterThanOrEqualToTest.swift │ │ │ └── Info.plist │ │ │ ├── circle.yml │ │ │ ├── Nimble │ │ │ ├── Nimble.h │ │ │ ├── Utils │ │ │ │ ├── Functional.swift │ │ │ │ ├── SourceLocation.swift │ │ │ │ └── Stringers.swift │ │ │ ├── objc │ │ │ │ ├── NMBExceptionCapture.h │ │ │ │ └── NMBExceptionCapture.m │ │ │ ├── Matchers │ │ │ │ ├── BeNil.swift │ │ │ │ ├── Match.swift │ │ │ │ ├── BeIdenticalTo.swift │ │ │ │ ├── BeLessThan.swift │ │ │ │ ├── BeAKindOf.swift │ │ │ │ ├── BeAnInstanceOf.swift │ │ │ │ ├── BeGreaterThan.swift │ │ │ │ ├── BeLessThanOrEqual.swift │ │ │ │ └── BeGreaterThanOrEqualTo.swift │ │ │ ├── Adapters │ │ │ │ ├── AssertionDispatcher.swift │ │ │ │ ├── AdapterProtocols.swift │ │ │ │ └── NimbleXCTestHandler.swift │ │ │ ├── Info.plist │ │ │ └── DSL.swift │ │ │ ├── .travis.yml │ │ │ ├── Nimble.xcodeproj │ │ │ └── project.xcworkspace │ │ │ │ └── contents.xcworkspacedata │ │ │ ├── .gitignore │ │ │ └── Nimble.podspec │ ├── Quick Templates │ │ ├── Quick Configuration Class.xctemplate │ │ │ ├── Objective-C │ │ │ │ ├── ___FILEBASENAME___.h │ │ │ │ └── ___FILEBASENAME___.m │ │ │ ├── TemplateIcon.icns │ │ │ └── Swift │ │ │ │ └── ___FILEBASENAME___.swift │ │ └── Quick Spec Class.xctemplate │ │ │ ├── TemplateIcon.icns │ │ │ ├── Objective-C │ │ │ └── ___FILEBASENAME___.m │ │ │ └── Swift │ │ │ └── ___FILEBASENAME___.swift │ ├── Quick.xcodeproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ ├── Quick.xcworkspace │ │ └── contents.xcworkspacedata │ ├── Quick │ │ ├── Quick.h │ │ ├── NSString+QCKSelectorName.h │ │ ├── ExampleMetadata.swift │ │ ├── World.h │ │ ├── Callsite.swift │ │ ├── Hooks │ │ │ ├── SuiteHooks.swift │ │ │ ├── Closures.swift │ │ │ └── ExampleHooks.swift │ │ ├── Info.plist │ │ ├── Filter.swift │ │ ├── Configuration │ │ │ └── QuickConfiguration.h │ │ └── NSString+QCKSelectorName.m │ ├── circle.yml │ ├── Documentation │ │ ├── InstallingFileTemplates.md │ │ ├── MoreResources.md │ │ └── QuickInObjectiveC.md │ ├── QuickFocusedTests │ │ ├── Info.plist │ │ └── FocusedTests.swift │ ├── .gitignore │ ├── Quick.podspec │ └── Rakefile │ └── Nimble │ ├── NimbleTests │ ├── objc │ │ ├── NimbleTests-Bridging-Header.h │ │ ├── Nimble-OSXTests-Bridging-Header.h │ │ ├── ObjCSyncTest.m │ │ ├── ObjCBeNilTest.m │ │ ├── ObjCBeFalseTest.m │ │ ├── ObjCBeTrueTest.m │ │ ├── NimbleSpecHelper.h │ │ ├── ObjCBeFalsyTest.m │ │ ├── ObjCBeTruthyTest.m │ │ ├── ObjCBeLessThanTest.m │ │ ├── ObjCEqualTest.m │ │ ├── ObjCBeGreaterThanTest.m │ │ ├── ObjCMatchTest.m │ │ ├── ObjCBeLessThanOrEqualToTest.m │ │ ├── ObjCBeginWithTest.m │ │ ├── ObjCBeKindOfTest.m │ │ ├── ObjCBeGreaterThanOrEqualToTest.m │ │ ├── ObjCEndWithTest.m │ │ ├── ObjCBeCloseToTest.m │ │ ├── ObjCBeAnInstanceOfTest.m │ │ ├── ObjCBeIdenticalToTest.m │ │ ├── ObjCAsyncTest.m │ │ └── ObjCAllPassTest.m │ ├── Helpers │ │ └── ObjectWithLazyProperty.swift │ ├── Matchers │ │ ├── BeNilTest.swift │ │ ├── MatchTest.swift │ │ ├── BeGreaterThanTest.swift │ │ ├── BeLessThanTest.swift │ │ ├── BeIdenticalToTest.swift │ │ ├── EndWithTest.swift │ │ ├── HaveCountTest.swift │ │ ├── BeLessThanOrEqualToTest.swift │ │ ├── BeginWithTest.swift │ │ └── BeGreaterThanOrEqualToTest.swift │ └── Info.plist │ ├── circle.yml │ ├── Nimble │ ├── Nimble.h │ ├── Utils │ │ ├── Functional.swift │ │ ├── SourceLocation.swift │ │ └── Stringers.swift │ ├── objc │ │ ├── NMBExceptionCapture.h │ │ └── NMBExceptionCapture.m │ ├── Matchers │ │ ├── BeNil.swift │ │ ├── Match.swift │ │ ├── BeIdenticalTo.swift │ │ ├── BeLessThan.swift │ │ ├── BeAKindOf.swift │ │ ├── BeAnInstanceOf.swift │ │ ├── BeGreaterThan.swift │ │ ├── BeLessThanOrEqual.swift │ │ └── BeGreaterThanOrEqualTo.swift │ ├── Adapters │ │ ├── AssertionDispatcher.swift │ │ ├── AdapterProtocols.swift │ │ └── NimbleXCTestHandler.swift │ ├── Info.plist │ └── DSL.swift │ ├── .travis.yml │ ├── Nimble.xcodeproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── Nimble.xccheckout │ ├── .gitignore │ └── Nimble.podspec ├── Cartfile.private ├── Cartfile.resolved ├── Gemfile ├── docs └── attributed-string.png ├── TributeTests ├── Resources │ ├── swift.png │ └── swift@2x.png └── Info.plist ├── Tribute.playground ├── Resources │ └── swift@2x.png ├── contents.xcplayground └── timeline.xctimeline ├── Tribute.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcuserdata │ └── zats.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── .travis.yml ├── Tribute.podspec ├── Tribute ├── Tribute.h └── Info.plist ├── fastlane └── Appfile └── LICENSE.md /Cartfile: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Carthage/Build/Mac/Quick.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /Carthage/Build/Mac/Quick.framework/Quick: -------------------------------------------------------------------------------- 1 | Versions/Current/Quick -------------------------------------------------------------------------------- /Carthage/Build/Mac/Quick.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /Carthage/Build/Mac/Quick.framework/Modules: -------------------------------------------------------------------------------- 1 | Versions/Current/Modules -------------------------------------------------------------------------------- /Carthage/Build/Mac/Quick.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /Cartfile.private: -------------------------------------------------------------------------------- 1 | github "Quick/Quick" ~> 0.8 2 | github "Quick/Nimble" ~> 3.0 -------------------------------------------------------------------------------- /Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "Quick/Nimble" "v3.0.0" 2 | github "Quick/Quick" "v0.8.0" 3 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | # A sample Gemfile 2 | source "https://rubygems.org" 3 | 4 | gem "fastlane" 5 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickTests/Helpers/QuickTestsBridgingHeader.h: -------------------------------------------------------------------------------- 1 | #import "QCKSpecRunner.h" 2 | -------------------------------------------------------------------------------- /docs/attributed-string.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/docs/attributed-string.png -------------------------------------------------------------------------------- /TributeTests/Resources/swift.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/TributeTests/Resources/swift.png -------------------------------------------------------------------------------- /TributeTests/Resources/swift@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/TributeTests/Resources/swift@2x.png -------------------------------------------------------------------------------- /Carthage/Build/iOS/Quick.framework/Quick: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/iOS/Quick.framework/Quick -------------------------------------------------------------------------------- /Carthage/Build/Mac/Nimble.framework/Nimble: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/Mac/Nimble.framework/Nimble -------------------------------------------------------------------------------- /Carthage/Build/iOS/Nimble.framework/Nimble: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/iOS/Nimble.framework/Nimble -------------------------------------------------------------------------------- /Tribute.playground/Resources/swift@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Tribute.playground/Resources/swift@2x.png -------------------------------------------------------------------------------- /Carthage/Build/iOS/Quick.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/iOS/Quick.framework/Info.plist -------------------------------------------------------------------------------- /Carthage/Build/Mac/Nimble.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/Mac/Nimble.framework/Info.plist -------------------------------------------------------------------------------- /Carthage/Build/iOS/Nimble.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/iOS/Nimble.framework/Info.plist -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Externals/Nimble"] 2 | path = Externals/Nimble 3 | url = https://github.com/Quick/Nimble.git 4 | -------------------------------------------------------------------------------- /Carthage/Build/Mac/Quick.framework/Versions/A/Quick: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/Mac/Quick.framework/Versions/A/Quick -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/.travis.yml: -------------------------------------------------------------------------------- 1 | osx_image: xcode7 2 | language: objective-c 3 | 4 | before_install: git submodule update --init --recursive 5 | script: "rake" 6 | 7 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/NimbleTests-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | -------------------------------------------------------------------------------- /Carthage/Build/iOS/Nimble.framework/Modules/Nimble.swiftmodule/arm.swiftdoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/iOS/Nimble.framework/Modules/Nimble.swiftmodule/arm.swiftdoc -------------------------------------------------------------------------------- /Carthage/Build/iOS/Quick.framework/Modules/Quick.swiftmodule/arm.swiftdoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/iOS/Quick.framework/Modules/Quick.swiftmodule/arm.swiftdoc -------------------------------------------------------------------------------- /Carthage/Build/iOS/Quick.framework/Modules/Quick.swiftmodule/arm64.swiftdoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/iOS/Quick.framework/Modules/Quick.swiftmodule/arm64.swiftdoc -------------------------------------------------------------------------------- /Carthage/Build/iOS/Quick.framework/Modules/Quick.swiftmodule/i386.swiftdoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/iOS/Quick.framework/Modules/Quick.swiftmodule/i386.swiftdoc -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/Nimble-OSXTests-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | -------------------------------------------------------------------------------- /Carthage/Build/iOS/Nimble.framework/Modules/Nimble.swiftmodule/arm64.swiftdoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/iOS/Nimble.framework/Modules/Nimble.swiftmodule/arm64.swiftdoc -------------------------------------------------------------------------------- /Carthage/Build/iOS/Nimble.framework/Modules/Nimble.swiftmodule/i386.swiftdoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/iOS/Nimble.framework/Modules/Nimble.swiftmodule/i386.swiftdoc -------------------------------------------------------------------------------- /Carthage/Build/iOS/Quick.framework/Modules/Quick.swiftmodule/arm.swiftmodule: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/iOS/Quick.framework/Modules/Quick.swiftmodule/arm.swiftmodule -------------------------------------------------------------------------------- /Carthage/Build/iOS/Quick.framework/Modules/Quick.swiftmodule/i386.swiftmodule: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/iOS/Quick.framework/Modules/Quick.swiftmodule/i386.swiftmodule -------------------------------------------------------------------------------- /Carthage/Build/iOS/Quick.framework/Modules/Quick.swiftmodule/x86_64.swiftdoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/iOS/Quick.framework/Modules/Quick.swiftmodule/x86_64.swiftdoc -------------------------------------------------------------------------------- /Carthage/Build/Mac/Nimble.framework/Modules/Nimble.swiftmodule/x86_64.swiftdoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/Mac/Nimble.framework/Modules/Nimble.swiftmodule/x86_64.swiftdoc -------------------------------------------------------------------------------- /Carthage/Build/iOS/Nimble.framework/Modules/Nimble.swiftmodule/arm.swiftmodule: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/iOS/Nimble.framework/Modules/Nimble.swiftmodule/arm.swiftmodule -------------------------------------------------------------------------------- /Carthage/Build/iOS/Nimble.framework/Modules/Nimble.swiftmodule/arm64.swiftmodule: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/iOS/Nimble.framework/Modules/Nimble.swiftmodule/arm64.swiftmodule -------------------------------------------------------------------------------- /Carthage/Build/iOS/Nimble.framework/Modules/Nimble.swiftmodule/i386.swiftmodule: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/iOS/Nimble.framework/Modules/Nimble.swiftmodule/i386.swiftmodule -------------------------------------------------------------------------------- /Carthage/Build/iOS/Nimble.framework/Modules/Nimble.swiftmodule/x86_64.swiftdoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/iOS/Nimble.framework/Modules/Nimble.swiftmodule/x86_64.swiftdoc -------------------------------------------------------------------------------- /Carthage/Build/iOS/Quick.framework/Modules/Quick.swiftmodule/arm64.swiftmodule: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/iOS/Quick.framework/Modules/Quick.swiftmodule/arm64.swiftmodule -------------------------------------------------------------------------------- /Carthage/Build/iOS/Quick.framework/Modules/Quick.swiftmodule/x86_64.swiftmodule: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/iOS/Quick.framework/Modules/Quick.swiftmodule/x86_64.swiftmodule -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/NimbleTests-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | -------------------------------------------------------------------------------- /Carthage/Build/Mac/Nimble.framework/Modules/Nimble.swiftmodule/x86_64.swiftmodule: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/Mac/Nimble.framework/Modules/Nimble.swiftmodule/x86_64.swiftmodule -------------------------------------------------------------------------------- /Carthage/Build/iOS/Nimble.framework/Modules/Nimble.swiftmodule/x86_64.swiftmodule: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/iOS/Nimble.framework/Modules/Nimble.swiftmodule/x86_64.swiftmodule -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/Nimble-OSXTests-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | -------------------------------------------------------------------------------- /Tribute.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Carthage/Build/Mac/Quick.framework/Versions/A/Modules/Quick.swiftmodule/x86_64.swiftdoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/Mac/Quick.framework/Versions/A/Modules/Quick.swiftmodule/x86_64.swiftdoc -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Quick Templates/Quick Configuration Class.xctemplate/Objective-C/___FILEBASENAME___.h: -------------------------------------------------------------------------------- 1 | @import Quick; 2 | 3 | @interface ___FILEBASENAMEASIDENTIFIER___ : QuickConfiguration 4 | 5 | @end 6 | 7 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Quick Templates/Quick Spec Class.xctemplate/TemplateIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Checkouts/Quick/Quick Templates/Quick Spec Class.xctemplate/TemplateIcon.icns -------------------------------------------------------------------------------- /Carthage/Build/Mac/Quick.framework/Versions/A/Modules/Quick.swiftmodule/x86_64.swiftmodule: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Build/Mac/Quick.framework/Versions/A/Modules/Quick.swiftmodule/x86_64.swiftmodule -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/circle.yml: -------------------------------------------------------------------------------- 1 | machine: 2 | xcode: 3 | version: "7.0" 4 | 5 | test: 6 | override: 7 | - NIMBLE_RUNTIME_IOS_SDK_VERSION=9.0 ./test ios 8 | - NIMBLE_RUNTIME_OSX_SDK_VERSION=10.10 ./test osx 9 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Quick Templates/Quick Configuration Class.xctemplate/TemplateIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zats/Tribute/HEAD/Carthage/Checkouts/Quick/Quick Templates/Quick Configuration Class.xctemplate/TemplateIcon.icns -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Quick Templates/Quick Spec Class.xctemplate/Objective-C/___FILEBASENAME___.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | QuickSpecBegin(___FILEBASENAMEASIDENTIFIER___) 5 | 6 | QuickSpecEnd 7 | -------------------------------------------------------------------------------- /Tribute.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/circle.yml: -------------------------------------------------------------------------------- 1 | machine: 2 | xcode: 3 | version: "7.0" 4 | 5 | test: 6 | override: 7 | - NIMBLE_RUNTIME_IOS_SDK_VERSION=9.0 ./test ios 8 | - NIMBLE_RUNTIME_OSX_SDK_VERSION=10.10 ./test osx 9 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Quick Templates/Quick Spec Class.xctemplate/Swift/___FILEBASENAME___.swift: -------------------------------------------------------------------------------- 1 | import Quick 2 | import Nimble 3 | 4 | class ___FILEBASENAMEASIDENTIFIER___: QuickSpec { 5 | override func spec() { 6 | 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Carthage/Build/iOS/Quick.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module Quick { 2 | umbrella header "Quick.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | 8 | module Quick.Swift { 9 | header "Quick-Swift.h" 10 | } 11 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble/Nimble.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NMBExceptionCapture.h" 3 | #import "DSL.h" 4 | 5 | FOUNDATION_EXPORT double NimbleVersionNumber; 6 | FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; -------------------------------------------------------------------------------- /Carthage/Build/Mac/Nimble.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module Nimble { 2 | umbrella header "Nimble.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | 8 | module Nimble.Swift { 9 | header "Nimble-Swift.h" 10 | } 11 | -------------------------------------------------------------------------------- /Carthage/Build/iOS/Nimble.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module Nimble { 2 | umbrella header "Nimble.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | 8 | module Nimble.Swift { 9 | header "Nimble-Swift.h" 10 | } 11 | -------------------------------------------------------------------------------- /Carthage/Build/Mac/Nimble.framework/Headers/Nimble.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NMBExceptionCapture.h" 3 | #import "DSL.h" 4 | 5 | FOUNDATION_EXPORT double NimbleVersionNumber; 6 | FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; -------------------------------------------------------------------------------- /Carthage/Build/Mac/Quick.framework/Versions/A/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module Quick { 2 | umbrella header "Quick.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | 8 | module Quick.Swift { 9 | header "Quick-Swift.h" 10 | } 11 | -------------------------------------------------------------------------------- /Carthage/Build/iOS/Nimble.framework/Headers/Nimble.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NMBExceptionCapture.h" 3 | #import "DSL.h" 4 | 5 | FOUNDATION_EXPORT double NimbleVersionNumber; 6 | FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/.travis.yml: -------------------------------------------------------------------------------- 1 | osx_image: xcode7 2 | language: objective-c 3 | 4 | env: 5 | matrix: 6 | - NIMBLE_RUNTIME_IOS_SDK_VERSION=9.0 TYPE=ios 7 | - NIMBLE_RUNTIME_OSX_SDK_VERSION=10.10 TYPE=osx 8 | 9 | script: ./test $TYPE 10 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/Helpers/ObjectWithLazyProperty.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | class ObjectWithLazyProperty { 4 | init() {} 5 | lazy var value: String = "hello" 6 | lazy var anotherValue: String = { return "world" }() 7 | } 8 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Quick.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/Nimble/Nimble.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NMBExceptionCapture.h" 3 | #import "DSL.h" 4 | 5 | FOUNDATION_EXPORT double NimbleVersionNumber; 6 | FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | osx_image: xcode7.1 2 | rvm: 3 | - 2.2.1 4 | language: objective-c 5 | env: 6 | global: 7 | - LC_CTYPE=en_US.UTF-8 8 | - LANG=en_US.UTF-8 9 | before_install: 10 | - gem install bundle 11 | - bundle install 12 | script: 13 | - fastlane test -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/Helpers/ObjectWithLazyProperty.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | class ObjectWithLazyProperty { 4 | init() {} 5 | lazy var value: String = "hello" 6 | lazy var anotherValue: String = { return "world" }() 7 | } 8 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/.travis.yml: -------------------------------------------------------------------------------- 1 | osx_image: xcode7 2 | language: objective-c 3 | 4 | env: 5 | matrix: 6 | - NIMBLE_RUNTIME_IOS_SDK_VERSION=9.0 TYPE=ios 7 | - NIMBLE_RUNTIME_OSX_SDK_VERSION=10.10 TYPE=osx 8 | 9 | script: ./test $TYPE 10 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/Nimble.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Quick Templates/Quick Configuration Class.xctemplate/Swift/___FILEBASENAME___.swift: -------------------------------------------------------------------------------- 1 | import Quick 2 | 3 | class ___FILEBASENAMEASIDENTIFIER___: QuickConfiguration { 4 | override class func configure(configuration: Configuration) { 5 | 6 | } 7 | } 8 | 9 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble/Utils/Functional.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | internal func all(array: [T], fn: (T) -> Bool) -> Bool { 4 | for item in array { 5 | if !fn(item) { 6 | return false 7 | } 8 | } 9 | return true 10 | } 11 | 12 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble/objc/NMBExceptionCapture.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NMBExceptionCapture : NSObject 4 | 5 | - (id)initWithHandler:(void(^)(NSException *))handler finally:(void(^)())finally; 6 | - (void)tryBlock:(void(^)())unsafeBlock; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Carthage/Build/Mac/Nimble.framework/Headers/NMBExceptionCapture.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NMBExceptionCapture : NSObject 4 | 5 | - (id)initWithHandler:(void(^)(NSException *))handler finally:(void(^)())finally; 6 | - (void)tryBlock:(void(^)())unsafeBlock; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Carthage/Build/iOS/Nimble.framework/Headers/NMBExceptionCapture.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NMBExceptionCapture : NSObject 4 | 5 | - (id)initWithHandler:(void(^)(NSException *))handler finally:(void(^)())finally; 6 | - (void)tryBlock:(void(^)())unsafeBlock; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | xcuserdata/ 3 | build/ 4 | .idea 5 | DerivedData/ 6 | Nimble.framework.zip 7 | 8 | # Carthage 9 | # 10 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 11 | # Carthage/Checkouts 12 | 13 | Carthage/Build 14 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/Nimble/Utils/Functional.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | internal func all(array: [T], fn: (T) -> Bool) -> Bool { 4 | for item in array { 5 | if !fn(item) { 6 | return false 7 | } 8 | } 9 | return true 10 | } 11 | 12 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/Nimble/objc/NMBExceptionCapture.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NMBExceptionCapture : NSObject 4 | 5 | - (id)initWithHandler:(void(^)(NSException *))handler finally:(void(^)())finally; 6 | - (void)tryBlock:(void(^)())unsafeBlock; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Quick Templates/Quick Configuration Class.xctemplate/Objective-C/___FILEBASENAME___.m: -------------------------------------------------------------------------------- 1 | #import "___FILEBASENAMEASIDENTIFIER___.h" 2 | 3 | @implementation ___FILEBASENAMEASIDENTIFIER___ 4 | 5 | + (void)configure:(Configuration *)configuration { 6 | 7 | } 8 | 9 | @end 10 | 11 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | xcuserdata/ 3 | build/ 4 | .idea 5 | DerivedData/ 6 | Nimble.framework.zip 7 | 8 | # Carthage 9 | # 10 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 11 | # Carthage/Checkouts 12 | 13 | Carthage/Build 14 | -------------------------------------------------------------------------------- /Tribute.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Quick.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Quick/Quick.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | //! Project version number for Quick. 4 | FOUNDATION_EXPORT double QuickVersionNumber; 5 | 6 | //! Project version string for Quick. 7 | FOUNDATION_EXPORT const unsigned char QuickVersionString[]; 8 | 9 | #import "QuickSpec.h" 10 | #import "QCKDSL.h" 11 | #import "QuickConfiguration.h" 12 | -------------------------------------------------------------------------------- /Carthage/Build/iOS/Quick.framework/Headers/Quick.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | //! Project version number for Quick. 4 | FOUNDATION_EXPORT double QuickVersionNumber; 5 | 6 | //! Project version string for Quick. 7 | FOUNDATION_EXPORT const unsigned char QuickVersionString[]; 8 | 9 | #import "QuickSpec.h" 10 | #import "QCKDSL.h" 11 | #import "QuickConfiguration.h" 12 | -------------------------------------------------------------------------------- /Carthage/Build/Mac/Quick.framework/Versions/A/Headers/Quick.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | //! Project version number for Quick. 4 | FOUNDATION_EXPORT double QuickVersionNumber; 5 | 6 | //! Project version string for Quick. 7 | FOUNDATION_EXPORT const unsigned char QuickVersionString[]; 8 | 9 | #import "QuickSpec.h" 10 | #import "QCKDSL.h" 11 | #import "QuickConfiguration.h" 12 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickTests/QuickConfigurationTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface QuickConfigurationTests : XCTestCase; @end 5 | 6 | @implementation QuickConfigurationTests 7 | 8 | - (void)testInitThrows { 9 | XCTAssertThrowsSpecificNamed([QuickConfiguration new], NSException, NSInternalInconsistencyException); 10 | } 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/circle.yml: -------------------------------------------------------------------------------- 1 | machine: 2 | xcode: 3 | version: "7.0" 4 | 5 | checkout: 6 | post: 7 | - git submodule update --init --recursive 8 | 9 | # despite what circle ci says, xctool 0.2.3 cannot run 10 | # ios simulator tests on iOS frameworks for whatever reason. 11 | # 12 | # See: https://github.com/facebook/xctool/issues/415 13 | test: 14 | override: 15 | - rake test:ios 16 | - rake test:osx 17 | 18 | 19 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickTests/FunctionalTests/Configuration/AfterEach/Configuration+AfterEach.swift: -------------------------------------------------------------------------------- 1 | import Quick 2 | 3 | public var FunctionalTests_Configuration_AfterEachWasExecuted = false 4 | 5 | class FunctionalTests_Configuration_AfterEach: QuickConfiguration { 6 | override class func configure(configuration: Configuration) { 7 | configuration.afterEach { 8 | FunctionalTests_Configuration_AfterEachWasExecuted = true 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickTests/FunctionalTests/Configuration/BeforeEach/Configuration+BeforeEach.swift: -------------------------------------------------------------------------------- 1 | import Quick 2 | 3 | public var FunctionalTests_Configuration_BeforeEachWasExecuted = false 4 | 5 | class FunctionalTests_Configuration_BeforeEach: QuickConfiguration { 6 | override class func configure(configuration: Configuration) { 7 | configuration.beforeEach { 8 | FunctionalTests_Configuration_BeforeEachWasExecuted = true 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble/Utils/SourceLocation.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | public class SourceLocation : NSObject { 5 | public let file: String 6 | public let line: UInt 7 | 8 | override init() { 9 | file = "Unknown File" 10 | line = 0 11 | } 12 | 13 | init(file: String, line: UInt) { 14 | self.file = file 15 | self.line = line 16 | } 17 | 18 | override public var description: String { 19 | return "\(file):\(line)" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/ObjCSyncTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "NimbleSpecHelper.h" 4 | 5 | @interface ObjCSyncTest : XCTestCase 6 | 7 | @end 8 | 9 | @implementation ObjCSyncTest 10 | 11 | - (void)testFailureExpectation { 12 | expectFailureMessage(@"fail() always fails", ^{ 13 | fail(); 14 | }); 15 | 16 | expectFailureMessage(@"This always fails", ^{ 17 | failWithMessage(@"This always fails"); 18 | }); 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/Nimble/Utils/SourceLocation.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | public class SourceLocation : NSObject { 5 | public let file: String 6 | public let line: UInt 7 | 8 | override init() { 9 | file = "Unknown File" 10 | line = 0 11 | } 12 | 13 | init(file: String, line: UInt) { 14 | self.file = file 15 | self.line = line 16 | } 17 | 18 | override public var description: String { 19 | return "\(file):\(line)" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/ObjCSyncTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "NimbleSpecHelper.h" 4 | 5 | @interface ObjCSyncTest : XCTestCase 6 | 7 | @end 8 | 9 | @implementation ObjCSyncTest 10 | 11 | - (void)testFailureExpectation { 12 | expectFailureMessage(@"fail() always fails", ^{ 13 | fail(); 14 | }); 15 | 16 | expectFailureMessage(@"This always fails", ^{ 17 | failWithMessage(@"This always fails"); 18 | }); 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Tribute.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'Tribute' 3 | s.version = '0.1' 4 | s.summary = 'Programmatic creation of NSAttributedString does not have to be a pain' 5 | s.homepage = 'https://github.com/zats/Tribute' 6 | s.authors = { 'Sash Zats' => 'sash@zats.io' } 7 | s.source = { :git => 'https://github.com/zats/Tribute.git', :tag => s.version } 8 | 9 | s.ios.deployment_target = '8.0' 10 | s.osx.deployment_target = '10.9' 11 | 12 | s.source_files = 'Tribute/*.swift' 13 | 14 | s.requires_arc = true 15 | end 16 | -------------------------------------------------------------------------------- /Tribute/Tribute.h: -------------------------------------------------------------------------------- 1 | // 2 | // Tribute.h 3 | // Tribute 4 | // 5 | // Created by Sash Zats on 11/26/15. 6 | // Copyright © 2015 Sash Zats. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Tribute. 12 | FOUNDATION_EXPORT double TributeVersionNumber; 13 | 14 | //! Project version string for Tribute. 15 | FOUNDATION_EXPORT const unsigned char TributeVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /fastlane/Appfile: -------------------------------------------------------------------------------- 1 | app_identifier "" # The bundle identifier of your app 2 | apple_id "" # Your Apple email address 3 | 4 | # You can uncomment any of the lines below and add your own 5 | # team selection in case you're in multiple teams 6 | # team_name "Felix Krause" 7 | # team_id "Q2CBPJ58CA" 8 | 9 | # To select a team for iTunes Connect use 10 | # itc_team_name "Company Name" 11 | # itc_team_id "18742801 12 | 13 | # you can even provide different app identifiers, Apple IDs and team names per lane: 14 | # https://github.com/KrauseFx/fastlane/blob/master/docs/Appfile.md 15 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/ObjCBeNilTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeNilTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeNilTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(nil).to(beNil()); 12 | expect(@NO).toNot(beNil()); 13 | } 14 | 15 | - (void)testNegativeMatches { 16 | expectFailureMessage(@"expected to be nil, got <1.0000>", ^{ 17 | expect(@1).to(beNil()); 18 | }); 19 | expectFailureMessage(@"expected to not be nil, got ", ^{ 20 | expect(nil).toNot(beNil()); 21 | }); 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Quick/NSString+QCKSelectorName.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | /** 4 | QuickSpec converts example names into test methods. 5 | Those test methods need valid selector names, which means no whitespace, 6 | control characters, etc. This category gives NSString objects an easy way 7 | to replace those illegal characters with underscores. 8 | */ 9 | @interface NSString (QCKSelectorName) 10 | 11 | /** 12 | Returns a string with underscores in place of all characters that cannot 13 | be included in a selector (SEL) name. 14 | */ 15 | @property (nonatomic, readonly) NSString *qck_selectorName; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/ObjCBeNilTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeNilTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeNilTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(nil).to(beNil()); 12 | expect(@NO).toNot(beNil()); 13 | } 14 | 15 | - (void)testNegativeMatches { 16 | expectFailureMessage(@"expected to be nil, got <1.0000>", ^{ 17 | expect(@1).to(beNil()); 18 | }); 19 | expectFailureMessage(@"expected to not be nil, got ", ^{ 20 | expect(nil).toNot(beNil()); 21 | }); 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/ObjCBeFalseTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeFalseTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeFalseTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@NO).to(beFalse()); 12 | expect(@YES).toNot(beFalse()); 13 | } 14 | 15 | - (void)testNegativeMatches { 16 | expectNilFailureMessage(@"expected to be false, got ", ^{ 17 | expect(nil).to(beFalse()); 18 | }); 19 | expectNilFailureMessage(@"expected to not be false, got ", ^{ 20 | expect(nil).toNot(beFalse()); 21 | }); 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/ObjCBeFalseTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeFalseTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeFalseTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@NO).to(beFalse()); 12 | expect(@YES).toNot(beFalse()); 13 | } 14 | 15 | - (void)testNegativeMatches { 16 | expectNilFailureMessage(@"expected to be false, got ", ^{ 17 | expect(nil).to(beFalse()); 18 | }); 19 | expectNilFailureMessage(@"expected to not be false, got ", ^{ 20 | expect(nil).toNot(beFalse()); 21 | }); 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/Matchers/BeNilTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | class BeNilTest: XCTestCase { 5 | func producesNil() -> Array? { 6 | return nil 7 | } 8 | 9 | func testBeNil() { 10 | expect(nil as Int?).to(beNil()) 11 | expect(1 as Int?).toNot(beNil()) 12 | expect(self.producesNil()).to(beNil()) 13 | 14 | failsWithErrorMessage("expected to not be nil, got ") { 15 | expect(nil as Int?).toNot(beNil()) 16 | } 17 | 18 | failsWithErrorMessage("expected to be nil, got <1>") { 19 | expect(1 as Int?).to(beNil()) 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/ObjCBeTrueTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeTrueTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeTrueTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@YES).to(beTrue()); 12 | expect(@NO).toNot(beTrue()); 13 | expect(nil).toNot(beTrue()); 14 | } 15 | 16 | - (void)testNegativeMatches { 17 | expectFailureMessage(@"expected to be true, got <0.0000>", ^{ 18 | expect(@NO).to(beTrue()); 19 | }); 20 | expectFailureMessage(@"expected to be true, got ", ^{ 21 | expect(nil).to(beTrue()); 22 | }); 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/Matchers/BeNilTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | class BeNilTest: XCTestCase { 5 | func producesNil() -> Array? { 6 | return nil 7 | } 8 | 9 | func testBeNil() { 10 | expect(nil as Int?).to(beNil()) 11 | expect(1 as Int?).toNot(beNil()) 12 | expect(self.producesNil()).to(beNil()) 13 | 14 | failsWithErrorMessage("expected to not be nil, got ") { 15 | expect(nil as Int?).toNot(beNil()) 16 | } 17 | 18 | failsWithErrorMessage("expected to be nil, got <1>") { 19 | expect(1 as Int?).to(beNil()) 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/ObjCBeTrueTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeTrueTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeTrueTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@YES).to(beTrue()); 12 | expect(@NO).toNot(beTrue()); 13 | expect(nil).toNot(beTrue()); 14 | } 15 | 16 | - (void)testNegativeMatches { 17 | expectFailureMessage(@"expected to be true, got <0.0000>", ^{ 18 | expect(@NO).to(beTrue()); 19 | }); 20 | expectFailureMessage(@"expected to be true, got ", ^{ 21 | expect(nil).to(beTrue()); 22 | }); 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble/Matchers/BeNil.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is nil. 4 | public func beNil() -> MatcherFunc { 5 | return MatcherFunc { actualExpression, failureMessage in 6 | failureMessage.postfixMessage = "be nil" 7 | let actualValue = try actualExpression.evaluate() 8 | return actualValue == nil 9 | } 10 | } 11 | 12 | extension NMBObjCMatcher { 13 | public class func beNilMatcher() -> NMBObjCMatcher { 14 | return NMBObjCMatcher { actualExpression, failureMessage in 15 | return try! beNil().matches(actualExpression, failureMessage: failureMessage) 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Quick/ExampleMetadata.swift: -------------------------------------------------------------------------------- 1 | /** 2 | A class that encapsulates information about an example, 3 | including the index at which the example was executed, as 4 | well as the example itself. 5 | */ 6 | final public class ExampleMetadata: NSObject { 7 | /** 8 | The example for which this metadata was collected. 9 | */ 10 | public let example: Example 11 | 12 | /** 13 | The index at which this example was executed in the 14 | test suite. 15 | */ 16 | public let exampleIndex: Int 17 | 18 | internal init(example: Example, exampleIndex: Int) { 19 | self.example = example 20 | self.exampleIndex = exampleIndex 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Quick/World.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class ExampleGroup; 4 | @class ExampleMetadata; 5 | 6 | SWIFT_CLASS("_TtC5Quick5World") 7 | @interface World 8 | 9 | @property (nonatomic) ExampleGroup * __nullable currentExampleGroup; 10 | @property (nonatomic) ExampleMetadata * __nullable currentExampleMetadata; 11 | @property (nonatomic) BOOL isRunningAdditionalSuites; 12 | + (World * __nonnull)sharedWorld; 13 | - (void)configure:(void (^ __nonnull)(Configuration * __nonnull))closure; 14 | - (void)finalizeConfiguration; 15 | - (ExampleGroup * __nonnull)rootExampleGroupForSpecClass:(Class __nonnull)cls; 16 | - (NSArray * __nonnull)examplesForSpecClass:(Class __nonnull)specClass; 17 | @end 18 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/Nimble/Matchers/BeNil.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is nil. 4 | public func beNil() -> MatcherFunc { 5 | return MatcherFunc { actualExpression, failureMessage in 6 | failureMessage.postfixMessage = "be nil" 7 | let actualValue = try actualExpression.evaluate() 8 | return actualValue == nil 9 | } 10 | } 11 | 12 | extension NMBObjCMatcher { 13 | public class func beNilMatcher() -> NMBObjCMatcher { 14 | return NMBObjCMatcher { actualExpression, failureMessage in 15 | return try! beNil().matches(actualExpression, failureMessage: failureMessage) 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/NimbleSpecHelper.h: -------------------------------------------------------------------------------- 1 | @import Nimble; 2 | #import "NimbleTests-Swift.h" 3 | 4 | // Use this when you want to verify the failure message for when an expectation fails 5 | #define expectFailureMessage(MSG, BLOCK) \ 6 | [NimbleHelper expectFailureMessage:(MSG) block:(BLOCK) file:@(__FILE__) line:__LINE__]; 7 | 8 | #define expectFailureMessages(MSGS, BLOCK) \ 9 | [NimbleHelper expectFailureMessages:(MSGS) block:(BLOCK) file:@(__FILE__) line:__LINE__]; 10 | 11 | 12 | // Use this when you want to verify the failure message with the nil message postfixed 13 | // to it: " (use beNil() to match nils)" 14 | #define expectNilFailureMessage(MSG, BLOCK) \ 15 | [NimbleHelper expectFailureMessageForNil:(MSG) block:(BLOCK) file:@(__FILE__) line:__LINE__]; 16 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble/Adapters/AssertionDispatcher.swift: -------------------------------------------------------------------------------- 1 | 2 | /// AssertionDispatcher allows multiple AssertionHandlers to receive 3 | /// assertion messages. 4 | /// 5 | /// @warning Does not fully dispatch if one of the handlers raises an exception. 6 | /// This is possible with XCTest-based assertion handlers. 7 | /// 8 | public class AssertionDispatcher: AssertionHandler { 9 | let handlers: [AssertionHandler] 10 | 11 | public init(handlers: [AssertionHandler]) { 12 | self.handlers = handlers 13 | } 14 | 15 | public func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { 16 | for handler in handlers { 17 | handler.assert(assertion, message: message, location: location) 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/NimbleSpecHelper.h: -------------------------------------------------------------------------------- 1 | @import Nimble; 2 | #import "NimbleTests-Swift.h" 3 | 4 | // Use this when you want to verify the failure message for when an expectation fails 5 | #define expectFailureMessage(MSG, BLOCK) \ 6 | [NimbleHelper expectFailureMessage:(MSG) block:(BLOCK) file:@(__FILE__) line:__LINE__]; 7 | 8 | #define expectFailureMessages(MSGS, BLOCK) \ 9 | [NimbleHelper expectFailureMessages:(MSGS) block:(BLOCK) file:@(__FILE__) line:__LINE__]; 10 | 11 | 12 | // Use this when you want to verify the failure message with the nil message postfixed 13 | // to it: " (use beNil() to match nils)" 14 | #define expectNilFailureMessage(MSG, BLOCK) \ 15 | [NimbleHelper expectFailureMessageForNil:(MSG) block:(BLOCK) file:@(__FILE__) line:__LINE__]; 16 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/Nimble/Adapters/AssertionDispatcher.swift: -------------------------------------------------------------------------------- 1 | 2 | /// AssertionDispatcher allows multiple AssertionHandlers to receive 3 | /// assertion messages. 4 | /// 5 | /// @warning Does not fully dispatch if one of the handlers raises an exception. 6 | /// This is possible with XCTest-based assertion handlers. 7 | /// 8 | public class AssertionDispatcher: AssertionHandler { 9 | let handlers: [AssertionHandler] 10 | 11 | public init(handlers: [AssertionHandler]) { 12 | self.handlers = handlers 13 | } 14 | 15 | public func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { 16 | for handler in handlers { 17 | handler.assert(assertion, message: message, location: location) 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/ObjCBeFalsyTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeFalsyTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeFalsyTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@NO).to(beFalsy()); 12 | expect(@YES).toNot(beFalsy()); 13 | expect(nil).to(beFalsy()); 14 | } 15 | 16 | - (void)testNegativeMatches { 17 | expectFailureMessage(@"expected to not be falsy, got ", ^{ 18 | expect(nil).toNot(beFalsy()); 19 | }); 20 | expectFailureMessage(@"expected to be falsy, got <1.0000>", ^{ 21 | expect(@1).to(beFalsy()); 22 | }); 23 | expectFailureMessage(@"expected to be truthy, got <0.0000>", ^{ 24 | expect(@NO).to(beTruthy()); 25 | }); 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/ObjCBeTruthyTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeTruthyTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeTruthyTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@YES).to(beTruthy()); 12 | expect(@NO).toNot(beTruthy()); 13 | expect(nil).toNot(beTruthy()); 14 | } 15 | 16 | - (void)testNegativeMatches { 17 | expectFailureMessage(@"expected to be truthy, got ", ^{ 18 | expect(nil).to(beTruthy()); 19 | }); 20 | expectFailureMessage(@"expected to not be truthy, got <1.0000>", ^{ 21 | expect(@1).toNot(beTruthy()); 22 | }); 23 | expectFailureMessage(@"expected to be truthy, got <0.0000>", ^{ 24 | expect(@NO).to(beTruthy()); 25 | }); 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/ObjCBeFalsyTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeFalsyTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeFalsyTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@NO).to(beFalsy()); 12 | expect(@YES).toNot(beFalsy()); 13 | expect(nil).to(beFalsy()); 14 | } 15 | 16 | - (void)testNegativeMatches { 17 | expectFailureMessage(@"expected to not be falsy, got ", ^{ 18 | expect(nil).toNot(beFalsy()); 19 | }); 20 | expectFailureMessage(@"expected to be falsy, got <1.0000>", ^{ 21 | expect(@1).to(beFalsy()); 22 | }); 23 | expectFailureMessage(@"expected to be truthy, got <0.0000>", ^{ 24 | expect(@NO).to(beTruthy()); 25 | }); 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble/Adapters/AdapterProtocols.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// Protocol for the assertion handler that Nimble uses for all expectations. 4 | public protocol AssertionHandler { 5 | func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) 6 | } 7 | 8 | /// Global backing interface for assertions that Nimble creates. 9 | /// Defaults to a private test handler that passes through to XCTest. 10 | /// 11 | /// If XCTest is not available, you must assign your own assertion handler 12 | /// before using any matchers, otherwise Nimble will abort the program. 13 | /// 14 | /// @see AssertionHandler 15 | public var NimbleAssertionHandler: AssertionHandler = { () -> AssertionHandler in 16 | return isXCTestAvailable() ? NimbleXCTestHandler() : NimbleXCTestUnavailableHandler() 17 | }() 18 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/ObjCBeTruthyTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeTruthyTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeTruthyTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@YES).to(beTruthy()); 12 | expect(@NO).toNot(beTruthy()); 13 | expect(nil).toNot(beTruthy()); 14 | } 15 | 16 | - (void)testNegativeMatches { 17 | expectFailureMessage(@"expected to be truthy, got ", ^{ 18 | expect(nil).to(beTruthy()); 19 | }); 20 | expectFailureMessage(@"expected to not be truthy, got <1.0000>", ^{ 21 | expect(@1).toNot(beTruthy()); 22 | }); 23 | expectFailureMessage(@"expected to be truthy, got <0.0000>", ^{ 24 | expect(@NO).to(beTruthy()); 25 | }); 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/Nimble/Adapters/AdapterProtocols.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// Protocol for the assertion handler that Nimble uses for all expectations. 4 | public protocol AssertionHandler { 5 | func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) 6 | } 7 | 8 | /// Global backing interface for assertions that Nimble creates. 9 | /// Defaults to a private test handler that passes through to XCTest. 10 | /// 11 | /// If XCTest is not available, you must assign your own assertion handler 12 | /// before using any matchers, otherwise Nimble will abort the program. 13 | /// 14 | /// @see AssertionHandler 15 | public var NimbleAssertionHandler: AssertionHandler = { () -> AssertionHandler in 16 | return isXCTestAvailable() ? NimbleXCTestHandler() : NimbleXCTestUnavailableHandler() 17 | }() 18 | -------------------------------------------------------------------------------- /TributeTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Documentation/InstallingFileTemplates.md: -------------------------------------------------------------------------------- 1 | # Installing Quick File Templates 2 | 3 | The Quick repository includes file templates for both Swift and 4 | Objective-C specs. 5 | 6 | ## Alcatraz 7 | 8 | Quick templates can be installed via [Alcatraz](https://github.com/supermarin/Alcatraz), 9 | a package manager for Xcode. Just search for the templates from the 10 | Package Manager window. 11 | 12 | ![](http://f.cl.ly/items/3T3q0G1j0b2t1V0M0T04/Screen%20Shot%202014-06-27%20at%202.01.10%20PM.png) 13 | 14 | ## Manually via the Rakefile 15 | 16 | To manually install the templates, just clone the repository and 17 | run the `templates:install` rake task: 18 | 19 | ```sh 20 | $ git clone git@github.com:Quick/Quick.git 21 | $ rake templates:install 22 | ``` 23 | 24 | Uninstalling is easy, too: 25 | 26 | ```sh 27 | $ rake templates:uninstall 28 | ``` 29 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickFocusedTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Quick/Callsite.swift: -------------------------------------------------------------------------------- 1 | /** 2 | An object encapsulating the file and line number at which 3 | a particular example is defined. 4 | */ 5 | final public class Callsite: NSObject { 6 | /** 7 | The absolute path of the file in which an example is defined. 8 | */ 9 | public let file: String 10 | 11 | /** 12 | The line number on which an example is defined. 13 | */ 14 | public let line: UInt 15 | 16 | internal init(file: String, line: UInt) { 17 | self.file = file 18 | self.line = line 19 | } 20 | } 21 | 22 | /** 23 | Returns a boolean indicating whether two Callsite objects are equal. 24 | If two callsites are in the same file and on the same line, they must be equal. 25 | */ 26 | public func ==(lhs: Callsite, rhs: Callsite) -> Bool { 27 | return lhs.file == rhs.file && lhs.line == rhs.line 28 | } 29 | -------------------------------------------------------------------------------- /Tribute.xcodeproj/xcuserdata/zats.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Tribute.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | TributeTests.xcscheme 13 | 14 | orderHint 15 | 1 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | 5CD6E7501C07708B004623E6 21 | 22 | primary 23 | 24 | 25 | 5CD6E7611C0770A7004623E6 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickTests/FunctionalTests/ItTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Quick 3 | import Nimble 4 | 5 | class FunctionalTests_ItSpec: QuickSpec { 6 | override func spec() { 7 | var exampleMetadata: ExampleMetadata? 8 | beforeEach { metadata in exampleMetadata = metadata } 9 | 10 | it("") { 11 | expect(exampleMetadata!.example.name).to(equal("")) 12 | } 13 | 14 | it("has a description with セレクター名に使えない文字が入っている 👊💥") { 15 | let name = "has a description with セレクター名に使えない文字が入っている 👊💥" 16 | expect(exampleMetadata!.example.name).to(equal(name)) 17 | } 18 | } 19 | } 20 | 21 | class ItTests: XCTestCase { 22 | func testAllExamplesAreExecuted() { 23 | let result = qck_runSpec(FunctionalTests_ItSpec.classForCoder()) 24 | XCTAssertEqual(result.executionCount, 2 as UInt) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | *.xcscmblueprint 20 | 21 | # CocoaPods 22 | # 23 | # We recommend against adding the Pods directory to your .gitignore. However 24 | # you should judge for yourself, the pros and cons are mentioned at: 25 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 26 | # 27 | # Pods/ 28 | 29 | # Carthage 30 | # 31 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 32 | # Carthage/Checkouts 33 | 34 | Carthage/Build 35 | 36 | # Mac OS X 37 | .DS_Store 38 | 39 | # Quick 40 | Quick.framework.zip 41 | -------------------------------------------------------------------------------- /Tribute/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble/objc/NMBExceptionCapture.m: -------------------------------------------------------------------------------- 1 | #import "NMBExceptionCapture.h" 2 | 3 | @interface NMBExceptionCapture () 4 | @property (nonatomic, copy) void(^handler)(NSException *exception); 5 | @property (nonatomic, copy) void(^finally)(); 6 | @end 7 | 8 | @implementation NMBExceptionCapture 9 | 10 | - (id)initWithHandler:(void(^)(NSException *))handler finally:(void(^)())finally { 11 | self = [super init]; 12 | if (self) { 13 | self.handler = handler; 14 | self.finally = finally; 15 | } 16 | return self; 17 | } 18 | 19 | - (void)tryBlock:(void(^)())unsafeBlock { 20 | @try { 21 | unsafeBlock(); 22 | } 23 | @catch (NSException *exception) { 24 | if (self.handler) { 25 | self.handler(exception); 26 | } 27 | } 28 | @finally { 29 | if (self.finally) { 30 | self.finally(); 31 | } 32 | } 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/Nimble/objc/NMBExceptionCapture.m: -------------------------------------------------------------------------------- 1 | #import "NMBExceptionCapture.h" 2 | 3 | @interface NMBExceptionCapture () 4 | @property (nonatomic, copy) void(^handler)(NSException *exception); 5 | @property (nonatomic, copy) void(^finally)(); 6 | @end 7 | 8 | @implementation NMBExceptionCapture 9 | 10 | - (id)initWithHandler:(void(^)(NSException *))handler finally:(void(^)())finally { 11 | self = [super init]; 12 | if (self) { 13 | self.handler = handler; 14 | self.finally = finally; 15 | } 16 | return self; 17 | } 18 | 19 | - (void)tryBlock:(void(^)())unsafeBlock { 20 | @try { 21 | unsafeBlock(); 22 | } 23 | @catch (NSException *exception) { 24 | if (self.handler) { 25 | self.handler(exception); 26 | } 27 | } 28 | @finally { 29 | if (self.finally) { 30 | self.finally(); 31 | } 32 | } 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickTests/Fixtures/FunctionalTests_SharedExamplesTests_SharedExamples.swift: -------------------------------------------------------------------------------- 1 | import Quick 2 | import Nimble 3 | 4 | class FunctionalTests_SharedExamplesTests_SharedExamples: QuickConfiguration { 5 | override class func configure(configuration: Configuration) { 6 | sharedExamples("a group of three shared examples") { 7 | it("passes once") { expect(true).to(beTruthy()) } 8 | it("passes twice") { expect(true).to(beTruthy()) } 9 | it("passes three times") { expect(true).to(beTruthy()) } 10 | } 11 | 12 | sharedExamples("shared examples that take a context") { (sharedExampleContext: SharedExampleContext) in 13 | it("is passed the correct parameters via the context") { 14 | let callsite = sharedExampleContext()["callsite"] as! String 15 | expect(callsite).to(equal("SharedExamplesSpec")) 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickTests/FunctionalTests/ItTests+ObjC.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | 5 | #import "QCKSpecRunner.h" 6 | 7 | QuickSpecBegin(FunctionalTests_ItSpec_ObjC) 8 | 9 | __block ExampleMetadata *exampleMetadata = nil; 10 | beforeEachWithMetadata(^(ExampleMetadata *metadata) { 11 | exampleMetadata = metadata; 12 | }); 13 | 14 | it(@" ", ^{ 15 | expect(exampleMetadata.example.name).to(equal(@" ")); 16 | }); 17 | 18 | it(@"has a description with セレクター名に使えない文字が入っている 👊💥", ^{ 19 | NSString *name = @"has a description with セレクター名に使えない文字が入っている 👊💥"; 20 | expect(exampleMetadata.example.name).to(equal(name)); 21 | }); 22 | 23 | QuickSpecEnd 24 | 25 | @interface ItTests_ObjC : XCTestCase; @end 26 | 27 | @implementation ItTests_ObjC 28 | 29 | - (void)testAllExamplesAreExecuted { 30 | XCTestRun *result = qck_runSpec([FunctionalTests_ItSpec_ObjC class]); 31 | XCTAssertEqual(result.executionCount, 2); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickTests/FunctionalTests/Configuration/BeforeEach/Configuration+BeforeEachTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Quick 3 | import Nimble 4 | 5 | class Configuration_BeforeEachSpec: QuickSpec { 6 | override func spec() { 7 | it("is executed after the configuration beforeEach") { 8 | expect(FunctionalTests_Configuration_BeforeEachWasExecuted).to(beTruthy()) 9 | } 10 | } 11 | } 12 | 13 | class Configuration_BeforeEachTests: XCTestCase { 14 | override func setUp() { 15 | super.setUp() 16 | FunctionalTests_Configuration_BeforeEachWasExecuted = false 17 | } 18 | 19 | override func tearDown() { 20 | FunctionalTests_Configuration_BeforeEachWasExecuted = false 21 | super.tearDown() 22 | } 23 | 24 | func testExampleIsRunAfterTheConfigurationBeforeEachIsExecuted() { 25 | qck_runSpec(Configuration_BeforeEachSpec.classForCoder()) 26 | XCTAssert(FunctionalTests_Configuration_BeforeEachWasExecuted) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/ObjCBeLessThanTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeLessThanTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeLessThanTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@2).to(beLessThan(@3)); 12 | expect(@2).toNot(beLessThan(@2)); 13 | } 14 | 15 | - (void)testNegativeMatches { 16 | expectFailureMessage(@"expected to be less than <0.0000>, got <-1.0000>", ^{ 17 | expect(@(-1)).to(beLessThan(@0)); 18 | }); 19 | expectFailureMessage(@"expected to not be less than <1.0000>, got <0.0000>", ^{ 20 | expect(@0).toNot(beLessThan(@1)); 21 | }); 22 | } 23 | 24 | - (void)testNilMatches { 25 | expectNilFailureMessage(@"expected to be less than <-1.0000>, got ", ^{ 26 | expect(nil).to(beLessThan(@(-1))); 27 | }); 28 | expectNilFailureMessage(@"expected to not be less than <1.0000>, got ", ^{ 29 | expect(nil).toNot(beLessThan(@1)); 30 | }); 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/ObjCEqualTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCEqualTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCEqualTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@1).to(equal(@1)); 12 | expect(@1).toNot(equal(@2)); 13 | expect(@1).notTo(equal(@2)); 14 | expect(@"hello").to(equal(@"hello")); 15 | } 16 | 17 | - (void)testNegativeMatches { 18 | expectFailureMessage(@"expected to equal <2.0000>, got <1.0000>", ^{ 19 | expect(@1).to(equal(@2)); 20 | }); 21 | expectFailureMessage(@"expected to not equal <1.0000>, got <1.0000>", ^{ 22 | expect(@1).toNot(equal(@1)); 23 | }); 24 | } 25 | 26 | - (void)testNilMatches { 27 | expectNilFailureMessage(@"expected to equal , got ", ^{ 28 | expect(nil).to(equal(nil)); 29 | }); 30 | expectNilFailureMessage(@"expected to not equal , got ", ^{ 31 | expect(nil).toNot(equal(nil)); 32 | }); 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickTests/Helpers/QCKSpecRunner.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | /** 4 | Runs an XCTestSuite instance containing only the given XCTestCase subclass. 5 | Use this to run QuickSpec subclasses from within a set of unit tests. 6 | 7 | Due to implicit dependencies in _XCTFailureHandler, this function raises an 8 | exception when used in Swift to run a failing test case. 9 | 10 | @param specClass The class of the spec to be run. 11 | @return An XCTestRun instance that contains information such as the number of failures, etc. 12 | */ 13 | extern XCTestRun *qck_runSpec(Class specClass); 14 | 15 | /** 16 | Runs an XCTestSuite instance containing the given XCTestCase subclasses, in the order provided. 17 | See the documentation for `qck_runSpec` for more details. 18 | 19 | @param specClasses An array of QuickSpec classes, in the order they should be run. 20 | @return An XCTestRun instance that contains information such as the number of failures, etc. 21 | */ 22 | extern XCTestRun *qck_runSpecs(NSArray *specClasses); 23 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSHumanReadableCopyright 24 | Copyright © 2014 Jeff Hui. All rights reserved. 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/ObjCBeLessThanTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeLessThanTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeLessThanTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@2).to(beLessThan(@3)); 12 | expect(@2).toNot(beLessThan(@2)); 13 | } 14 | 15 | - (void)testNegativeMatches { 16 | expectFailureMessage(@"expected to be less than <0.0000>, got <-1.0000>", ^{ 17 | expect(@(-1)).to(beLessThan(@0)); 18 | }); 19 | expectFailureMessage(@"expected to not be less than <1.0000>, got <0.0000>", ^{ 20 | expect(@0).toNot(beLessThan(@1)); 21 | }); 22 | } 23 | 24 | - (void)testNilMatches { 25 | expectNilFailureMessage(@"expected to be less than <-1.0000>, got ", ^{ 26 | expect(nil).to(beLessThan(@(-1))); 27 | }); 28 | expectNilFailureMessage(@"expected to not be less than <1.0000>, got ", ^{ 29 | expect(nil).toNot(beLessThan(@1)); 30 | }); 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/ObjCEqualTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCEqualTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCEqualTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@1).to(equal(@1)); 12 | expect(@1).toNot(equal(@2)); 13 | expect(@1).notTo(equal(@2)); 14 | expect(@"hello").to(equal(@"hello")); 15 | } 16 | 17 | - (void)testNegativeMatches { 18 | expectFailureMessage(@"expected to equal <2.0000>, got <1.0000>", ^{ 19 | expect(@1).to(equal(@2)); 20 | }); 21 | expectFailureMessage(@"expected to not equal <1.0000>, got <1.0000>", ^{ 22 | expect(@1).toNot(equal(@1)); 23 | }); 24 | } 25 | 26 | - (void)testNilMatches { 27 | expectNilFailureMessage(@"expected to equal , got ", ^{ 28 | expect(nil).to(equal(nil)); 29 | }); 30 | expectNilFailureMessage(@"expected to not equal , got ", ^{ 31 | expect(nil).toNot(equal(nil)); 32 | }); 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Quick/Hooks/SuiteHooks.swift: -------------------------------------------------------------------------------- 1 | /** 2 | A container for closures to be executed before and after all examples. 3 | */ 4 | final internal class SuiteHooks { 5 | internal var befores: [BeforeSuiteClosure] = [] 6 | internal var beforesAlreadyExecuted = false 7 | 8 | internal var afters: [AfterSuiteClosure] = [] 9 | internal var aftersAlreadyExecuted = false 10 | 11 | internal func appendBefore(closure: BeforeSuiteClosure) { 12 | befores.append(closure) 13 | } 14 | 15 | internal func appendAfter(closure: AfterSuiteClosure) { 16 | afters.append(closure) 17 | } 18 | 19 | internal func executeBefores() { 20 | assert(!beforesAlreadyExecuted) 21 | for before in befores { 22 | before() 23 | } 24 | beforesAlreadyExecuted = true 25 | } 26 | 27 | internal func executeAfters() { 28 | assert(!aftersAlreadyExecuted) 29 | for after in afters { 30 | after() 31 | } 32 | aftersAlreadyExecuted = true 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Quick/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSHumanReadableCopyright 24 | Copyright © 2014 - present, Quick Team. All rights reserved. 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/Nimble/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSHumanReadableCopyright 24 | Copyright © 2014 Jeff Hui. All rights reserved. 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "Nimble" 3 | s.version = "3.0.0" 4 | s.summary = "A Matcher Framework for Swift and Objective-C" 5 | s.description = <<-DESC 6 | Use Nimble to express the expected outcomes of Swift or Objective-C expressions. Inspired by Cedar. 7 | DESC 8 | s.homepage = "https://github.com/Quick/Nimble" 9 | s.license = { :type => "Apache 2.0", :file => "LICENSE.md" } 10 | s.author = "Quick Contributors" 11 | s.ios.deployment_target = "7.0" 12 | s.osx.deployment_target = "10.9" 13 | s.tvos.deployment_target = "9.0" 14 | s.source = { :git => "https://github.com/Quick/Nimble.git", :tag => "v#{s.version}" } 15 | 16 | s.source_files = "Nimble", "Nimble/**/*.{swift,h,m}" 17 | s.weak_framework = "XCTest" 18 | s.requires_arc = true 19 | s.pod_target_xcconfig = { 'ENABLE_BITCODE' => 'NO', 'OTHER_LDFLAGS' => '-weak-lswiftXCTest', 'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks"' } 20 | end 21 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/ObjCBeGreaterThanTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeGreaterThanTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeGreaterThanTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@2).to(beGreaterThan(@1)); 12 | expect(@2).toNot(beGreaterThan(@2)); 13 | } 14 | 15 | - (void)testNegativeMatches { 16 | expectFailureMessage(@"expected to be greater than <0.0000>, got <-1.0000>", ^{ 17 | expect(@(-1)).to(beGreaterThan(@(0))); 18 | }); 19 | expectFailureMessage(@"expected to not be greater than <1.0000>, got <0.0000>", ^{ 20 | expect(@0).toNot(beGreaterThan(@(1))); 21 | }); 22 | } 23 | 24 | - (void)testNilMatches { 25 | expectNilFailureMessage(@"expected to be greater than <-1.0000>, got ", ^{ 26 | expect(nil).to(beGreaterThan(@(-1))); 27 | }); 28 | expectNilFailureMessage(@"expected to not be greater than <1.0000>, got ", ^{ 29 | expect(nil).toNot(beGreaterThan(@(1))); 30 | }); 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickTests/Helpers/XCTestObservationCenter+QCKSuspendObservation.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | /** 4 | Expose internal XCTest class and methods in order to run isolated XCTestSuite 5 | instances while the QuickTests test suite is running. 6 | 7 | If an Xcode upgrade causes QuickTests to crash when executing, or for tests to fail 8 | with the message "Timed out waiting for IDE barrier message to complete", it is 9 | likely that this internal interface has been changed. 10 | */ 11 | @interface XCTestObservationCenter (QCKSuspendObservation) 12 | 13 | /** 14 | Suspends test suite observation for the duration that the block is executing. 15 | Any test suites that are executed within the block do not generate any log output. 16 | Failures are still reported. 17 | 18 | Use this method to run XCTestSuite objects while another XCTestSuite is running. 19 | Without this method, tests fail with the message: "Timed out waiting for IDE 20 | barrier message to complete". 21 | */ 22 | - (void)_suspendObservationForBlock:(void (^)(void))block; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/ObjCMatchTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCMatchTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCMatchTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@"11:14").to(match(@"\\d{2}:\\d{2}")); 12 | expect(@"hello").toNot(match(@"\\d{2}:\\d{2}")); 13 | } 14 | 15 | - (void)testNegativeMatches { 16 | expectFailureMessage(@"expected to match <\\d{2}:\\d{2}>, got ", ^{ 17 | expect(@"hello").to(match(@"\\d{2}:\\d{2}")); 18 | }); 19 | expectFailureMessage(@"expected to not match <\\d{2}:\\d{2}>, got <11:22>", ^{ 20 | expect(@"11:22").toNot(match(@"\\d{2}:\\d{2}")); 21 | }); 22 | } 23 | 24 | - (void)testNilMatches { 25 | expectNilFailureMessage(@"expected to match <\\d{2}:\\d{2}>, got ", ^{ 26 | expect(nil).to(match(@"\\d{2}:\\d{2}")); 27 | }); 28 | expectNilFailureMessage(@"expected to not match <\\d{2}:\\d{2}>, got ", ^{ 29 | expect(nil).toNot(match(@"\\d{2}:\\d{2}")); 30 | }); 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/Nimble.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "Nimble" 3 | s.version = "3.0.0" 4 | s.summary = "A Matcher Framework for Swift and Objective-C" 5 | s.description = <<-DESC 6 | Use Nimble to express the expected outcomes of Swift or Objective-C expressions. Inspired by Cedar. 7 | DESC 8 | s.homepage = "https://github.com/Quick/Nimble" 9 | s.license = { :type => "Apache 2.0", :file => "LICENSE.md" } 10 | s.author = "Quick Contributors" 11 | s.ios.deployment_target = "7.0" 12 | s.osx.deployment_target = "10.9" 13 | s.tvos.deployment_target = "9.0" 14 | s.source = { :git => "https://github.com/Quick/Nimble.git", :tag => "v#{s.version}" } 15 | 16 | s.source_files = "Nimble", "Nimble/**/*.{swift,h,m}" 17 | s.weak_framework = "XCTest" 18 | s.requires_arc = true 19 | s.pod_target_xcconfig = { 'ENABLE_BITCODE' => 'NO', 'OTHER_LDFLAGS' => '-weak-lswiftXCTest', 'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks"' } 20 | end 21 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/ObjCBeGreaterThanTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeGreaterThanTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeGreaterThanTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@2).to(beGreaterThan(@1)); 12 | expect(@2).toNot(beGreaterThan(@2)); 13 | } 14 | 15 | - (void)testNegativeMatches { 16 | expectFailureMessage(@"expected to be greater than <0.0000>, got <-1.0000>", ^{ 17 | expect(@(-1)).to(beGreaterThan(@(0))); 18 | }); 19 | expectFailureMessage(@"expected to not be greater than <1.0000>, got <0.0000>", ^{ 20 | expect(@0).toNot(beGreaterThan(@(1))); 21 | }); 22 | } 23 | 24 | - (void)testNilMatches { 25 | expectNilFailureMessage(@"expected to be greater than <-1.0000>, got ", ^{ 26 | expect(nil).to(beGreaterThan(@(-1))); 27 | }); 28 | expectNilFailureMessage(@"expected to not be greater than <1.0000>, got ", ^{ 29 | expect(nil).toNot(beGreaterThan(@(1))); 30 | }); 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/ObjCMatchTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCMatchTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCMatchTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@"11:14").to(match(@"\\d{2}:\\d{2}")); 12 | expect(@"hello").toNot(match(@"\\d{2}:\\d{2}")); 13 | } 14 | 15 | - (void)testNegativeMatches { 16 | expectFailureMessage(@"expected to match <\\d{2}:\\d{2}>, got ", ^{ 17 | expect(@"hello").to(match(@"\\d{2}:\\d{2}")); 18 | }); 19 | expectFailureMessage(@"expected to not match <\\d{2}:\\d{2}>, got <11:22>", ^{ 20 | expect(@"11:22").toNot(match(@"\\d{2}:\\d{2}")); 21 | }); 22 | } 23 | 24 | - (void)testNilMatches { 25 | expectNilFailureMessage(@"expected to match <\\d{2}:\\d{2}>, got ", ^{ 26 | expect(nil).to(match(@"\\d{2}:\\d{2}")); 27 | }); 28 | expectNilFailureMessage(@"expected to not match <\\d{2}:\\d{2}>, got ", ^{ 29 | expect(nil).toNot(match(@"\\d{2}:\\d{2}")); 30 | }); 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Quick/Filter.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /** 4 | A mapping of string keys to booleans that can be used to 5 | filter examples or example groups. For example, a "focused" 6 | example would have the flags [Focused: true]. 7 | */ 8 | public typealias FilterFlags = [String: Bool] 9 | 10 | /** 11 | A namespace for filter flag keys, defined primarily to make the 12 | keys available in Objective-C. 13 | */ 14 | final public class Filter: NSObject { 15 | /** 16 | Example and example groups with [Focused: true] are included in test runs, 17 | excluding all other examples without this flag. Use this to only run one or 18 | two tests that you're currently focusing on. 19 | */ 20 | public class var focused: String { 21 | return "focused" 22 | } 23 | 24 | /** 25 | Example and example groups with [Pending: true] are excluded from test runs. 26 | Use this to temporarily suspend examples that you know do not pass yet. 27 | */ 28 | public class var pending: String { 29 | return "pending" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickTests/FunctionalTests/BeforeSuiteTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Quick 3 | import Nimble 4 | 5 | var beforeSuiteWasExecuted = false 6 | 7 | class FunctionalTests_BeforeSuite_BeforeSuiteSpec: QuickSpec { 8 | override func spec() { 9 | beforeSuite { 10 | beforeSuiteWasExecuted = true 11 | } 12 | } 13 | } 14 | 15 | class FunctionalTests_BeforeSuite_Spec: QuickSpec { 16 | override func spec() { 17 | it("is executed after beforeSuite") { 18 | expect(beforeSuiteWasExecuted).to(beTruthy()) 19 | } 20 | } 21 | } 22 | 23 | class BeforeSuiteTests: XCTestCase { 24 | func testBeforeSuiteIsExecutedBeforeAnyExamples() { 25 | // Execute the spec with an assertion before the one with a beforeSuite 26 | let specs = NSArray(objects: FunctionalTests_BeforeSuite_Spec.classForCoder(), 27 | FunctionalTests_BeforeSuite_BeforeSuiteSpec.classForCoder()) 28 | let result = qck_runSpecs(specs as [AnyObject]) 29 | 30 | XCTAssert(result.hasSucceeded) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickTests/FunctionalTests/SharedExamplesTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Quick 3 | import Nimble 4 | 5 | class FunctionalTests_SharedExamples_Spec: QuickSpec { 6 | override func spec() { 7 | itBehavesLike("a group of three shared examples") 8 | } 9 | } 10 | 11 | class FunctionalTests_SharedExamples_ContextSpec: QuickSpec { 12 | override func spec() { 13 | itBehavesLike("shared examples that take a context") { ["callsite": "SharedExamplesSpec"] } 14 | } 15 | } 16 | 17 | // Shared examples are defined in QuickTests/Fixtures 18 | class SharedExamplesTests: XCTestCase { 19 | func testAGroupOfThreeSharedExamplesExecutesThreeExamples() { 20 | let result = qck_runSpec(FunctionalTests_SharedExamples_Spec.classForCoder()) 21 | XCTAssert(result.hasSucceeded) 22 | XCTAssertEqual(result.executionCount, 3 as UInt) 23 | } 24 | 25 | func testSharedExamplesWithContextPassContextToExamples() { 26 | let result = qck_runSpec(FunctionalTests_SharedExamples_ContextSpec.classForCoder()) 27 | XCTAssert(result.hasSucceeded) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickTests/FunctionalTests/Configuration/AfterEach/Configuration+AfterEachTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Quick 3 | import Nimble 4 | 5 | class Configuration_AfterEachSpec: QuickSpec { 6 | override func spec() { 7 | beforeEach { 8 | FunctionalTests_Configuration_AfterEachWasExecuted = false 9 | } 10 | it("is executed before the configuration afterEach") { 11 | expect(FunctionalTests_Configuration_AfterEachWasExecuted).to(beFalsy()) 12 | } 13 | } 14 | } 15 | 16 | class Configuration_AfterEachTests: XCTestCase { 17 | override func setUp() { 18 | super.setUp() 19 | FunctionalTests_Configuration_AfterEachWasExecuted = false 20 | } 21 | 22 | override func tearDown() { 23 | FunctionalTests_Configuration_AfterEachWasExecuted = false 24 | super.tearDown() 25 | } 26 | 27 | func testExampleIsRunAfterTheConfigurationBeforeEachIsExecuted() { 28 | qck_runSpec(Configuration_BeforeEachSpec.classForCoder()) 29 | XCTAssert(FunctionalTests_Configuration_AfterEachWasExecuted) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickTests/FunctionalTests/BeforeSuiteTests+ObjC.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | 5 | #import "QCKSpecRunner.h" 6 | 7 | static BOOL beforeSuiteWasExecuted = NO; 8 | 9 | QuickSpecBegin(FunctionalTests_BeforeSuite_BeforeSuiteSpec_ObjC) 10 | 11 | beforeSuite(^{ 12 | beforeSuiteWasExecuted = YES; 13 | }); 14 | 15 | QuickSpecEnd 16 | 17 | QuickSpecBegin(FunctionalTests_BeforeSuite_Spec_ObjC) 18 | 19 | it(@"is executed after beforeSuite", ^{ 20 | expect(@(beforeSuiteWasExecuted)).to(beTruthy()); 21 | }); 22 | 23 | QuickSpecEnd 24 | 25 | @interface BeforeSuiteTests_ObjC : XCTestCase; @end 26 | 27 | @implementation BeforeSuiteTests_ObjC 28 | 29 | - (void)testBeforeSuiteIsExecutedBeforeAnyExamples { 30 | // Execute the spec with an assertion before the one with a beforeSuite 31 | NSArray *specs = @[ 32 | [FunctionalTests_BeforeSuite_Spec_ObjC class], 33 | [FunctionalTests_BeforeSuite_BeforeSuiteSpec_ObjC class] 34 | ]; 35 | XCTestRun *result = qck_runSpecs(specs); 36 | XCTAssert(result.hasSucceeded); 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble/Matchers/Match.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual string satisfies the regular expression 4 | /// described by the expected string. 5 | public func match(expectedValue: String?) -> NonNilMatcherFunc { 6 | return NonNilMatcherFunc { actualExpression, failureMessage in 7 | failureMessage.postfixMessage = "match <\(stringify(expectedValue))>" 8 | 9 | if let actual = try actualExpression.evaluate() { 10 | if let regexp = expectedValue { 11 | return actual.rangeOfString(regexp, options: .RegularExpressionSearch) != nil 12 | } 13 | } 14 | 15 | return false 16 | } 17 | } 18 | 19 | extension NMBObjCMatcher { 20 | public class func matchMatcher(expected: NSString) -> NMBMatcher { 21 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 22 | let actual = actualExpression.cast { $0 as? String } 23 | return try! match(expected.description).matches(actual, failureMessage: failureMessage) 24 | } 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Sash Zats 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Quick.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "Quick" 3 | s.version = "0.8.0" 4 | s.summary = "The Swift (and Objective-C) testing framework." 5 | 6 | s.description = <<-DESC 7 | Quick is a behavior-driven development framework for Swift and Objective-C. Inspired by RSpec, Specta, and Ginkgo. 8 | DESC 9 | 10 | s.homepage = "https://github.com/Quick/Quick" 11 | s.license = { :type => "Apache 2.0", :file => "LICENSE" } 12 | 13 | s.author = "Quick Contributors" 14 | s.ios.deployment_target = "7.0" 15 | s.osx.deployment_target = "10.9" 16 | s.tvos.deployment_target = '9.0' 17 | 18 | s.source = { :git => "https://github.com/Quick/Quick.git", :tag => "v#{s.version}" } 19 | s.source_files = "Quick", "Quick/**/*.{swift,h,m}" 20 | 21 | s.public_header_files = [ 22 | 'Quick/Configuration/QuickConfiguration.h', 23 | 'Quick/DSL/QCKDSL.h', 24 | 'Quick/Quick.h', 25 | 'Quick/QuickSpec.h', 26 | ] 27 | 28 | s.framework = "XCTest" 29 | s.requires_arc = true 30 | s.pod_target_xcconfig = { 'ENABLE_BITCODE' => 'NO' } 31 | end 32 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/ObjCBeLessThanOrEqualToTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeLessThanOrEqualToTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeLessThanOrEqualToTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@2).to(beLessThanOrEqualTo(@2)); 12 | expect(@2).toNot(beLessThanOrEqualTo(@1)); 13 | } 14 | 15 | - (void)testNegativeMatches { 16 | expectFailureMessage(@"expected to be less than or equal to <1.0000>, got <2.0000>", ^{ 17 | expect(@2).to(beLessThanOrEqualTo(@1)); 18 | }); 19 | expectFailureMessage(@"expected to not be less than or equal to <1.0000>, got <1.0000>", ^{ 20 | expect(@1).toNot(beLessThanOrEqualTo(@1)); 21 | }); 22 | } 23 | 24 | - (void)testNilMatches { 25 | expectNilFailureMessage(@"expected to be less than or equal to <1.0000>, got ", ^{ 26 | expect(nil).to(beLessThanOrEqualTo(@1)); 27 | }); 28 | expectNilFailureMessage(@"expected to not be less than or equal to <-1.0000>, got ", ^{ 29 | expect(nil).toNot(beLessThanOrEqualTo(@(-1))); 30 | }); 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/Nimble/Matchers/Match.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual string satisfies the regular expression 4 | /// described by the expected string. 5 | public func match(expectedValue: String?) -> NonNilMatcherFunc { 6 | return NonNilMatcherFunc { actualExpression, failureMessage in 7 | failureMessage.postfixMessage = "match <\(stringify(expectedValue))>" 8 | 9 | if let actual = try actualExpression.evaluate() { 10 | if let regexp = expectedValue { 11 | return actual.rangeOfString(regexp, options: .RegularExpressionSearch) != nil 12 | } 13 | } 14 | 15 | return false 16 | } 17 | } 18 | 19 | extension NMBObjCMatcher { 20 | public class func matchMatcher(expected: NSString) -> NMBMatcher { 21 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 22 | let actual = actualExpression.cast { $0 as? String } 23 | return try! match(expected.description).matches(actual, failureMessage: failureMessage) 24 | } 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/ObjCBeginWithTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeginWithTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeginWithTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@"hello world!").to(beginWith(@"hello")); 12 | expect(@"hello world!").toNot(beginWith(@"world")); 13 | 14 | NSArray *array = @[@1, @2]; 15 | expect(array).to(beginWith(@1)); 16 | expect(array).toNot(beginWith(@2)); 17 | } 18 | 19 | - (void)testNegativeMatches { 20 | expectFailureMessage(@"expected to begin with , got ", ^{ 21 | expect(@"foo").to(beginWith(@"bar")); 22 | }); 23 | expectFailureMessage(@"expected to not begin with , got ", ^{ 24 | expect(@"foo").toNot(beginWith(@"foo")); 25 | }); 26 | } 27 | 28 | - (void)testNilMatches { 29 | expectNilFailureMessage(@"expected to begin with <1>, got ", ^{ 30 | expect(nil).to(beginWith(@1)); 31 | }); 32 | expectNilFailureMessage(@"expected to not begin with <1>, got ", ^{ 33 | expect(nil).toNot(beginWith(@1)); 34 | }); 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/ObjCBeKindOfTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeKindOfTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeKindOfTest 9 | 10 | - (void)testPositiveMatches { 11 | NSMutableArray *array = [NSMutableArray array]; 12 | expect(array).to(beAKindOf([NSArray class])); 13 | expect(@1).toNot(beAKindOf([NSNull class])); 14 | } 15 | 16 | - (void)testNegativeMatches { 17 | expectFailureMessage(@"expected to be a kind of NSNull, got <__NSCFNumber instance>", ^{ 18 | expect(@1).to(beAKindOf([NSNull class])); 19 | }); 20 | expectFailureMessage(@"expected to not be a kind of NSNull, got ", ^{ 21 | expect([NSNull null]).toNot(beAKindOf([NSNull class])); 22 | }); 23 | } 24 | 25 | - (void)testNilMatches { 26 | expectNilFailureMessage(@"expected to be a kind of NSNull, got ", ^{ 27 | expect(nil).to(beAKindOf([NSNull class])); 28 | }); 29 | expectNilFailureMessage(@"expected to not be a kind of NSNull, got ", ^{ 30 | expect(nil).toNot(beAKindOf([NSNull class])); 31 | }); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/ObjCBeLessThanOrEqualToTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeLessThanOrEqualToTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeLessThanOrEqualToTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@2).to(beLessThanOrEqualTo(@2)); 12 | expect(@2).toNot(beLessThanOrEqualTo(@1)); 13 | } 14 | 15 | - (void)testNegativeMatches { 16 | expectFailureMessage(@"expected to be less than or equal to <1.0000>, got <2.0000>", ^{ 17 | expect(@2).to(beLessThanOrEqualTo(@1)); 18 | }); 19 | expectFailureMessage(@"expected to not be less than or equal to <1.0000>, got <1.0000>", ^{ 20 | expect(@1).toNot(beLessThanOrEqualTo(@1)); 21 | }); 22 | } 23 | 24 | - (void)testNilMatches { 25 | expectNilFailureMessage(@"expected to be less than or equal to <1.0000>, got ", ^{ 26 | expect(nil).to(beLessThanOrEqualTo(@1)); 27 | }); 28 | expectNilFailureMessage(@"expected to not be less than or equal to <-1.0000>, got ", ^{ 29 | expect(nil).toNot(beLessThanOrEqualTo(@(-1))); 30 | }); 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/ObjCBeginWithTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeginWithTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeginWithTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@"hello world!").to(beginWith(@"hello")); 12 | expect(@"hello world!").toNot(beginWith(@"world")); 13 | 14 | NSArray *array = @[@1, @2]; 15 | expect(array).to(beginWith(@1)); 16 | expect(array).toNot(beginWith(@2)); 17 | } 18 | 19 | - (void)testNegativeMatches { 20 | expectFailureMessage(@"expected to begin with , got ", ^{ 21 | expect(@"foo").to(beginWith(@"bar")); 22 | }); 23 | expectFailureMessage(@"expected to not begin with , got ", ^{ 24 | expect(@"foo").toNot(beginWith(@"foo")); 25 | }); 26 | } 27 | 28 | - (void)testNilMatches { 29 | expectNilFailureMessage(@"expected to begin with <1>, got ", ^{ 30 | expect(nil).to(beginWith(@1)); 31 | }); 32 | expectNilFailureMessage(@"expected to not begin with <1>, got ", ^{ 33 | expect(nil).toNot(beginWith(@1)); 34 | }); 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/ObjCBeKindOfTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeKindOfTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeKindOfTest 9 | 10 | - (void)testPositiveMatches { 11 | NSMutableArray *array = [NSMutableArray array]; 12 | expect(array).to(beAKindOf([NSArray class])); 13 | expect(@1).toNot(beAKindOf([NSNull class])); 14 | } 15 | 16 | - (void)testNegativeMatches { 17 | expectFailureMessage(@"expected to be a kind of NSNull, got <__NSCFNumber instance>", ^{ 18 | expect(@1).to(beAKindOf([NSNull class])); 19 | }); 20 | expectFailureMessage(@"expected to not be a kind of NSNull, got ", ^{ 21 | expect([NSNull null]).toNot(beAKindOf([NSNull class])); 22 | }); 23 | } 24 | 25 | - (void)testNilMatches { 26 | expectNilFailureMessage(@"expected to be a kind of NSNull, got ", ^{ 27 | expect(nil).to(beAKindOf([NSNull class])); 28 | }); 29 | expectNilFailureMessage(@"expected to not be a kind of NSNull, got ", ^{ 30 | expect(nil).toNot(beAKindOf([NSNull class])); 31 | }); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Rakefile: -------------------------------------------------------------------------------- 1 | def run(command) 2 | system(command) or raise "RAKE TASK FAILED: #{command}" 3 | end 4 | 5 | namespace "test" do 6 | desc "Run unit tests for all iOS targets" 7 | task :ios do |t| 8 | run "xcodebuild -workspace Quick.xcworkspace -scheme Quick-iOS -destination 'platform=iOS Simulator,name=iPhone 6' clean test" 9 | end 10 | 11 | desc "Run unit tests for all OS X targets" 12 | task :osx do |t| 13 | run "xcodebuild -workspace Quick.xcworkspace -scheme Quick-OSX clean test" 14 | end 15 | end 16 | 17 | namespace "templates" do 18 | install_dir = File.expand_path("~/Library/Developer/Xcode/Templates/File Templates/Quick") 19 | src_dir = File.expand_path("../Quick Templates", __FILE__) 20 | 21 | desc "Install Quick templates" 22 | task :install do 23 | if File.exists? install_dir 24 | raise "RAKE TASK FAILED: Quick templates are already installed at #{install_dir}" 25 | else 26 | mkdir_p install_dir 27 | cp_r src_dir, install_dir 28 | end 29 | end 30 | 31 | desc "Uninstall Quick templates" 32 | task :uninstall do 33 | rm_rf install_dir 34 | end 35 | end 36 | 37 | task default: ["test:ios", "test:osx"] 38 | 39 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/ObjCBeGreaterThanOrEqualToTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeGreaterThanOrEqualToTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeGreaterThanOrEqualToTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@2).to(beGreaterThanOrEqualTo(@2)); 12 | expect(@2).toNot(beGreaterThanOrEqualTo(@3)); 13 | } 14 | 15 | - (void)testNegativeMatches { 16 | expectFailureMessage(@"expected to be greater than or equal to <0.0000>, got <-1.0000>", ^{ 17 | expect(@(-1)).to(beGreaterThanOrEqualTo(@0)); 18 | }); 19 | expectFailureMessage(@"expected to not be greater than or equal to <1.0000>, got <2.0000>", ^{ 20 | expect(@2).toNot(beGreaterThanOrEqualTo(@(1))); 21 | }); 22 | } 23 | 24 | - (void)testNilMatches { 25 | expectNilFailureMessage(@"expected to be greater than or equal to <-1.0000>, got ", ^{ 26 | expect(nil).to(beGreaterThanOrEqualTo(@(-1))); 27 | }); 28 | expectNilFailureMessage(@"expected to not be greater than or equal to <1.0000>, got ", ^{ 29 | expect(nil).toNot(beGreaterThanOrEqualTo(@(1))); 30 | }); 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/ObjCEndWithTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCEndWithTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCEndWithTest 9 | 10 | - (void)testPositiveMatches { 11 | NSArray *array = @[@1, @2]; 12 | expect(@"hello world!").to(endWith(@"world!")); 13 | expect(@"hello world!").toNot(endWith(@"hello")); 14 | expect(array).to(endWith(@2)); 15 | expect(array).toNot(endWith(@1)); 16 | expect(@1).toNot(contain(@"foo")); 17 | } 18 | 19 | - (void)testNegativeMatches { 20 | expectFailureMessage(@"expected to end with , got ", ^{ 21 | expect(@"hello world!").to(endWith(@"?")); 22 | }); 23 | expectFailureMessage(@"expected to not end with , got ", ^{ 24 | expect(@"hello world!").toNot(endWith(@"!")); 25 | }); 26 | } 27 | 28 | - (void)testNilMatches { 29 | expectNilFailureMessage(@"expected to end with <1>, got ", ^{ 30 | expect(nil).to(endWith(@1)); 31 | }); 32 | expectNilFailureMessage(@"expected to not end with <1>, got ", ^{ 33 | expect(nil).toNot(endWith(@1)); 34 | }); 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Quick/Hooks/Closures.swift: -------------------------------------------------------------------------------- 1 | // MARK: Example Hooks 2 | 3 | /** 4 | A closure executed before an example is run. 5 | */ 6 | public typealias BeforeExampleClosure = () -> () 7 | 8 | /** 9 | A closure executed before an example is run. The closure is given example metadata, 10 | which contains information about the example that is about to be run. 11 | */ 12 | public typealias BeforeExampleWithMetadataClosure = (exampleMetadata: ExampleMetadata) -> () 13 | 14 | /** 15 | A closure executed after an example is run. 16 | */ 17 | public typealias AfterExampleClosure = BeforeExampleClosure 18 | 19 | /** 20 | A closure executed after an example is run. The closure is given example metadata, 21 | which contains information about the example that has just finished running. 22 | */ 23 | public typealias AfterExampleWithMetadataClosure = BeforeExampleWithMetadataClosure 24 | 25 | // MARK: Suite Hooks 26 | 27 | /** 28 | A closure executed before any examples are run. 29 | */ 30 | public typealias BeforeSuiteClosure = () -> () 31 | 32 | /** 33 | A closure executed after all examples have finished running. 34 | */ 35 | public typealias AfterSuiteClosure = BeforeSuiteClosure 36 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/ObjCBeCloseToTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeCloseToTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeCloseToTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@1.2).to(beCloseTo(@1.2001)); 12 | expect(@1.2).to(beCloseTo(@2).within(10)); 13 | expect(@2).toNot(beCloseTo(@1)); 14 | expect(@1.00001).toNot(beCloseTo(@1).within(0.00000001)); 15 | } 16 | 17 | - (void)testNegativeMatches { 18 | expectFailureMessage(@"expected to be close to <0.0000> (within 0.0010), got <1.0000>", ^{ 19 | expect(@1).to(beCloseTo(@0)); 20 | }); 21 | expectFailureMessage(@"expected to not be close to <0.0000> (within 0.0010), got <0.0001>", ^{ 22 | expect(@(0.0001)).toNot(beCloseTo(@0)); 23 | }); 24 | } 25 | 26 | - (void)testNilMatches { 27 | expectNilFailureMessage(@"expected to be close to <0.0000> (within 0.0010), got ", ^{ 28 | expect(nil).to(beCloseTo(@0)); 29 | }); 30 | expectNilFailureMessage(@"expected to not be close to <0.0000> (within 0.0010), got ", ^{ 31 | expect(nil).toNot(beCloseTo(@0)); 32 | }); 33 | } 34 | 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/ObjCBeAnInstanceOfTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeAnInstanceOfTest : XCTestCase 5 | @end 6 | 7 | @implementation ObjCBeAnInstanceOfTest 8 | 9 | - (void)testPositiveMatches { 10 | NSNull *obj = [NSNull null]; 11 | expect(obj).to(beAnInstanceOf([NSNull class])); 12 | expect(@1).toNot(beAnInstanceOf([NSNull class])); 13 | } 14 | 15 | - (void)testNegativeMatches { 16 | expectFailureMessage(@"expected to be an instance of NSNull, got <__NSCFNumber instance>", ^{ 17 | expect(@1).to(beAnInstanceOf([NSNull class])); 18 | }); 19 | expectFailureMessage(@"expected to not be an instance of NSNull, got ", ^{ 20 | expect([NSNull null]).toNot(beAnInstanceOf([NSNull class])); 21 | }); 22 | } 23 | 24 | - (void)testNilMatches { 25 | expectNilFailureMessage(@"expected to be an instance of NSNull, got ", ^{ 26 | expect(nil).to(beAnInstanceOf([NSNull class])); 27 | }); 28 | 29 | expectNilFailureMessage(@"expected to not be an instance of NSNull, got ", ^{ 30 | expect(nil).toNot(beAnInstanceOf([NSNull class])); 31 | }); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/ObjCBeGreaterThanOrEqualToTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeGreaterThanOrEqualToTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeGreaterThanOrEqualToTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@2).to(beGreaterThanOrEqualTo(@2)); 12 | expect(@2).toNot(beGreaterThanOrEqualTo(@3)); 13 | } 14 | 15 | - (void)testNegativeMatches { 16 | expectFailureMessage(@"expected to be greater than or equal to <0.0000>, got <-1.0000>", ^{ 17 | expect(@(-1)).to(beGreaterThanOrEqualTo(@0)); 18 | }); 19 | expectFailureMessage(@"expected to not be greater than or equal to <1.0000>, got <2.0000>", ^{ 20 | expect(@2).toNot(beGreaterThanOrEqualTo(@(1))); 21 | }); 22 | } 23 | 24 | - (void)testNilMatches { 25 | expectNilFailureMessage(@"expected to be greater than or equal to <-1.0000>, got ", ^{ 26 | expect(nil).to(beGreaterThanOrEqualTo(@(-1))); 27 | }); 28 | expectNilFailureMessage(@"expected to not be greater than or equal to <1.0000>, got ", ^{ 29 | expect(nil).toNot(beGreaterThanOrEqualTo(@(1))); 30 | }); 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble/Matchers/BeIdenticalTo.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | /// A Nimble matcher that succeeds when the actual value is the same instance 5 | /// as the expected instance. 6 | public func beIdenticalTo(expected: T?) -> NonNilMatcherFunc { 7 | return NonNilMatcherFunc { actualExpression, failureMessage in 8 | let actual = try actualExpression.evaluate() 9 | failureMessage.actualValue = "\(identityAsString(actual))" 10 | failureMessage.postfixMessage = "be identical to \(identityAsString(expected))" 11 | return actual === expected && actual !== nil 12 | } 13 | } 14 | 15 | public func ===(lhs: Expectation, rhs: T?) { 16 | lhs.to(beIdenticalTo(rhs)) 17 | } 18 | public func !==(lhs: Expectation, rhs: T?) { 19 | lhs.toNot(beIdenticalTo(rhs)) 20 | } 21 | 22 | extension NMBObjCMatcher { 23 | public class func beIdenticalToMatcher(expected: NSObject?) -> NMBObjCMatcher { 24 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 25 | return try! beIdenticalTo(expected).matches(actualExpression, failureMessage: failureMessage) 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/ObjCEndWithTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCEndWithTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCEndWithTest 9 | 10 | - (void)testPositiveMatches { 11 | NSArray *array = @[@1, @2]; 12 | expect(@"hello world!").to(endWith(@"world!")); 13 | expect(@"hello world!").toNot(endWith(@"hello")); 14 | expect(array).to(endWith(@2)); 15 | expect(array).toNot(endWith(@1)); 16 | expect(@1).toNot(contain(@"foo")); 17 | } 18 | 19 | - (void)testNegativeMatches { 20 | expectFailureMessage(@"expected to end with , got ", ^{ 21 | expect(@"hello world!").to(endWith(@"?")); 22 | }); 23 | expectFailureMessage(@"expected to not end with , got ", ^{ 24 | expect(@"hello world!").toNot(endWith(@"!")); 25 | }); 26 | } 27 | 28 | - (void)testNilMatches { 29 | expectNilFailureMessage(@"expected to end with <1>, got ", ^{ 30 | expect(nil).to(endWith(@1)); 31 | }); 32 | expectNilFailureMessage(@"expected to not end with <1>, got ", ^{ 33 | expect(nil).toNot(endWith(@1)); 34 | }); 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/ObjCBeCloseToTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeCloseToTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeCloseToTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@1.2).to(beCloseTo(@1.2001)); 12 | expect(@1.2).to(beCloseTo(@2).within(10)); 13 | expect(@2).toNot(beCloseTo(@1)); 14 | expect(@1.00001).toNot(beCloseTo(@1).within(0.00000001)); 15 | } 16 | 17 | - (void)testNegativeMatches { 18 | expectFailureMessage(@"expected to be close to <0.0000> (within 0.0010), got <1.0000>", ^{ 19 | expect(@1).to(beCloseTo(@0)); 20 | }); 21 | expectFailureMessage(@"expected to not be close to <0.0000> (within 0.0010), got <0.0001>", ^{ 22 | expect(@(0.0001)).toNot(beCloseTo(@0)); 23 | }); 24 | } 25 | 26 | - (void)testNilMatches { 27 | expectNilFailureMessage(@"expected to be close to <0.0000> (within 0.0010), got ", ^{ 28 | expect(nil).to(beCloseTo(@0)); 29 | }); 30 | expectNilFailureMessage(@"expected to not be close to <0.0000> (within 0.0010), got ", ^{ 31 | expect(nil).toNot(beCloseTo(@0)); 32 | }); 33 | } 34 | 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/ObjCBeAnInstanceOfTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeAnInstanceOfTest : XCTestCase 5 | @end 6 | 7 | @implementation ObjCBeAnInstanceOfTest 8 | 9 | - (void)testPositiveMatches { 10 | NSNull *obj = [NSNull null]; 11 | expect(obj).to(beAnInstanceOf([NSNull class])); 12 | expect(@1).toNot(beAnInstanceOf([NSNull class])); 13 | } 14 | 15 | - (void)testNegativeMatches { 16 | expectFailureMessage(@"expected to be an instance of NSNull, got <__NSCFNumber instance>", ^{ 17 | expect(@1).to(beAnInstanceOf([NSNull class])); 18 | }); 19 | expectFailureMessage(@"expected to not be an instance of NSNull, got ", ^{ 20 | expect([NSNull null]).toNot(beAnInstanceOf([NSNull class])); 21 | }); 22 | } 23 | 24 | - (void)testNilMatches { 25 | expectNilFailureMessage(@"expected to be an instance of NSNull, got ", ^{ 26 | expect(nil).to(beAnInstanceOf([NSNull class])); 27 | }); 28 | 29 | expectNilFailureMessage(@"expected to not be an instance of NSNull, got ", ^{ 30 | expect(nil).toNot(beAnInstanceOf([NSNull class])); 31 | }); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/Nimble/Matchers/BeIdenticalTo.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | /// A Nimble matcher that succeeds when the actual value is the same instance 5 | /// as the expected instance. 6 | public func beIdenticalTo(expected: T?) -> NonNilMatcherFunc { 7 | return NonNilMatcherFunc { actualExpression, failureMessage in 8 | let actual = try actualExpression.evaluate() 9 | failureMessage.actualValue = "\(identityAsString(actual))" 10 | failureMessage.postfixMessage = "be identical to \(identityAsString(expected))" 11 | return actual === expected && actual !== nil 12 | } 13 | } 14 | 15 | public func ===(lhs: Expectation, rhs: T?) { 16 | lhs.to(beIdenticalTo(rhs)) 17 | } 18 | public func !==(lhs: Expectation, rhs: T?) { 19 | lhs.toNot(beIdenticalTo(rhs)) 20 | } 21 | 22 | extension NMBObjCMatcher { 23 | public class func beIdenticalToMatcher(expected: NSObject?) -> NMBObjCMatcher { 24 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 25 | return try! beIdenticalTo(expected).matches(actualExpression, failureMessage: failureMessage) 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/Matchers/MatchTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | class MatchTest:XCTestCase { 5 | func testMatchPositive() { 6 | expect("11:14").to(match("\\d{2}:\\d{2}")) 7 | } 8 | 9 | func testMatchNegative() { 10 | expect("hello").toNot(match("\\d{2}:\\d{2}")) 11 | } 12 | 13 | func testMatchPositiveMessage() { 14 | let message = "expected to match <\\d{2}:\\d{2}>, got " 15 | failsWithErrorMessage(message) { 16 | expect("hello").to(match("\\d{2}:\\d{2}")) 17 | } 18 | } 19 | 20 | func testMatchNegativeMessage() { 21 | let message = "expected to not match <\\d{2}:\\d{2}>, got <11:14>" 22 | failsWithErrorMessage(message) { 23 | expect("11:14").toNot(match("\\d{2}:\\d{2}")) 24 | } 25 | } 26 | 27 | func testMatchNils() { 28 | failsWithErrorMessageForNil("expected to match <\\d{2}:\\d{2}>, got ") { 29 | expect(nil as String?).to(match("\\d{2}:\\d{2}")) 30 | } 31 | 32 | failsWithErrorMessageForNil("expected to not match <\\d{2}:\\d{2}>, got ") { 33 | expect(nil as String?).toNot(match("\\d{2}:\\d{2}")) 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickTests/FunctionalTests/AfterSuiteTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Quick 3 | import Nimble 4 | 5 | var afterSuiteWasExecuted = false 6 | 7 | class FunctionalTests_AfterSuite_AfterSuiteSpec: QuickSpec { 8 | override func spec() { 9 | afterSuite { 10 | afterSuiteWasExecuted = true 11 | } 12 | } 13 | } 14 | 15 | class FunctionalTests_AfterSuite_Spec: QuickSpec { 16 | override func spec() { 17 | it("is executed before afterSuite") { 18 | expect(afterSuiteWasExecuted).to(beFalsy()) 19 | } 20 | } 21 | } 22 | 23 | class AfterSuiteTests: XCTestCase { 24 | func testAfterSuiteIsNotExecutedBeforeAnyExamples() { 25 | // Execute the spec with an assertion after the one with an afterSuite. 26 | let specs = NSArray(objects: FunctionalTests_AfterSuite_AfterSuiteSpec.classForCoder(), 27 | FunctionalTests_AfterSuite_Spec.classForCoder()) 28 | let result = qck_runSpecs(specs as [AnyObject]) 29 | 30 | // Although this ensures that afterSuite is not called before any 31 | // examples, it doesn't test that it's ever called in the first place. 32 | XCTAssert(result.hasSucceeded) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Carthage/Build/iOS/Quick.framework/Headers/QuickConfiguration.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class Configuration; 4 | 5 | /** 6 | Subclass QuickConfiguration and override the +[QuickConfiguration configure:] 7 | method in order to configure how Quick behaves when running specs, or to define 8 | shared examples that are used across spec files. 9 | */ 10 | @interface QuickConfiguration : NSObject 11 | 12 | /** 13 | This method is executed on each subclass of this class before Quick runs 14 | any examples. You may override this method on as many subclasses as you like, but 15 | there is no guarantee as to the order in which these methods are executed. 16 | 17 | You can override this method in order to: 18 | 19 | 1. Configure how Quick behaves, by modifying properties on the Configuration object. 20 | Setting the same properties in several methods has undefined behavior. 21 | 22 | 2. Define shared examples using `sharedExamples`. 23 | 24 | @param configuration A mutable object that is used to configure how Quick behaves on 25 | a framework level. For details on all the options, see the 26 | documentation in Configuration.swift. 27 | */ 28 | + (void)configure:(Configuration *)configuration; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/Matchers/MatchTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | class MatchTest:XCTestCase { 5 | func testMatchPositive() { 6 | expect("11:14").to(match("\\d{2}:\\d{2}")) 7 | } 8 | 9 | func testMatchNegative() { 10 | expect("hello").toNot(match("\\d{2}:\\d{2}")) 11 | } 12 | 13 | func testMatchPositiveMessage() { 14 | let message = "expected to match <\\d{2}:\\d{2}>, got " 15 | failsWithErrorMessage(message) { 16 | expect("hello").to(match("\\d{2}:\\d{2}")) 17 | } 18 | } 19 | 20 | func testMatchNegativeMessage() { 21 | let message = "expected to not match <\\d{2}:\\d{2}>, got <11:14>" 22 | failsWithErrorMessage(message) { 23 | expect("11:14").toNot(match("\\d{2}:\\d{2}")) 24 | } 25 | } 26 | 27 | func testMatchNils() { 28 | failsWithErrorMessageForNil("expected to match <\\d{2}:\\d{2}>, got ") { 29 | expect(nil as String?).to(match("\\d{2}:\\d{2}")) 30 | } 31 | 32 | failsWithErrorMessageForNil("expected to not match <\\d{2}:\\d{2}>, got ") { 33 | expect(nil as String?).toNot(match("\\d{2}:\\d{2}")) 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Quick/Configuration/QuickConfiguration.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class Configuration; 4 | 5 | /** 6 | Subclass QuickConfiguration and override the +[QuickConfiguration configure:] 7 | method in order to configure how Quick behaves when running specs, or to define 8 | shared examples that are used across spec files. 9 | */ 10 | @interface QuickConfiguration : NSObject 11 | 12 | /** 13 | This method is executed on each subclass of this class before Quick runs 14 | any examples. You may override this method on as many subclasses as you like, but 15 | there is no guarantee as to the order in which these methods are executed. 16 | 17 | You can override this method in order to: 18 | 19 | 1. Configure how Quick behaves, by modifying properties on the Configuration object. 20 | Setting the same properties in several methods has undefined behavior. 21 | 22 | 2. Define shared examples using `sharedExamples`. 23 | 24 | @param configuration A mutable object that is used to configure how Quick behaves on 25 | a framework level. For details on all the options, see the 26 | documentation in Configuration.swift. 27 | */ 28 | + (void)configure:(Configuration *)configuration; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/ObjCBeIdenticalToTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeIdenticalToTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeIdenticalToTest 9 | 10 | - (void)testPositiveMatches { 11 | NSNull *obj = [NSNull null]; 12 | expect(obj).to(beIdenticalTo([NSNull null])); 13 | expect(@2).toNot(beIdenticalTo(@3)); 14 | } 15 | 16 | - (void)testNegativeMatches { 17 | NSNull *obj = [NSNull null]; 18 | expectFailureMessage(([NSString stringWithFormat:@"expected to be identical to <%p>, got <%p>", obj, @2]), ^{ 19 | expect(@2).to(beIdenticalTo(obj)); 20 | }); 21 | expectFailureMessage(([NSString stringWithFormat:@"expected to not be identical to <%p>, got <%p>", obj, obj]), ^{ 22 | expect(obj).toNot(beIdenticalTo(obj)); 23 | }); 24 | } 25 | 26 | - (void)testNilMatches { 27 | NSNull *obj = [NSNull null]; 28 | expectNilFailureMessage(@"expected to be identical to nil, got nil", ^{ 29 | expect(nil).to(beIdenticalTo(nil)); 30 | }); 31 | expectNilFailureMessage(([NSString stringWithFormat:@"expected to not be identical to <%p>, got nil", obj]), ^{ 32 | expect(nil).toNot(beIdenticalTo(obj)); 33 | }); 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Carthage/Build/Mac/Quick.framework/Versions/A/Headers/QuickConfiguration.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class Configuration; 4 | 5 | /** 6 | Subclass QuickConfiguration and override the +[QuickConfiguration configure:] 7 | method in order to configure how Quick behaves when running specs, or to define 8 | shared examples that are used across spec files. 9 | */ 10 | @interface QuickConfiguration : NSObject 11 | 12 | /** 13 | This method is executed on each subclass of this class before Quick runs 14 | any examples. You may override this method on as many subclasses as you like, but 15 | there is no guarantee as to the order in which these methods are executed. 16 | 17 | You can override this method in order to: 18 | 19 | 1. Configure how Quick behaves, by modifying properties on the Configuration object. 20 | Setting the same properties in several methods has undefined behavior. 21 | 22 | 2. Define shared examples using `sharedExamples`. 23 | 24 | @param configuration A mutable object that is used to configure how Quick behaves on 25 | a framework level. For details on all the options, see the 26 | documentation in Configuration.swift. 27 | */ 28 | + (void)configure:(Configuration *)configuration; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickTests/Helpers/QCKSpecRunner.m: -------------------------------------------------------------------------------- 1 | #import "QCKSpecRunner.h" 2 | #import "XCTestObservationCenter+QCKSuspendObservation.h" 3 | #import "World.h" 4 | #import 5 | 6 | XCTestRun *qck_runSuite(XCTestSuite *suite) { 7 | [World sharedWorld].isRunningAdditionalSuites = YES; 8 | 9 | __block XCTestRun *result = nil; 10 | [[XCTestObservationCenter sharedTestObservationCenter] _suspendObservationForBlock:^{ 11 | if ([suite respondsToSelector:@selector(runTest)]) { 12 | [suite runTest]; 13 | result = suite.testRun; 14 | } else { 15 | #pragma clang diagnostic push 16 | #pragma clang diagnostic ignored "-Wdeprecated-declarations" 17 | result = [suite run]; 18 | #pragma clang diagnostic pop 19 | } 20 | }]; 21 | return result; 22 | } 23 | 24 | XCTestRun *qck_runSpec(Class specClass) { 25 | return qck_runSuite([XCTestSuite testSuiteForTestCaseClass:specClass]); 26 | } 27 | 28 | XCTestRun *qck_runSpecs(NSArray *specClasses) { 29 | XCTestSuite *suite = [XCTestSuite testSuiteWithName:@"MySpecs"]; 30 | for (Class specClass in specClasses) { 31 | [suite addTest:[XCTestSuite testSuiteForTestCaseClass:specClass]]; 32 | } 33 | 34 | return qck_runSuite(suite); 35 | } 36 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickTests/FunctionalTests/AfterSuiteTests+ObjC.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | 5 | #import "QCKSpecRunner.h" 6 | 7 | static BOOL afterSuiteWasExecuted = NO; 8 | 9 | QuickSpecBegin(FunctionalTests_AfterSuite_AfterSuiteSpec_ObjC) 10 | 11 | afterSuite(^{ 12 | afterSuiteWasExecuted = YES; 13 | }); 14 | 15 | QuickSpecEnd 16 | 17 | QuickSpecBegin(FunctionalTests_AfterSuite_Spec_ObjC) 18 | 19 | it(@"is executed before afterSuite", ^{ 20 | expect(@(afterSuiteWasExecuted)).to(beFalsy()); 21 | }); 22 | 23 | QuickSpecEnd 24 | 25 | @interface AfterSuiteTests_ObjC : XCTestCase; @end 26 | 27 | @implementation AfterSuiteTests_ObjC 28 | 29 | - (void)testAfterSuiteIsNotExecutedBeforeAnyExamples { 30 | // Execute the spec with an assertion after the one with an afterSuite. 31 | NSArray *specs = @[ 32 | [FunctionalTests_AfterSuite_AfterSuiteSpec_ObjC class], 33 | [FunctionalTests_AfterSuite_Spec_ObjC class] 34 | ]; 35 | XCTestRun *result = qck_runSpecs(specs); 36 | 37 | // Although this ensures that afterSuite is not called before any 38 | // examples, it doesn't test that it's ever called in the first place. 39 | XCTAssert(result.hasSucceeded); 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/ObjCBeIdenticalToTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeIdenticalToTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeIdenticalToTest 9 | 10 | - (void)testPositiveMatches { 11 | NSNull *obj = [NSNull null]; 12 | expect(obj).to(beIdenticalTo([NSNull null])); 13 | expect(@2).toNot(beIdenticalTo(@3)); 14 | } 15 | 16 | - (void)testNegativeMatches { 17 | NSNull *obj = [NSNull null]; 18 | expectFailureMessage(([NSString stringWithFormat:@"expected to be identical to <%p>, got <%p>", obj, @2]), ^{ 19 | expect(@2).to(beIdenticalTo(obj)); 20 | }); 21 | expectFailureMessage(([NSString stringWithFormat:@"expected to not be identical to <%p>, got <%p>", obj, obj]), ^{ 22 | expect(obj).toNot(beIdenticalTo(obj)); 23 | }); 24 | } 25 | 26 | - (void)testNilMatches { 27 | NSNull *obj = [NSNull null]; 28 | expectNilFailureMessage(@"expected to be identical to nil, got nil", ^{ 29 | expect(nil).to(beIdenticalTo(nil)); 30 | }); 31 | expectNilFailureMessage(([NSString stringWithFormat:@"expected to not be identical to <%p>, got nil", obj]), ^{ 32 | expect(nil).toNot(beIdenticalTo(obj)); 33 | }); 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Quick/Hooks/ExampleHooks.swift: -------------------------------------------------------------------------------- 1 | /** 2 | A container for closures to be executed before and after each example. 3 | */ 4 | final internal class ExampleHooks { 5 | 6 | internal var befores: [BeforeExampleWithMetadataClosure] = [] 7 | internal var afters: [AfterExampleWithMetadataClosure] = [] 8 | 9 | internal func appendBefore(closure: BeforeExampleWithMetadataClosure) { 10 | befores.append(closure) 11 | } 12 | 13 | internal func appendBefore(closure: BeforeExampleClosure) { 14 | befores.append { (exampleMetadata: ExampleMetadata) in closure() } 15 | } 16 | 17 | internal func appendAfter(closure: AfterExampleWithMetadataClosure) { 18 | afters.append(closure) 19 | } 20 | 21 | internal func appendAfter(closure: AfterExampleClosure) { 22 | afters.append { (exampleMetadata: ExampleMetadata) in closure() } 23 | } 24 | 25 | internal func executeBefores(exampleMetadata: ExampleMetadata) { 26 | for before in befores { 27 | before(exampleMetadata: exampleMetadata) 28 | } 29 | } 30 | 31 | internal func executeAfters(exampleMetadata: ExampleMetadata) { 32 | for after in afters { 33 | after(exampleMetadata: exampleMetadata) 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/Matchers/BeGreaterThanTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | class BeGreaterThanTest: XCTestCase { 5 | func testGreaterThan() { 6 | expect(10).to(beGreaterThan(2)) 7 | expect(1).toNot(beGreaterThan(2)) 8 | expect(NSNumber(int:3)).to(beGreaterThan(2)) 9 | expect(NSNumber(int:1)).toNot(beGreaterThan(NSNumber(int:2))) 10 | 11 | failsWithErrorMessage("expected to be greater than <2>, got <0>") { 12 | expect(0).to(beGreaterThan(2)) 13 | } 14 | failsWithErrorMessage("expected to not be greater than <0>, got <1>") { 15 | expect(1).toNot(beGreaterThan(0)) 16 | } 17 | failsWithErrorMessageForNil("expected to be greater than <-2>, got ") { 18 | expect(nil as Int?).to(beGreaterThan(-2)) 19 | } 20 | failsWithErrorMessageForNil("expected to not be greater than <0>, got ") { 21 | expect(nil as Int?).toNot(beGreaterThan(0)) 22 | } 23 | } 24 | 25 | func testGreaterThanOperator() { 26 | expect(1) > 0 27 | expect(NSNumber(int:1)) > NSNumber(int:0) 28 | expect(NSNumber(int:1)) > 0 29 | 30 | failsWithErrorMessage("expected to be greater than <2.0000>, got <1.0000>") { 31 | expect(1) > 2 32 | return 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/Matchers/BeGreaterThanTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | class BeGreaterThanTest: XCTestCase { 5 | func testGreaterThan() { 6 | expect(10).to(beGreaterThan(2)) 7 | expect(1).toNot(beGreaterThan(2)) 8 | expect(NSNumber(int:3)).to(beGreaterThan(2)) 9 | expect(NSNumber(int:1)).toNot(beGreaterThan(NSNumber(int:2))) 10 | 11 | failsWithErrorMessage("expected to be greater than <2>, got <0>") { 12 | expect(0).to(beGreaterThan(2)) 13 | } 14 | failsWithErrorMessage("expected to not be greater than <0>, got <1>") { 15 | expect(1).toNot(beGreaterThan(0)) 16 | } 17 | failsWithErrorMessageForNil("expected to be greater than <-2>, got ") { 18 | expect(nil as Int?).to(beGreaterThan(-2)) 19 | } 20 | failsWithErrorMessageForNil("expected to not be greater than <0>, got ") { 21 | expect(nil as Int?).toNot(beGreaterThan(0)) 22 | } 23 | } 24 | 25 | func testGreaterThanOperator() { 26 | expect(1) > 0 27 | expect(NSNumber(int:1)) > NSNumber(int:0) 28 | expect(NSNumber(int:1)) > 0 29 | 30 | failsWithErrorMessage("expected to be greater than <2.0000>, got <1.0000>") { 31 | expect(1) > 2 32 | return 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/Matchers/BeLessThanTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | class BeLessThanTest: XCTestCase { 5 | 6 | func testLessThan() { 7 | expect(2).to(beLessThan(10)) 8 | expect(2).toNot(beLessThan(1)) 9 | expect(NSNumber(integer:2)).to(beLessThan(10)) 10 | expect(NSNumber(integer:2)).toNot(beLessThan(1)) 11 | 12 | expect(2).to(beLessThan(NSNumber(integer:10))) 13 | expect(2).toNot(beLessThan(NSNumber(integer:1))) 14 | 15 | failsWithErrorMessage("expected to be less than <0>, got <2>") { 16 | expect(2).to(beLessThan(0)) 17 | } 18 | failsWithErrorMessage("expected to not be less than <1>, got <0>") { 19 | expect(0).toNot(beLessThan(1)) 20 | } 21 | 22 | failsWithErrorMessageForNil("expected to be less than <2>, got ") { 23 | expect(nil as Int?).to(beLessThan(2)) 24 | } 25 | failsWithErrorMessageForNil("expected to not be less than <-1>, got ") { 26 | expect(nil as Int?).toNot(beLessThan(-1)) 27 | } 28 | } 29 | 30 | func testLessThanOperator() { 31 | expect(0) < 1 32 | expect(NSNumber(int:0)) < 1 33 | 34 | failsWithErrorMessage("expected to be less than <1.0000>, got <2.0000>") { 35 | expect(2) < 1 36 | return 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/Matchers/BeIdenticalToTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | class BeIdenticalToTest: XCTestCase { 5 | func testBeIdenticalToPositive() { 6 | expect(NSNumber(integer:1)).to(beIdenticalTo(NSNumber(integer:1))) 7 | } 8 | 9 | func testBeIdenticalToNegative() { 10 | expect(NSNumber(integer:1)).toNot(beIdenticalTo("yo")) 11 | expect([1]).toNot(beIdenticalTo([1])) 12 | } 13 | 14 | func testBeIdenticalToPositiveMessage() { 15 | let num1 = NSNumber(integer:1) 16 | let num2 = NSNumber(integer:2) 17 | let message = NSString(format: "expected to be identical to <%p>, got <%p>", num2, num1) 18 | failsWithErrorMessage(message.description) { 19 | expect(num1).to(beIdenticalTo(num2)) 20 | } 21 | } 22 | 23 | func testBeIdenticalToNegativeMessage() { 24 | let value1 = NSArray(array: []) 25 | let value2 = NSArray(array: []) 26 | let message = NSString(format: "expected to not be identical to <%p>, got <%p>", value2, value1) 27 | failsWithErrorMessage(message.description) { 28 | expect(value1).toNot(beIdenticalTo(value2)) 29 | } 30 | } 31 | 32 | func testOperators() { 33 | expect(NSNumber(integer:1)) === NSNumber(integer:1) 34 | expect(NSNumber(integer:1)) !== NSNumber(integer:2) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/Matchers/BeLessThanTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | class BeLessThanTest: XCTestCase { 5 | 6 | func testLessThan() { 7 | expect(2).to(beLessThan(10)) 8 | expect(2).toNot(beLessThan(1)) 9 | expect(NSNumber(integer:2)).to(beLessThan(10)) 10 | expect(NSNumber(integer:2)).toNot(beLessThan(1)) 11 | 12 | expect(2).to(beLessThan(NSNumber(integer:10))) 13 | expect(2).toNot(beLessThan(NSNumber(integer:1))) 14 | 15 | failsWithErrorMessage("expected to be less than <0>, got <2>") { 16 | expect(2).to(beLessThan(0)) 17 | } 18 | failsWithErrorMessage("expected to not be less than <1>, got <0>") { 19 | expect(0).toNot(beLessThan(1)) 20 | } 21 | 22 | failsWithErrorMessageForNil("expected to be less than <2>, got ") { 23 | expect(nil as Int?).to(beLessThan(2)) 24 | } 25 | failsWithErrorMessageForNil("expected to not be less than <-1>, got ") { 26 | expect(nil as Int?).toNot(beLessThan(-1)) 27 | } 28 | } 29 | 30 | func testLessThanOperator() { 31 | expect(0) < 1 32 | expect(NSNumber(int:0)) < 1 33 | 34 | failsWithErrorMessage("expected to be less than <1.0000>, got <2.0000>") { 35 | expect(2) < 1 36 | return 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/Matchers/BeIdenticalToTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | class BeIdenticalToTest: XCTestCase { 5 | func testBeIdenticalToPositive() { 6 | expect(NSNumber(integer:1)).to(beIdenticalTo(NSNumber(integer:1))) 7 | } 8 | 9 | func testBeIdenticalToNegative() { 10 | expect(NSNumber(integer:1)).toNot(beIdenticalTo("yo")) 11 | expect([1]).toNot(beIdenticalTo([1])) 12 | } 13 | 14 | func testBeIdenticalToPositiveMessage() { 15 | let num1 = NSNumber(integer:1) 16 | let num2 = NSNumber(integer:2) 17 | let message = NSString(format: "expected to be identical to <%p>, got <%p>", num2, num1) 18 | failsWithErrorMessage(message.description) { 19 | expect(num1).to(beIdenticalTo(num2)) 20 | } 21 | } 22 | 23 | func testBeIdenticalToNegativeMessage() { 24 | let value1 = NSArray(array: []) 25 | let value2 = NSArray(array: []) 26 | let message = NSString(format: "expected to not be identical to <%p>, got <%p>", value2, value1) 27 | failsWithErrorMessage(message.description) { 28 | expect(value1).toNot(beIdenticalTo(value2)) 29 | } 30 | } 31 | 32 | func testOperators() { 33 | expect(NSNumber(integer:1)) === NSNumber(integer:1) 34 | expect(NSNumber(integer:1)) !== NSNumber(integer:2) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Documentation/MoreResources.md: -------------------------------------------------------------------------------- 1 | # More Resources 2 | 3 | ## Examples of Quick Specs 4 | 5 | Quick is used by many companies, open-source projects, and individuals, 6 | including [GitHub](https://github.com/github) and 7 | [ReactiveCocoa](https://github.com/ReactiveCocoa). For examples, check out: 8 | 9 | - https://github.com/ReactiveCocoa/ReactiveCocoa 10 | - https://github.com/github/Archimedes 11 | - https://github.com/libgit2/objective-git 12 | - https://github.com/jspahrsummers/RXSwift 13 | - https://github.com/artsy/eidolon 14 | - https://github.com/AshFurrow/Moya 15 | - https://github.com/nerdyc/Squeal 16 | - https://github.com/pepibumur/SugarRecord 17 | 18 | ## More on Unit Testing for OS X and iOS Apps 19 | 20 | - **[Quality Coding](http://qualitycoding.org/)**: 21 | A blog on iOS development that focuses on unit testing. 22 | - **[OCMock Tutorials](http://ocmock.org/tutorials/)**: 23 | Use OCMock when you need "fake objects" in your tests. 24 | - **[Nocilla: Stunning HTTP stubbing for iOS and Mac OS X](https://github.com/luisobo/Nocilla)**: 25 | Use this library to test code that sends requests to, and receives responses from, the Internet. 26 | - **[Pivotal Labs: Writing Beautiful Specs with Jasmine Custom Matchers](http://pivotallabs.com/writing-beautiful-specs-jasmine-custom-matchers/)**: 27 | See [the Nimble documentation](https://github.com/Quick/Nimble) for instructions on how to write 28 | custom matchers in Nimble. 29 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble/DSL.swift: -------------------------------------------------------------------------------- 1 | /// Make an expectation on a given actual value. The value given is lazily evaluated. 2 | public func expect(@autoclosure(escaping) expression: () throws -> T?, file: String = __FILE__, line: UInt = __LINE__) -> Expectation { 3 | return Expectation( 4 | expression: Expression( 5 | expression: expression, 6 | location: SourceLocation(file: file, line: line), 7 | isClosure: true)) 8 | } 9 | 10 | /// Make an expectation on a given actual value. The closure is lazily invoked. 11 | public func expect(file: String = __FILE__, line: UInt = __LINE__, expression: () throws -> T?) -> Expectation { 12 | return Expectation( 13 | expression: Expression( 14 | expression: expression, 15 | location: SourceLocation(file: file, line: line), 16 | isClosure: true)) 17 | } 18 | 19 | /// Always fails the test with a message and a specified location. 20 | public func fail(message: String, location: SourceLocation) { 21 | NimbleAssertionHandler.assert(false, message: FailureMessage(stringValue: message), location: location) 22 | } 23 | 24 | /// Always fails the test with a message. 25 | public func fail(message: String, file: String = __FILE__, line: UInt = __LINE__) { 26 | fail(message, location: SourceLocation(file: file, line: line)) 27 | } 28 | 29 | /// Always fails the test. 30 | public func fail(file: String = __FILE__, line: UInt = __LINE__) { 31 | fail("fail() always fails", file: file, line: line) 32 | } 33 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/Nimble/DSL.swift: -------------------------------------------------------------------------------- 1 | /// Make an expectation on a given actual value. The value given is lazily evaluated. 2 | public func expect(@autoclosure(escaping) expression: () throws -> T?, file: String = __FILE__, line: UInt = __LINE__) -> Expectation { 3 | return Expectation( 4 | expression: Expression( 5 | expression: expression, 6 | location: SourceLocation(file: file, line: line), 7 | isClosure: true)) 8 | } 9 | 10 | /// Make an expectation on a given actual value. The closure is lazily invoked. 11 | public func expect(file: String = __FILE__, line: UInt = __LINE__, expression: () throws -> T?) -> Expectation { 12 | return Expectation( 13 | expression: Expression( 14 | expression: expression, 15 | location: SourceLocation(file: file, line: line), 16 | isClosure: true)) 17 | } 18 | 19 | /// Always fails the test with a message and a specified location. 20 | public func fail(message: String, location: SourceLocation) { 21 | NimbleAssertionHandler.assert(false, message: FailureMessage(stringValue: message), location: location) 22 | } 23 | 24 | /// Always fails the test with a message. 25 | public func fail(message: String, file: String = __FILE__, line: UInt = __LINE__) { 26 | fail(message, location: SourceLocation(file: file, line: line)) 27 | } 28 | 29 | /// Always fails the test. 30 | public func fail(file: String = __FILE__, line: UInt = __LINE__) { 31 | fail("fail() always fails", file: file, line: line) 32 | } 33 | -------------------------------------------------------------------------------- /Carthage/Build/Mac/Quick.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 15B42 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleExecutable 10 | Quick 11 | CFBundleIdentifier 12 | io.quick.Quick 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | Quick 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleSupportedPlatforms 24 | 25 | MacOSX 26 | 27 | CFBundleVersion 28 | 1 29 | DTCompiler 30 | com.apple.compilers.llvm.clang.1_0 31 | DTPlatformBuild 32 | 7B91b 33 | DTPlatformVersion 34 | GM 35 | DTSDKBuild 36 | 15A278 37 | DTSDKName 38 | macosx10.11 39 | DTXcode 40 | 0710 41 | DTXcodeBuild 42 | 7B91b 43 | NSHumanReadableCopyright 44 | Copyright © 2014 - present, Quick Team. All rights reserved. 45 | 46 | 47 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/ObjCAsyncTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "NimbleSpecHelper.h" 4 | 5 | @interface ObjCAsyncTest : XCTestCase 6 | 7 | @end 8 | 9 | @implementation ObjCAsyncTest 10 | 11 | - (void)testAsync { 12 | __block id obj = @1; 13 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 14 | obj = nil; 15 | }); 16 | expect(obj).toEventually(beNil()); 17 | } 18 | 19 | 20 | - (void)testAsyncWithCustomTimeout { 21 | __block id obj = nil; 22 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 23 | obj = @1; 24 | }); 25 | expect(obj).withTimeout(5).toEventuallyNot(beNil()); 26 | } 27 | 28 | - (void)testAsyncCallback { 29 | waitUntil(^(void (^done)(void)){ 30 | done(); 31 | }); 32 | 33 | expectFailureMessage(@"Waited more than 1.0 second", ^{ 34 | waitUntil(^(void (^done)(void)){ /* ... */ }); 35 | }); 36 | 37 | expectFailureMessage(@"Waited more than 0.01 seconds", ^{ 38 | waitUntilTimeout(0.01, ^(void (^done)(void)){ 39 | [NSThread sleepForTimeInterval:0.1]; 40 | done(); 41 | }); 42 | }); 43 | 44 | expectFailureMessage(@"expected to equal , got ", ^{ 45 | waitUntil(^(void (^done)(void)){ 46 | [NSThread sleepForTimeInterval:0.1]; 47 | expect(@"hello").to(equal(@"goodbye")); 48 | done(); 49 | }); 50 | }); 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/ObjCAsyncTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "NimbleSpecHelper.h" 4 | 5 | @interface ObjCAsyncTest : XCTestCase 6 | 7 | @end 8 | 9 | @implementation ObjCAsyncTest 10 | 11 | - (void)testAsync { 12 | __block id obj = @1; 13 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 14 | obj = nil; 15 | }); 16 | expect(obj).toEventually(beNil()); 17 | } 18 | 19 | 20 | - (void)testAsyncWithCustomTimeout { 21 | __block id obj = nil; 22 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 23 | obj = @1; 24 | }); 25 | expect(obj).withTimeout(5).toEventuallyNot(beNil()); 26 | } 27 | 28 | - (void)testAsyncCallback { 29 | waitUntil(^(void (^done)(void)){ 30 | done(); 31 | }); 32 | 33 | expectFailureMessage(@"Waited more than 1.0 second", ^{ 34 | waitUntil(^(void (^done)(void)){ /* ... */ }); 35 | }); 36 | 37 | expectFailureMessage(@"Waited more than 0.01 seconds", ^{ 38 | waitUntilTimeout(0.01, ^(void (^done)(void)){ 39 | [NSThread sleepForTimeInterval:0.1]; 40 | done(); 41 | }); 42 | }); 43 | 44 | expectFailureMessage(@"expected to equal , got ", ^{ 45 | waitUntil(^(void (^done)(void)){ 46 | [NSThread sleepForTimeInterval:0.1]; 47 | expect(@"hello").to(equal(@"goodbye")); 48 | done(); 49 | }); 50 | }); 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/Matchers/EndWithTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | class EndWithTest: XCTestCase { 5 | 6 | func testEndWithPositives() { 7 | expect([1, 2, 3]).to(endWith(3)) 8 | expect([1, 2, 3]).toNot(endWith(2)) 9 | 10 | expect("foobar").to(endWith("bar")) 11 | expect("foobar").toNot(endWith("oo")) 12 | 13 | expect(NSString(string: "foobar").description).to(endWith("bar")) 14 | expect(NSString(string: "foobar").description).toNot(endWith("oo")) 15 | 16 | expect(NSArray(array: ["a", "b"])).to(endWith("b")) 17 | expect(NSArray(array: ["a", "b"])).toNot(endWith("a")) 18 | } 19 | 20 | func testEndWithNegatives() { 21 | failsWithErrorMessageForNil("expected to end with <2>, got ") { 22 | expect(nil as [Int]?).to(endWith(2)) 23 | } 24 | failsWithErrorMessageForNil("expected to not end with <2>, got ") { 25 | expect(nil as [Int]?).toNot(endWith(2)) 26 | } 27 | 28 | failsWithErrorMessage("expected to end with <2>, got <[1, 2, 3]>") { 29 | expect([1, 2, 3]).to(endWith(2)) 30 | } 31 | failsWithErrorMessage("expected to not end with <3>, got <[1, 2, 3]>") { 32 | expect([1, 2, 3]).toNot(endWith(3)) 33 | } 34 | failsWithErrorMessage("expected to end with , got ") { 35 | expect("batman").to(endWith("atm")) 36 | } 37 | failsWithErrorMessage("expected to not end with , got ") { 38 | expect("batman").toNot(endWith("man")) 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/Matchers/HaveCountTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | class HaveCountTest: XCTestCase { 5 | func testHaveCountForArray() { 6 | expect([1, 2, 3]).to(haveCount(3)) 7 | expect([1, 2, 3]).notTo(haveCount(1)) 8 | 9 | failsWithErrorMessage("expected to have [1, 2, 3] with count 1, got 3") { 10 | expect([1, 2, 3]).to(haveCount(1)) 11 | } 12 | 13 | failsWithErrorMessage("expected to not have [1, 2, 3] with count 3, got 3") { 14 | expect([1, 2, 3]).notTo(haveCount(3)) 15 | } 16 | } 17 | 18 | func testHaveCountForDictionary() { 19 | expect(["1":1, "2":2, "3":3]).to(haveCount(3)) 20 | expect(["1":1, "2":2, "3":3]).notTo(haveCount(1)) 21 | 22 | failsWithErrorMessage("expected to have [\"2\": 2, \"1\": 1, \"3\": 3] with count 1, got 3") { 23 | expect(["1":1, "2":2, "3":3]).to(haveCount(1)) 24 | } 25 | 26 | failsWithErrorMessage("expected to not have [\"2\": 2, \"1\": 1, \"3\": 3] with count 3, got 3") { 27 | expect(["1":1, "2":2, "3":3]).notTo(haveCount(3)) 28 | } 29 | } 30 | 31 | func testHaveCountForSet() { 32 | expect(Set([1, 2, 3])).to(haveCount(3)) 33 | expect(Set([1, 2, 3])).notTo(haveCount(1)) 34 | 35 | failsWithErrorMessage("expected to have [2, 3, 1] with count 1, got 3") { 36 | expect(Set([1, 2, 3])).to(haveCount(1)) 37 | } 38 | 39 | failsWithErrorMessage("expected to not have [2, 3, 1] with count 3, got 3") { 40 | expect(Set([1, 2, 3])).notTo(haveCount(3)) 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/Matchers/EndWithTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | class EndWithTest: XCTestCase { 5 | 6 | func testEndWithPositives() { 7 | expect([1, 2, 3]).to(endWith(3)) 8 | expect([1, 2, 3]).toNot(endWith(2)) 9 | 10 | expect("foobar").to(endWith("bar")) 11 | expect("foobar").toNot(endWith("oo")) 12 | 13 | expect(NSString(string: "foobar").description).to(endWith("bar")) 14 | expect(NSString(string: "foobar").description).toNot(endWith("oo")) 15 | 16 | expect(NSArray(array: ["a", "b"])).to(endWith("b")) 17 | expect(NSArray(array: ["a", "b"])).toNot(endWith("a")) 18 | } 19 | 20 | func testEndWithNegatives() { 21 | failsWithErrorMessageForNil("expected to end with <2>, got ") { 22 | expect(nil as [Int]?).to(endWith(2)) 23 | } 24 | failsWithErrorMessageForNil("expected to not end with <2>, got ") { 25 | expect(nil as [Int]?).toNot(endWith(2)) 26 | } 27 | 28 | failsWithErrorMessage("expected to end with <2>, got <[1, 2, 3]>") { 29 | expect([1, 2, 3]).to(endWith(2)) 30 | } 31 | failsWithErrorMessage("expected to not end with <3>, got <[1, 2, 3]>") { 32 | expect([1, 2, 3]).toNot(endWith(3)) 33 | } 34 | failsWithErrorMessage("expected to end with , got ") { 35 | expect("batman").to(endWith("atm")) 36 | } 37 | failsWithErrorMessage("expected to not end with , got ") { 38 | expect("batman").toNot(endWith("man")) 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/Matchers/BeLessThanOrEqualToTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | class BeLessThanOrEqualToTest: XCTestCase { 5 | func testLessThanOrEqualTo() { 6 | expect(10).to(beLessThanOrEqualTo(10)) 7 | expect(2).to(beLessThanOrEqualTo(10)) 8 | expect(2).toNot(beLessThanOrEqualTo(1)) 9 | 10 | expect(NSNumber(int:2)).to(beLessThanOrEqualTo(10)) 11 | expect(NSNumber(int:2)).toNot(beLessThanOrEqualTo(1)) 12 | expect(2).to(beLessThanOrEqualTo(NSNumber(int:10))) 13 | expect(2).toNot(beLessThanOrEqualTo(NSNumber(int:1))) 14 | 15 | failsWithErrorMessage("expected to be less than or equal to <0>, got <2>") { 16 | expect(2).to(beLessThanOrEqualTo(0)) 17 | return 18 | } 19 | failsWithErrorMessage("expected to not be less than or equal to <0>, got <0>") { 20 | expect(0).toNot(beLessThanOrEqualTo(0)) 21 | return 22 | } 23 | failsWithErrorMessageForNil("expected to be less than or equal to <2>, got ") { 24 | expect(nil as Int?).to(beLessThanOrEqualTo(2)) 25 | return 26 | } 27 | failsWithErrorMessageForNil("expected to not be less than or equal to <-2>, got ") { 28 | expect(nil as Int?).toNot(beLessThanOrEqualTo(-2)) 29 | return 30 | } 31 | } 32 | 33 | func testLessThanOrEqualToOperator() { 34 | expect(0) <= 1 35 | expect(1) <= 1 36 | 37 | failsWithErrorMessage("expected to be less than or equal to <1>, got <2>") { 38 | expect(2) <= 1 39 | return 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/Matchers/HaveCountTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | class HaveCountTest: XCTestCase { 5 | func testHaveCountForArray() { 6 | expect([1, 2, 3]).to(haveCount(3)) 7 | expect([1, 2, 3]).notTo(haveCount(1)) 8 | 9 | failsWithErrorMessage("expected to have [1, 2, 3] with count 1, got 3") { 10 | expect([1, 2, 3]).to(haveCount(1)) 11 | } 12 | 13 | failsWithErrorMessage("expected to not have [1, 2, 3] with count 3, got 3") { 14 | expect([1, 2, 3]).notTo(haveCount(3)) 15 | } 16 | } 17 | 18 | func testHaveCountForDictionary() { 19 | expect(["1":1, "2":2, "3":3]).to(haveCount(3)) 20 | expect(["1":1, "2":2, "3":3]).notTo(haveCount(1)) 21 | 22 | failsWithErrorMessage("expected to have [\"2\": 2, \"1\": 1, \"3\": 3] with count 1, got 3") { 23 | expect(["1":1, "2":2, "3":3]).to(haveCount(1)) 24 | } 25 | 26 | failsWithErrorMessage("expected to not have [\"2\": 2, \"1\": 1, \"3\": 3] with count 3, got 3") { 27 | expect(["1":1, "2":2, "3":3]).notTo(haveCount(3)) 28 | } 29 | } 30 | 31 | func testHaveCountForSet() { 32 | expect(Set([1, 2, 3])).to(haveCount(3)) 33 | expect(Set([1, 2, 3])).notTo(haveCount(1)) 34 | 35 | failsWithErrorMessage("expected to have [2, 3, 1] with count 1, got 3") { 36 | expect(Set([1, 2, 3])).to(haveCount(1)) 37 | } 38 | 39 | failsWithErrorMessage("expected to not have [2, 3, 1] with count 3, got 3") { 40 | expect(Set([1, 2, 3])).notTo(haveCount(3)) 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble.xcodeproj/project.xcworkspace/xcshareddata/Nimble.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 3C7A95C5-450E-4971-8DC4-2613B2BA4376 9 | IDESourceControlProjectName 10 | Nimble 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 95438028B10BBB846574013D29F154A00556A9D1 14 | github.com:Quick/Nimble 15 | 16 | IDESourceControlProjectPath 17 | Nimble.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 95438028B10BBB846574013D29F154A00556A9D1 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | github.com:Quick/Nimble 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 95438028B10BBB846574013D29F154A00556A9D1 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 95438028B10BBB846574013D29F154A00556A9D1 36 | IDESourceControlWCCName 37 | Nimble 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/Matchers/BeginWithTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | class BeginWithTest: XCTestCase { 5 | 6 | func testPositiveMatches() { 7 | expect([1, 2, 3]).to(beginWith(1)) 8 | expect([1, 2, 3]).toNot(beginWith(2)) 9 | 10 | expect("foobar").to(beginWith("foo")) 11 | expect("foobar").toNot(beginWith("oo")) 12 | 13 | expect(NSString(string: "foobar").description).to(beginWith("foo")) 14 | expect(NSString(string: "foobar").description).toNot(beginWith("oo")) 15 | 16 | expect(NSArray(array: ["a", "b"])).to(beginWith("a")) 17 | expect(NSArray(array: ["a", "b"])).toNot(beginWith("b")) 18 | } 19 | 20 | func testNegativeMatches() { 21 | failsWithErrorMessageForNil("expected to begin with , got ") { 22 | expect(nil as NSArray?).to(beginWith("b")) 23 | } 24 | failsWithErrorMessageForNil("expected to not begin with , got ") { 25 | expect(nil as NSArray?).toNot(beginWith("b")) 26 | } 27 | 28 | failsWithErrorMessage("expected to begin with <2>, got <[1, 2, 3]>") { 29 | expect([1, 2, 3]).to(beginWith(2)) 30 | } 31 | failsWithErrorMessage("expected to not begin with <1>, got <[1, 2, 3]>") { 32 | expect([1, 2, 3]).toNot(beginWith(1)) 33 | } 34 | failsWithErrorMessage("expected to begin with , got ") { 35 | expect("batman").to(beginWith("atm")) 36 | } 37 | failsWithErrorMessage("expected to not begin with , got ") { 38 | expect("batman").toNot(beginWith("bat")) 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/Matchers/BeLessThanOrEqualToTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | class BeLessThanOrEqualToTest: XCTestCase { 5 | func testLessThanOrEqualTo() { 6 | expect(10).to(beLessThanOrEqualTo(10)) 7 | expect(2).to(beLessThanOrEqualTo(10)) 8 | expect(2).toNot(beLessThanOrEqualTo(1)) 9 | 10 | expect(NSNumber(int:2)).to(beLessThanOrEqualTo(10)) 11 | expect(NSNumber(int:2)).toNot(beLessThanOrEqualTo(1)) 12 | expect(2).to(beLessThanOrEqualTo(NSNumber(int:10))) 13 | expect(2).toNot(beLessThanOrEqualTo(NSNumber(int:1))) 14 | 15 | failsWithErrorMessage("expected to be less than or equal to <0>, got <2>") { 16 | expect(2).to(beLessThanOrEqualTo(0)) 17 | return 18 | } 19 | failsWithErrorMessage("expected to not be less than or equal to <0>, got <0>") { 20 | expect(0).toNot(beLessThanOrEqualTo(0)) 21 | return 22 | } 23 | failsWithErrorMessageForNil("expected to be less than or equal to <2>, got ") { 24 | expect(nil as Int?).to(beLessThanOrEqualTo(2)) 25 | return 26 | } 27 | failsWithErrorMessageForNil("expected to not be less than or equal to <-2>, got ") { 28 | expect(nil as Int?).toNot(beLessThanOrEqualTo(-2)) 29 | return 30 | } 31 | } 32 | 33 | func testLessThanOrEqualToOperator() { 34 | expect(0) <= 1 35 | expect(1) <= 1 36 | 37 | failsWithErrorMessage("expected to be less than or equal to <1>, got <2>") { 38 | expect(2) <= 1 39 | return 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/Matchers/BeginWithTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | class BeginWithTest: XCTestCase { 5 | 6 | func testPositiveMatches() { 7 | expect([1, 2, 3]).to(beginWith(1)) 8 | expect([1, 2, 3]).toNot(beginWith(2)) 9 | 10 | expect("foobar").to(beginWith("foo")) 11 | expect("foobar").toNot(beginWith("oo")) 12 | 13 | expect(NSString(string: "foobar").description).to(beginWith("foo")) 14 | expect(NSString(string: "foobar").description).toNot(beginWith("oo")) 15 | 16 | expect(NSArray(array: ["a", "b"])).to(beginWith("a")) 17 | expect(NSArray(array: ["a", "b"])).toNot(beginWith("b")) 18 | } 19 | 20 | func testNegativeMatches() { 21 | failsWithErrorMessageForNil("expected to begin with , got ") { 22 | expect(nil as NSArray?).to(beginWith("b")) 23 | } 24 | failsWithErrorMessageForNil("expected to not begin with , got ") { 25 | expect(nil as NSArray?).toNot(beginWith("b")) 26 | } 27 | 28 | failsWithErrorMessage("expected to begin with <2>, got <[1, 2, 3]>") { 29 | expect([1, 2, 3]).to(beginWith(2)) 30 | } 31 | failsWithErrorMessage("expected to not begin with <1>, got <[1, 2, 3]>") { 32 | expect([1, 2, 3]).toNot(beginWith(1)) 33 | } 34 | failsWithErrorMessage("expected to begin with , got ") { 35 | expect("batman").to(beginWith("atm")) 36 | } 37 | failsWithErrorMessage("expected to not begin with , got ") { 38 | expect("batman").toNot(beginWith("bat")) 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble/Matchers/BeLessThan.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is less than the expected value. 4 | public func beLessThan(expectedValue: T?) -> NonNilMatcherFunc { 5 | return NonNilMatcherFunc { actualExpression, failureMessage in 6 | failureMessage.postfixMessage = "be less than <\(stringify(expectedValue))>" 7 | return try actualExpression.evaluate() < expectedValue 8 | } 9 | } 10 | 11 | /// A Nimble matcher that succeeds when the actual value is less than the expected value. 12 | public func beLessThan(expectedValue: NMBComparable?) -> NonNilMatcherFunc { 13 | return NonNilMatcherFunc { actualExpression, failureMessage in 14 | failureMessage.postfixMessage = "be less than <\(stringify(expectedValue))>" 15 | let actualValue = try actualExpression.evaluate() 16 | let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == NSComparisonResult.OrderedAscending 17 | return matches 18 | } 19 | } 20 | 21 | public func <(lhs: Expectation, rhs: T) { 22 | lhs.to(beLessThan(rhs)) 23 | } 24 | 25 | public func <(lhs: Expectation, rhs: NMBComparable?) { 26 | lhs.to(beLessThan(rhs)) 27 | } 28 | 29 | extension NMBObjCMatcher { 30 | public class func beLessThanMatcher(expected: NMBComparable?) -> NMBObjCMatcher { 31 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 32 | let expr = actualExpression.cast { $0 as! NMBComparable? } 33 | return try! beLessThan(expected).matches(expr, failureMessage: failureMessage) 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble/Matchers/BeAKindOf.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | // A Nimble matcher that catches attempts to use beAKindOf with non Objective-C types 4 | public func beAKindOf(expectedClass: Any) -> NonNilMatcherFunc { 5 | return NonNilMatcherFunc {actualExpression, failureMessage in 6 | failureMessage.stringValue = "beAKindOf only works on Objective-C types since" 7 | + " the Swift compiler will automatically type check Swift-only types." 8 | + " This expectation is redundant." 9 | return false 10 | } 11 | } 12 | 13 | /// A Nimble matcher that succeeds when the actual value is an instance of the given class. 14 | /// @see beAnInstanceOf if you want to match against the exact class 15 | public func beAKindOf(expectedClass: AnyClass) -> NonNilMatcherFunc { 16 | return NonNilMatcherFunc { actualExpression, failureMessage in 17 | let instance = try actualExpression.evaluate() 18 | if let validInstance = instance { 19 | failureMessage.actualValue = "<\(NSStringFromClass(validInstance.dynamicType)) instance>" 20 | } else { 21 | failureMessage.actualValue = "" 22 | } 23 | failureMessage.postfixMessage = "be a kind of \(NSStringFromClass(expectedClass))" 24 | return instance != nil && instance!.isKindOfClass(expectedClass) 25 | } 26 | } 27 | 28 | extension NMBObjCMatcher { 29 | public class func beAKindOfMatcher(expected: AnyClass) -> NMBMatcher { 30 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 31 | return try! beAKindOf(expected).matches(actualExpression, failureMessage: failureMessage) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/Matchers/BeGreaterThanOrEqualToTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | class BeGreaterThanOrEqualToTest: XCTestCase { 5 | 6 | func testGreaterThanOrEqualTo() { 7 | expect(10).to(beGreaterThanOrEqualTo(10)) 8 | expect(10).to(beGreaterThanOrEqualTo(2)) 9 | expect(1).toNot(beGreaterThanOrEqualTo(2)) 10 | expect(NSNumber(int:1)).toNot(beGreaterThanOrEqualTo(2)) 11 | expect(NSNumber(int:2)).to(beGreaterThanOrEqualTo(NSNumber(int:2))) 12 | expect(1).to(beGreaterThanOrEqualTo(NSNumber(int:0))) 13 | 14 | failsWithErrorMessage("expected to be greater than or equal to <2>, got <0>") { 15 | expect(0).to(beGreaterThanOrEqualTo(2)) 16 | return 17 | } 18 | failsWithErrorMessage("expected to not be greater than or equal to <1>, got <1>") { 19 | expect(1).toNot(beGreaterThanOrEqualTo(1)) 20 | return 21 | } 22 | failsWithErrorMessageForNil("expected to be greater than or equal to <-2>, got ") { 23 | expect(nil as Int?).to(beGreaterThanOrEqualTo(-2)) 24 | } 25 | failsWithErrorMessageForNil("expected to not be greater than or equal to <1>, got ") { 26 | expect(nil as Int?).toNot(beGreaterThanOrEqualTo(1)) 27 | } 28 | } 29 | 30 | func testGreaterThanOrEqualToOperator() { 31 | expect(0) >= 0 32 | expect(1) >= 0 33 | expect(NSNumber(int:1)) >= 1 34 | expect(NSNumber(int:1)) >= NSNumber(int:1) 35 | 36 | failsWithErrorMessage("expected to be greater than or equal to <2>, got <1>") { 37 | expect(1) >= 2 38 | return 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/Nimble/Matchers/BeLessThan.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is less than the expected value. 4 | public func beLessThan(expectedValue: T?) -> NonNilMatcherFunc { 5 | return NonNilMatcherFunc { actualExpression, failureMessage in 6 | failureMessage.postfixMessage = "be less than <\(stringify(expectedValue))>" 7 | return try actualExpression.evaluate() < expectedValue 8 | } 9 | } 10 | 11 | /// A Nimble matcher that succeeds when the actual value is less than the expected value. 12 | public func beLessThan(expectedValue: NMBComparable?) -> NonNilMatcherFunc { 13 | return NonNilMatcherFunc { actualExpression, failureMessage in 14 | failureMessage.postfixMessage = "be less than <\(stringify(expectedValue))>" 15 | let actualValue = try actualExpression.evaluate() 16 | let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == NSComparisonResult.OrderedAscending 17 | return matches 18 | } 19 | } 20 | 21 | public func <(lhs: Expectation, rhs: T) { 22 | lhs.to(beLessThan(rhs)) 23 | } 24 | 25 | public func <(lhs: Expectation, rhs: NMBComparable?) { 26 | lhs.to(beLessThan(rhs)) 27 | } 28 | 29 | extension NMBObjCMatcher { 30 | public class func beLessThanMatcher(expected: NMBComparable?) -> NMBObjCMatcher { 31 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 32 | let expr = actualExpression.cast { $0 as! NMBComparable? } 33 | return try! beLessThan(expected).matches(expr, failureMessage: failureMessage) 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble/Adapters/NimbleXCTestHandler.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import XCTest 3 | 4 | /// Default handler for Nimble. This assertion handler passes failures along to 5 | /// XCTest. 6 | public class NimbleXCTestHandler : AssertionHandler { 7 | public func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { 8 | if !assertion { 9 | XCTFail("\(message.stringValue)\n", file: location.file, line: location.line) 10 | } 11 | } 12 | } 13 | 14 | /// Alternative handler for Nimble. This assertion handler passes failures along 15 | /// to XCTest by attempting to reduce the failure message size. 16 | public class NimbleShortXCTestHandler: AssertionHandler { 17 | public func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { 18 | if !assertion { 19 | let msg: String 20 | if let actual = message.actualValue { 21 | msg = "got: \(actual) \(message.postfixActual)" 22 | } else { 23 | msg = "expected \(message.to) \(message.postfixMessage)" 24 | } 25 | XCTFail("\(msg)\n", file: location.file, line: location.line) 26 | } 27 | } 28 | } 29 | 30 | /// Fallback handler in case XCTest is unavailable. This assertion handler will abort 31 | /// the program if it is invoked. 32 | class NimbleXCTestUnavailableHandler : AssertionHandler { 33 | func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { 34 | fatalError("XCTest is not available and no custom assertion handler was configured. Aborting.") 35 | } 36 | } 37 | 38 | func isXCTestAvailable() -> Bool { 39 | return NSClassFromString("XCTestCase") != nil 40 | } 41 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/Nimble/Matchers/BeAKindOf.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | // A Nimble matcher that catches attempts to use beAKindOf with non Objective-C types 4 | public func beAKindOf(expectedClass: Any) -> NonNilMatcherFunc { 5 | return NonNilMatcherFunc {actualExpression, failureMessage in 6 | failureMessage.stringValue = "beAKindOf only works on Objective-C types since" 7 | + " the Swift compiler will automatically type check Swift-only types." 8 | + " This expectation is redundant." 9 | return false 10 | } 11 | } 12 | 13 | /// A Nimble matcher that succeeds when the actual value is an instance of the given class. 14 | /// @see beAnInstanceOf if you want to match against the exact class 15 | public func beAKindOf(expectedClass: AnyClass) -> NonNilMatcherFunc { 16 | return NonNilMatcherFunc { actualExpression, failureMessage in 17 | let instance = try actualExpression.evaluate() 18 | if let validInstance = instance { 19 | failureMessage.actualValue = "<\(NSStringFromClass(validInstance.dynamicType)) instance>" 20 | } else { 21 | failureMessage.actualValue = "" 22 | } 23 | failureMessage.postfixMessage = "be a kind of \(NSStringFromClass(expectedClass))" 24 | return instance != nil && instance!.isKindOfClass(expectedClass) 25 | } 26 | } 27 | 28 | extension NMBObjCMatcher { 29 | public class func beAKindOfMatcher(expected: AnyClass) -> NMBMatcher { 30 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 31 | return try! beAKindOf(expected).matches(actualExpression, failureMessage: failureMessage) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/Matchers/BeGreaterThanOrEqualToTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | class BeGreaterThanOrEqualToTest: XCTestCase { 5 | 6 | func testGreaterThanOrEqualTo() { 7 | expect(10).to(beGreaterThanOrEqualTo(10)) 8 | expect(10).to(beGreaterThanOrEqualTo(2)) 9 | expect(1).toNot(beGreaterThanOrEqualTo(2)) 10 | expect(NSNumber(int:1)).toNot(beGreaterThanOrEqualTo(2)) 11 | expect(NSNumber(int:2)).to(beGreaterThanOrEqualTo(NSNumber(int:2))) 12 | expect(1).to(beGreaterThanOrEqualTo(NSNumber(int:0))) 13 | 14 | failsWithErrorMessage("expected to be greater than or equal to <2>, got <0>") { 15 | expect(0).to(beGreaterThanOrEqualTo(2)) 16 | return 17 | } 18 | failsWithErrorMessage("expected to not be greater than or equal to <1>, got <1>") { 19 | expect(1).toNot(beGreaterThanOrEqualTo(1)) 20 | return 21 | } 22 | failsWithErrorMessageForNil("expected to be greater than or equal to <-2>, got ") { 23 | expect(nil as Int?).to(beGreaterThanOrEqualTo(-2)) 24 | } 25 | failsWithErrorMessageForNil("expected to not be greater than or equal to <1>, got ") { 26 | expect(nil as Int?).toNot(beGreaterThanOrEqualTo(1)) 27 | } 28 | } 29 | 30 | func testGreaterThanOrEqualToOperator() { 31 | expect(0) >= 0 32 | expect(1) >= 0 33 | expect(NSNumber(int:1)) >= 1 34 | expect(NSNumber(int:1)) >= NSNumber(int:1) 35 | 36 | failsWithErrorMessage("expected to be greater than or equal to <2>, got <1>") { 37 | expect(1) >= 2 38 | return 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickTests/FunctionalTests/FailureTests+ObjC.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import 4 | #import 5 | 6 | #import "QCKSpecRunner.h" 7 | 8 | static BOOL isRunningFunctionalTests = NO; 9 | 10 | #pragma mark - Spec 11 | 12 | QuickSpecBegin(FunctionalTests_FailureSpec_ObjC) 13 | 14 | describe(@"a group of failing examples", ^{ 15 | it(@"passes", ^{ 16 | expect(@YES).to(beTruthy()); 17 | }); 18 | 19 | it(@"fails (but only when running the functional tests)", ^{ 20 | expect(@(isRunningFunctionalTests)).to(beFalsy()); 21 | }); 22 | 23 | it(@"fails again (but only when running the functional tests)", ^{ 24 | expect(@(isRunningFunctionalTests)).to(beFalsy()); 25 | }); 26 | }); 27 | 28 | QuickSpecEnd 29 | 30 | #pragma mark - Tests 31 | 32 | @interface FailureTests_ObjC : XCTestCase; @end 33 | 34 | @implementation FailureTests_ObjC 35 | 36 | - (void)setUp { 37 | [super setUp]; 38 | isRunningFunctionalTests = YES; 39 | } 40 | 41 | - (void)tearDown { 42 | isRunningFunctionalTests = NO; 43 | [super tearDown]; 44 | } 45 | 46 | - (void)testFailureSpecHasSucceededIsFalse { 47 | XCTestRun *result = qck_runSpec([FunctionalTests_FailureSpec_ObjC class]); 48 | XCTAssertFalse(result.hasSucceeded); 49 | } 50 | 51 | - (void)testFailureSpecExecutedAllExamples { 52 | XCTestRun *result = qck_runSpec([FunctionalTests_FailureSpec_ObjC class]); 53 | XCTAssertEqual(result.executionCount, 3); 54 | } 55 | 56 | - (void)testFailureSpecFailureCountIsEqualToTheNumberOfFailingExamples { 57 | XCTestRun *result = qck_runSpec([FunctionalTests_FailureSpec_ObjC class]); 58 | XCTAssertEqual(result.failureCount, 2); 59 | } 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickTests/FunctionalTests/FailureUsingXCTAssertTests+ObjC.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import "QCKSpecRunner.h" 5 | 6 | static BOOL isRunningFunctionalTests = NO; 7 | 8 | QuickSpecBegin(FunctionalTests_FailureUsingXCTAssertSpec_ObjC) 9 | 10 | it(@"fails using an XCTAssert (but only when running the functional tests)", ^{ 11 | XCTAssertFalse(isRunningFunctionalTests); 12 | }); 13 | 14 | it(@"fails again using an XCTAssert (but only when running the functional tests)", ^{ 15 | XCTAssertFalse(isRunningFunctionalTests); 16 | }); 17 | 18 | it(@"succeeds using an XCTAssert", ^{ 19 | XCTAssertTrue(YES); 20 | }); 21 | 22 | QuickSpecEnd 23 | 24 | #pragma mark - Tests 25 | 26 | @interface FailureUsingXCTAssertTests_ObjC : XCTestCase; @end 27 | 28 | @implementation FailureUsingXCTAssertTests_ObjC 29 | 30 | - (void)setUp { 31 | [super setUp]; 32 | isRunningFunctionalTests = YES; 33 | } 34 | 35 | - (void)tearDown { 36 | isRunningFunctionalTests = NO; 37 | [super tearDown]; 38 | } 39 | 40 | - (void)testFailureUsingXCTAssertSpecHasSucceededIsFalse { 41 | XCTestRun *result = qck_runSpec([FunctionalTests_FailureUsingXCTAssertSpec_ObjC class]); 42 | XCTAssertFalse(result.hasSucceeded); 43 | } 44 | 45 | - (void)testFailureUsingXCTAssertSpecExecutedAllExamples { 46 | XCTestRun *result = qck_runSpec([FunctionalTests_FailureUsingXCTAssertSpec_ObjC class]); 47 | XCTAssertEqual(result.executionCount, 3); 48 | } 49 | 50 | - (void)testFailureUsingXCTAssertSpecFailureCountIsEqualToTheNumberOfFailingExamples { 51 | XCTestRun *result = qck_runSpec([FunctionalTests_FailureUsingXCTAssertSpec_ObjC class]); 52 | XCTAssertEqual(result.failureCount, 2); 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble/Matchers/BeAnInstanceOf.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | // A Nimble matcher that catches attempts to use beAnInstanceOf with non Objective-C types 4 | public func beAnInstanceOf(expectedClass: Any) -> NonNilMatcherFunc { 5 | return NonNilMatcherFunc {actualExpression, failureMessage in 6 | failureMessage.stringValue = "beAnInstanceOf only works on Objective-C types since" 7 | + " the Swift compiler will automatically type check Swift-only types." 8 | + " This expectation is redundant." 9 | return false 10 | } 11 | } 12 | 13 | /// A Nimble matcher that succeeds when the actual value is an instance of the given class. 14 | /// @see beAKindOf if you want to match against subclasses 15 | public func beAnInstanceOf(expectedClass: AnyClass) -> NonNilMatcherFunc { 16 | return NonNilMatcherFunc { actualExpression, failureMessage in 17 | let instance = try actualExpression.evaluate() 18 | if let validInstance = instance { 19 | failureMessage.actualValue = "<\(NSStringFromClass(validInstance.dynamicType)) instance>" 20 | } else { 21 | failureMessage.actualValue = "" 22 | } 23 | failureMessage.postfixMessage = "be an instance of \(NSStringFromClass(expectedClass))" 24 | return instance != nil && instance!.isMemberOfClass(expectedClass) 25 | } 26 | } 27 | 28 | extension NMBObjCMatcher { 29 | public class func beAnInstanceOfMatcher(expected: AnyClass) -> NMBMatcher { 30 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 31 | return try! beAnInstanceOf(expected).matches(actualExpression, failureMessage: failureMessage) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble/Matchers/BeGreaterThan.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | /// A Nimble matcher that succeeds when the actual value is greater than the expected value. 5 | public func beGreaterThan(expectedValue: T?) -> NonNilMatcherFunc { 6 | return NonNilMatcherFunc { actualExpression, failureMessage in 7 | failureMessage.postfixMessage = "be greater than <\(stringify(expectedValue))>" 8 | return try actualExpression.evaluate() > expectedValue 9 | } 10 | } 11 | 12 | /// A Nimble matcher that succeeds when the actual value is greater than the expected value. 13 | public func beGreaterThan(expectedValue: NMBComparable?) -> NonNilMatcherFunc { 14 | return NonNilMatcherFunc { actualExpression, failureMessage in 15 | failureMessage.postfixMessage = "be greater than <\(stringify(expectedValue))>" 16 | let actualValue = try actualExpression.evaluate() 17 | let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == NSComparisonResult.OrderedDescending 18 | return matches 19 | } 20 | } 21 | 22 | public func >(lhs: Expectation, rhs: T) { 23 | lhs.to(beGreaterThan(rhs)) 24 | } 25 | 26 | public func >(lhs: Expectation, rhs: NMBComparable?) { 27 | lhs.to(beGreaterThan(rhs)) 28 | } 29 | 30 | extension NMBObjCMatcher { 31 | public class func beGreaterThanMatcher(expected: NMBComparable?) -> NMBObjCMatcher { 32 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 33 | let expr = actualExpression.cast { $0 as? NMBComparable } 34 | return try! beGreaterThan(expected).matches(expr, failureMessage: failureMessage) 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/Nimble/Adapters/NimbleXCTestHandler.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import XCTest 3 | 4 | /// Default handler for Nimble. This assertion handler passes failures along to 5 | /// XCTest. 6 | public class NimbleXCTestHandler : AssertionHandler { 7 | public func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { 8 | if !assertion { 9 | XCTFail("\(message.stringValue)\n", file: location.file, line: location.line) 10 | } 11 | } 12 | } 13 | 14 | /// Alternative handler for Nimble. This assertion handler passes failures along 15 | /// to XCTest by attempting to reduce the failure message size. 16 | public class NimbleShortXCTestHandler: AssertionHandler { 17 | public func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { 18 | if !assertion { 19 | let msg: String 20 | if let actual = message.actualValue { 21 | msg = "got: \(actual) \(message.postfixActual)" 22 | } else { 23 | msg = "expected \(message.to) \(message.postfixMessage)" 24 | } 25 | XCTFail("\(msg)\n", file: location.file, line: location.line) 26 | } 27 | } 28 | } 29 | 30 | /// Fallback handler in case XCTest is unavailable. This assertion handler will abort 31 | /// the program if it is invoked. 32 | class NimbleXCTestUnavailableHandler : AssertionHandler { 33 | func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { 34 | fatalError("XCTest is not available and no custom assertion handler was configured. Aborting.") 35 | } 36 | } 37 | 38 | func isXCTestAvailable() -> Bool { 39 | return NSClassFromString("XCTestCase") != nil 40 | } 41 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/Nimble/Matchers/BeAnInstanceOf.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | // A Nimble matcher that catches attempts to use beAnInstanceOf with non Objective-C types 4 | public func beAnInstanceOf(expectedClass: Any) -> NonNilMatcherFunc { 5 | return NonNilMatcherFunc {actualExpression, failureMessage in 6 | failureMessage.stringValue = "beAnInstanceOf only works on Objective-C types since" 7 | + " the Swift compiler will automatically type check Swift-only types." 8 | + " This expectation is redundant." 9 | return false 10 | } 11 | } 12 | 13 | /// A Nimble matcher that succeeds when the actual value is an instance of the given class. 14 | /// @see beAKindOf if you want to match against subclasses 15 | public func beAnInstanceOf(expectedClass: AnyClass) -> NonNilMatcherFunc { 16 | return NonNilMatcherFunc { actualExpression, failureMessage in 17 | let instance = try actualExpression.evaluate() 18 | if let validInstance = instance { 19 | failureMessage.actualValue = "<\(NSStringFromClass(validInstance.dynamicType)) instance>" 20 | } else { 21 | failureMessage.actualValue = "" 22 | } 23 | failureMessage.postfixMessage = "be an instance of \(NSStringFromClass(expectedClass))" 24 | return instance != nil && instance!.isMemberOfClass(expectedClass) 25 | } 26 | } 27 | 28 | extension NMBObjCMatcher { 29 | public class func beAnInstanceOfMatcher(expected: AnyClass) -> NMBMatcher { 30 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 31 | return try! beAnInstanceOf(expected).matches(actualExpression, failureMessage: failureMessage) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/Nimble/Matchers/BeGreaterThan.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | /// A Nimble matcher that succeeds when the actual value is greater than the expected value. 5 | public func beGreaterThan(expectedValue: T?) -> NonNilMatcherFunc { 6 | return NonNilMatcherFunc { actualExpression, failureMessage in 7 | failureMessage.postfixMessage = "be greater than <\(stringify(expectedValue))>" 8 | return try actualExpression.evaluate() > expectedValue 9 | } 10 | } 11 | 12 | /// A Nimble matcher that succeeds when the actual value is greater than the expected value. 13 | public func beGreaterThan(expectedValue: NMBComparable?) -> NonNilMatcherFunc { 14 | return NonNilMatcherFunc { actualExpression, failureMessage in 15 | failureMessage.postfixMessage = "be greater than <\(stringify(expectedValue))>" 16 | let actualValue = try actualExpression.evaluate() 17 | let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == NSComparisonResult.OrderedDescending 18 | return matches 19 | } 20 | } 21 | 22 | public func >(lhs: Expectation, rhs: T) { 23 | lhs.to(beGreaterThan(rhs)) 24 | } 25 | 26 | public func >(lhs: Expectation, rhs: NMBComparable?) { 27 | lhs.to(beGreaterThan(rhs)) 28 | } 29 | 30 | extension NMBObjCMatcher { 31 | public class func beGreaterThanMatcher(expected: NMBComparable?) -> NMBObjCMatcher { 32 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 33 | let expr = actualExpression.cast { $0 as? NMBComparable } 34 | return try! beGreaterThan(expected).matches(expr, failureMessage: failureMessage) 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Quick/NSString+QCKSelectorName.m: -------------------------------------------------------------------------------- 1 | #import "NSString+QCKSelectorName.h" 2 | 3 | @implementation NSString (QCKSelectorName) 4 | 5 | - (NSString *)qck_selectorName { 6 | static NSMutableCharacterSet *invalidCharacters = nil; 7 | static dispatch_once_t onceToken; 8 | dispatch_once(&onceToken, ^{ 9 | invalidCharacters = [NSMutableCharacterSet new]; 10 | 11 | NSCharacterSet *whitespaceCharacterSet = [NSCharacterSet whitespaceCharacterSet]; 12 | NSCharacterSet *newlineCharacterSet = [NSCharacterSet newlineCharacterSet]; 13 | NSCharacterSet *illegalCharacterSet = [NSCharacterSet illegalCharacterSet]; 14 | NSCharacterSet *controlCharacterSet = [NSCharacterSet controlCharacterSet]; 15 | NSCharacterSet *punctuationCharacterSet = [NSCharacterSet punctuationCharacterSet]; 16 | NSCharacterSet *nonBaseCharacterSet = [NSCharacterSet nonBaseCharacterSet]; 17 | NSCharacterSet *symbolCharacterSet = [NSCharacterSet symbolCharacterSet]; 18 | 19 | [invalidCharacters formUnionWithCharacterSet:whitespaceCharacterSet]; 20 | [invalidCharacters formUnionWithCharacterSet:newlineCharacterSet]; 21 | [invalidCharacters formUnionWithCharacterSet:illegalCharacterSet]; 22 | [invalidCharacters formUnionWithCharacterSet:controlCharacterSet]; 23 | [invalidCharacters formUnionWithCharacterSet:punctuationCharacterSet]; 24 | [invalidCharacters formUnionWithCharacterSet:nonBaseCharacterSet]; 25 | [invalidCharacters formUnionWithCharacterSet:symbolCharacterSet]; 26 | }); 27 | 28 | NSArray *validComponents = [self componentsSeparatedByCharactersInSet:invalidCharacters]; 29 | 30 | return [validComponents componentsJoinedByString:@"_"]; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/NimbleTests/objc/ObjCAllPassTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCAllPassTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCAllPassTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@[@1, @2, @3,@4]).to(allPass(beLessThan(@5))); 12 | expect(@[@1, @2, @3,@4]).toNot(allPass(beGreaterThan(@5))); 13 | 14 | expect([NSSet setWithArray:@[@1, @2, @3,@4]]).to(allPass(beLessThan(@5))); 15 | expect([NSSet setWithArray:@[@1, @2, @3,@4]]).toNot(allPass(beGreaterThan(@5))); 16 | } 17 | 18 | - (void)testNegativeMatches { 19 | expectFailureMessage(@"expected to all be less than <3.0000>, but failed first at element" 20 | " <3.0000> in <[1.0000, 2.0000, 3.0000, 4.0000]>", ^{ 21 | expect(@[@1, @2, @3,@4]).to(allPass(beLessThan(@3))); 22 | }); 23 | expectFailureMessage(@"expected to not all be less than <5.0000>", ^{ 24 | expect(@[@1, @2, @3,@4]).toNot(allPass(beLessThan(@5))); 25 | }); 26 | expectFailureMessage(@"expected to not all be less than <5.0000>", ^{ 27 | expect([NSSet setWithArray:@[@1, @2, @3,@4]]).toNot(allPass(beLessThan(@5))); 28 | }); 29 | expectFailureMessage(@"allPass only works with NSFastEnumeration" 30 | " (NSArray, NSSet, ...) of NSObjects, got <3.0000>", ^{ 31 | expect(@3).to(allPass(beLessThan(@5))); 32 | }); 33 | expectFailureMessage(@"allPass only works with NSFastEnumeration" 34 | " (NSArray, NSSet, ...) of NSObjects, got <3.0000>", ^{ 35 | expect(@3).toNot(allPass(beLessThan(@5))); 36 | }); 37 | } 38 | @end 39 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble/Matchers/BeLessThanOrEqual.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is less than 4 | /// or equal to the expected value. 5 | public func beLessThanOrEqualTo(expectedValue: T?) -> NonNilMatcherFunc { 6 | return NonNilMatcherFunc { actualExpression, failureMessage in 7 | failureMessage.postfixMessage = "be less than or equal to <\(stringify(expectedValue))>" 8 | return try actualExpression.evaluate() <= expectedValue 9 | } 10 | } 11 | 12 | /// A Nimble matcher that succeeds when the actual value is less than 13 | /// or equal to the expected value. 14 | public func beLessThanOrEqualTo(expectedValue: T?) -> NonNilMatcherFunc { 15 | return NonNilMatcherFunc { actualExpression, failureMessage in 16 | failureMessage.postfixMessage = "be less than or equal to <\(stringify(expectedValue))>" 17 | let actualValue = try actualExpression.evaluate() 18 | return actualValue != nil && actualValue!.NMB_compare(expectedValue) != NSComparisonResult.OrderedDescending 19 | } 20 | } 21 | 22 | public func <=(lhs: Expectation, rhs: T) { 23 | lhs.to(beLessThanOrEqualTo(rhs)) 24 | } 25 | 26 | public func <=(lhs: Expectation, rhs: T) { 27 | lhs.to(beLessThanOrEqualTo(rhs)) 28 | } 29 | 30 | extension NMBObjCMatcher { 31 | public class func beLessThanOrEqualToMatcher(expected: NMBComparable?) -> NMBObjCMatcher { 32 | return NMBObjCMatcher(canMatchNil:false) { actualExpression, failureMessage in 33 | let expr = actualExpression.cast { $0 as? NMBComparable } 34 | return try! beLessThanOrEqualTo(expected).matches(expr, failureMessage: failureMessage) 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Documentation/QuickInObjectiveC.md: -------------------------------------------------------------------------------- 1 | # Using Quick in Objective-C 2 | 3 | Quick works equally well in both Swift and Objective-C. 4 | 5 | There are two notes to keep in mind when using Quick in Objective-C, 6 | however, which are described below. 7 | 8 | ## The Optional Shorthand Syntax 9 | 10 | Importing Quick in an Objective-C file defines macros named `it` and 11 | `itShouldBehaveLike`, as well as functions like `context()` and `describe()`. 12 | 13 | If the project you are testing also defines symbols with these names, you may 14 | encounter confusing build failures. In that case, you can avoid namespace 15 | collision by turning off Quick's optional "shorthand" syntax: 16 | 17 | ```objc 18 | #define QUICK_DISABLE_SHORT_SYNTAX 1 19 | 20 | #import 21 | 22 | QuickSpecBegin(DolphinSpec) 23 | // ... 24 | QuickSpecEnd 25 | ``` 26 | 27 | You must define the `QUICK_DISABLE_SHORT_SYNTAX` macro *before* 28 | importing the Quick header. 29 | 30 | ## Your Test Target Must Include At Least One Swift File 31 | 32 | The Swift stdlib will not be linked into your test target, and thus 33 | Quick will fail to execute properly, if you test target does not contain 34 | *at least one* Swift file. 35 | 36 | Without at least one Swift file, your tests will exit prematurely with 37 | the following error: 38 | 39 | ``` 40 | *** Test session exited(82) without checking in. Executable cannot be 41 | loaded for some other reason, such as a problem with a library it 42 | depends on or a code signature/entitlements mismatch. 43 | ``` 44 | 45 | To fix the problem, add a blank file called `SwiftSpec.swift` to your test target: 46 | 47 | ```swift 48 | // SwiftSpec.swift 49 | 50 | import Quick 51 | ``` 52 | 53 | > For more details on this issue, see https://github.com/Quick/Quick/issues/164. 54 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/NimbleTests/objc/ObjCAllPassTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCAllPassTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCAllPassTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@[@1, @2, @3,@4]).to(allPass(beLessThan(@5))); 12 | expect(@[@1, @2, @3,@4]).toNot(allPass(beGreaterThan(@5))); 13 | 14 | expect([NSSet setWithArray:@[@1, @2, @3,@4]]).to(allPass(beLessThan(@5))); 15 | expect([NSSet setWithArray:@[@1, @2, @3,@4]]).toNot(allPass(beGreaterThan(@5))); 16 | } 17 | 18 | - (void)testNegativeMatches { 19 | expectFailureMessage(@"expected to all be less than <3.0000>, but failed first at element" 20 | " <3.0000> in <[1.0000, 2.0000, 3.0000, 4.0000]>", ^{ 21 | expect(@[@1, @2, @3,@4]).to(allPass(beLessThan(@3))); 22 | }); 23 | expectFailureMessage(@"expected to not all be less than <5.0000>", ^{ 24 | expect(@[@1, @2, @3,@4]).toNot(allPass(beLessThan(@5))); 25 | }); 26 | expectFailureMessage(@"expected to not all be less than <5.0000>", ^{ 27 | expect([NSSet setWithArray:@[@1, @2, @3,@4]]).toNot(allPass(beLessThan(@5))); 28 | }); 29 | expectFailureMessage(@"allPass only works with NSFastEnumeration" 30 | " (NSArray, NSSet, ...) of NSObjects, got <3.0000>", ^{ 31 | expect(@3).to(allPass(beLessThan(@5))); 32 | }); 33 | expectFailureMessage(@"allPass only works with NSFastEnumeration" 34 | " (NSArray, NSSet, ...) of NSObjects, got <3.0000>", ^{ 35 | expect(@3).toNot(allPass(beLessThan(@5))); 36 | }); 37 | } 38 | @end 39 | -------------------------------------------------------------------------------- /Tribute.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | 15 | 16 | 21 | 22 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/Nimble/Matchers/BeLessThanOrEqual.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is less than 4 | /// or equal to the expected value. 5 | public func beLessThanOrEqualTo(expectedValue: T?) -> NonNilMatcherFunc { 6 | return NonNilMatcherFunc { actualExpression, failureMessage in 7 | failureMessage.postfixMessage = "be less than or equal to <\(stringify(expectedValue))>" 8 | return try actualExpression.evaluate() <= expectedValue 9 | } 10 | } 11 | 12 | /// A Nimble matcher that succeeds when the actual value is less than 13 | /// or equal to the expected value. 14 | public func beLessThanOrEqualTo(expectedValue: T?) -> NonNilMatcherFunc { 15 | return NonNilMatcherFunc { actualExpression, failureMessage in 16 | failureMessage.postfixMessage = "be less than or equal to <\(stringify(expectedValue))>" 17 | let actualValue = try actualExpression.evaluate() 18 | return actualValue != nil && actualValue!.NMB_compare(expectedValue) != NSComparisonResult.OrderedDescending 19 | } 20 | } 21 | 22 | public func <=(lhs: Expectation, rhs: T) { 23 | lhs.to(beLessThanOrEqualTo(rhs)) 24 | } 25 | 26 | public func <=(lhs: Expectation, rhs: T) { 27 | lhs.to(beLessThanOrEqualTo(rhs)) 28 | } 29 | 30 | extension NMBObjCMatcher { 31 | public class func beLessThanOrEqualToMatcher(expected: NMBComparable?) -> NMBObjCMatcher { 32 | return NMBObjCMatcher(canMatchNil:false) { actualExpression, failureMessage in 33 | let expr = actualExpression.cast { $0 as? NMBComparable } 34 | return try! beLessThanOrEqualTo(expected).matches(expr, failureMessage: failureMessage) 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickFocusedTests/FocusedTests.swift: -------------------------------------------------------------------------------- 1 | import Quick 2 | import Nimble 3 | import XCTest 4 | 5 | class FunctionalTests_FocusedSpec_SharedExamplesConfiguration: QuickConfiguration { 6 | override class func configure(configuration: Configuration) { 7 | sharedExamples("two passing shared examples") { 8 | it("has an example that passes (4)") {} 9 | it("has another example that passes (5)") {} 10 | } 11 | } 12 | } 13 | 14 | class FunctionalTests_FocusedSpec_Focused: QuickSpec { 15 | override func spec() { 16 | it("has an unfocused example that fails, but is never run") { fail() } 17 | fit("has a focused example that passes (1)") {} 18 | 19 | fdescribe("a focused example group") { 20 | it("has an example that is not focused, but will be run, and passes (2)") {} 21 | fit("has a focused example that passes (3)") {} 22 | } 23 | 24 | // TODO: Port fitBehavesLike to Swift. 25 | itBehavesLike("two passing shared examples", flags: [Filter.focused: true]) 26 | } 27 | } 28 | 29 | class FunctionalTests_FocusedSpec_Unfocused: QuickSpec { 30 | override func spec() { 31 | it("has an unfocused example that fails, but is never run") { fail() } 32 | 33 | describe("an unfocused example group that is never run") { 34 | beforeEach { assert(false) } 35 | it("has an example that fails, but is never run") { fail() } 36 | } 37 | } 38 | } 39 | 40 | class FocusedTests: XCTestCase { 41 | func testOnlyFocusedExamplesAreExecuted() { 42 | let result = qck_runSpecs([ 43 | FunctionalTests_FocusedSpec_Focused.classForCoder(), 44 | FunctionalTests_FocusedSpec_Unfocused.classForCoder() 45 | ]) 46 | XCTAssertEqual(result.executionCount, 5 as UInt) 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble/Matchers/BeGreaterThanOrEqualTo.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is greater than 4 | /// or equal to the expected value. 5 | public func beGreaterThanOrEqualTo(expectedValue: T?) -> NonNilMatcherFunc { 6 | return NonNilMatcherFunc { actualExpression, failureMessage in 7 | failureMessage.postfixMessage = "be greater than or equal to <\(stringify(expectedValue))>" 8 | let actualValue = try actualExpression.evaluate() 9 | return actualValue >= expectedValue 10 | } 11 | } 12 | 13 | /// A Nimble matcher that succeeds when the actual value is greater than 14 | /// or equal to the expected value. 15 | public func beGreaterThanOrEqualTo(expectedValue: T?) -> NonNilMatcherFunc { 16 | return NonNilMatcherFunc { actualExpression, failureMessage in 17 | failureMessage.postfixMessage = "be greater than or equal to <\(stringify(expectedValue))>" 18 | let actualValue = try actualExpression.evaluate() 19 | let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) != NSComparisonResult.OrderedAscending 20 | return matches 21 | } 22 | } 23 | 24 | public func >=(lhs: Expectation, rhs: T) { 25 | lhs.to(beGreaterThanOrEqualTo(rhs)) 26 | } 27 | 28 | public func >=(lhs: Expectation, rhs: T) { 29 | lhs.to(beGreaterThanOrEqualTo(rhs)) 30 | } 31 | 32 | extension NMBObjCMatcher { 33 | public class func beGreaterThanOrEqualToMatcher(expected: NMBComparable?) -> NMBObjCMatcher { 34 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 35 | let expr = actualExpression.cast { $0 as? NMBComparable } 36 | return try! beGreaterThanOrEqualTo(expected).matches(expr, failureMessage: failureMessage) 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Nimble/Nimble/Utils/Stringers.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | internal func identityAsString(value: AnyObject?) -> String { 5 | if value == nil { 6 | return "nil" 7 | } 8 | return NSString(format: "<%p>", unsafeBitCast(value!, Int.self)).description 9 | } 10 | 11 | internal func arrayAsString(items: [T], joiner: String = ", ") -> String { 12 | return items.reduce("") { accum, item in 13 | let prefix = (accum.isEmpty ? "" : joiner) 14 | return accum + prefix + "\(stringify(item))" 15 | } 16 | } 17 | 18 | @objc internal protocol NMBStringer { 19 | func NMB_stringify() -> String 20 | } 21 | 22 | internal func stringify(value: S) -> String { 23 | var generator = value.generate() 24 | var strings = [String]() 25 | var value: S.Generator.Element? 26 | repeat { 27 | value = generator.next() 28 | if value != nil { 29 | strings.append(stringify(value)) 30 | } 31 | } while value != nil 32 | let str = strings.joinWithSeparator(", ") 33 | return "[\(str)]" 34 | } 35 | 36 | extension NSArray : NMBStringer { 37 | func NMB_stringify() -> String { 38 | let str = self.componentsJoinedByString(", ") 39 | return "[\(str)]" 40 | } 41 | } 42 | 43 | internal func stringify(value: T) -> String { 44 | if let value = value as? Double { 45 | return NSString(format: "%.4f", (value)).description 46 | } 47 | return String(value) 48 | } 49 | 50 | internal func stringify(value: NMBDoubleConvertible) -> String { 51 | if let value = value as? Double { 52 | return NSString(format: "%.4f", (value)).description 53 | } 54 | return value.stringRepresentation 55 | } 56 | 57 | internal func stringify(value: T?) -> String { 58 | if let unboxed = value { 59 | return stringify(unboxed) 60 | } 61 | return "nil" 62 | } 63 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/Nimble/Matchers/BeGreaterThanOrEqualTo.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is greater than 4 | /// or equal to the expected value. 5 | public func beGreaterThanOrEqualTo(expectedValue: T?) -> NonNilMatcherFunc { 6 | return NonNilMatcherFunc { actualExpression, failureMessage in 7 | failureMessage.postfixMessage = "be greater than or equal to <\(stringify(expectedValue))>" 8 | let actualValue = try actualExpression.evaluate() 9 | return actualValue >= expectedValue 10 | } 11 | } 12 | 13 | /// A Nimble matcher that succeeds when the actual value is greater than 14 | /// or equal to the expected value. 15 | public func beGreaterThanOrEqualTo(expectedValue: T?) -> NonNilMatcherFunc { 16 | return NonNilMatcherFunc { actualExpression, failureMessage in 17 | failureMessage.postfixMessage = "be greater than or equal to <\(stringify(expectedValue))>" 18 | let actualValue = try actualExpression.evaluate() 19 | let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) != NSComparisonResult.OrderedAscending 20 | return matches 21 | } 22 | } 23 | 24 | public func >=(lhs: Expectation, rhs: T) { 25 | lhs.to(beGreaterThanOrEqualTo(rhs)) 26 | } 27 | 28 | public func >=(lhs: Expectation, rhs: T) { 29 | lhs.to(beGreaterThanOrEqualTo(rhs)) 30 | } 31 | 32 | extension NMBObjCMatcher { 33 | public class func beGreaterThanOrEqualToMatcher(expected: NMBComparable?) -> NMBObjCMatcher { 34 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 35 | let expr = actualExpression.cast { $0 as? NMBComparable } 36 | return try! beGreaterThanOrEqualTo(expected).matches(expr, failureMessage: failureMessage) 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/Externals/Nimble/Nimble/Utils/Stringers.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | internal func identityAsString(value: AnyObject?) -> String { 5 | if value == nil { 6 | return "nil" 7 | } 8 | return NSString(format: "<%p>", unsafeBitCast(value!, Int.self)).description 9 | } 10 | 11 | internal func arrayAsString(items: [T], joiner: String = ", ") -> String { 12 | return items.reduce("") { accum, item in 13 | let prefix = (accum.isEmpty ? "" : joiner) 14 | return accum + prefix + "\(stringify(item))" 15 | } 16 | } 17 | 18 | @objc internal protocol NMBStringer { 19 | func NMB_stringify() -> String 20 | } 21 | 22 | internal func stringify(value: S) -> String { 23 | var generator = value.generate() 24 | var strings = [String]() 25 | var value: S.Generator.Element? 26 | repeat { 27 | value = generator.next() 28 | if value != nil { 29 | strings.append(stringify(value)) 30 | } 31 | } while value != nil 32 | let str = strings.joinWithSeparator(", ") 33 | return "[\(str)]" 34 | } 35 | 36 | extension NSArray : NMBStringer { 37 | func NMB_stringify() -> String { 38 | let str = self.componentsJoinedByString(", ") 39 | return "[\(str)]" 40 | } 41 | } 42 | 43 | internal func stringify(value: T) -> String { 44 | if let value = value as? Double { 45 | return NSString(format: "%.4f", (value)).description 46 | } 47 | return String(value) 48 | } 49 | 50 | internal func stringify(value: NMBDoubleConvertible) -> String { 51 | if let value = value as? Double { 52 | return NSString(format: "%.4f", (value)).description 53 | } 54 | return value.stringRepresentation 55 | } 56 | 57 | internal func stringify(value: T?) -> String { 58 | if let unboxed = value { 59 | return stringify(unboxed) 60 | } 61 | return "nil" 62 | } 63 | -------------------------------------------------------------------------------- /Carthage/Checkouts/Quick/QuickTests/FunctionalTests/SharedExamples+BeforeEachTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Quick 3 | import Nimble 4 | 5 | var specBeforeEachExecutedCount = 0 6 | var sharedExamplesBeforeEachExecutedCount = 0 7 | 8 | class FunctionalTests_SharedExamples_BeforeEachTests_SharedExamples: QuickConfiguration { 9 | override class func configure(configuration: Configuration) { 10 | sharedExamples("a group of three shared examples with a beforeEach") { 11 | beforeEach { sharedExamplesBeforeEachExecutedCount += 1 } 12 | it("passes once") {} 13 | it("passes twice") {} 14 | it("passes three times") {} 15 | } 16 | } 17 | } 18 | 19 | class FunctionalTests_SharedExamples_BeforeEachSpec: QuickSpec { 20 | override func spec() { 21 | beforeEach { specBeforeEachExecutedCount += 1 } 22 | it("executes the spec beforeEach once") {} 23 | itBehavesLike("a group of three shared examples with a beforeEach") 24 | } 25 | } 26 | 27 | class SharedExamples_BeforeEachTests: XCTestCase { 28 | override func setUp() { 29 | super.setUp() 30 | specBeforeEachExecutedCount = 0 31 | sharedExamplesBeforeEachExecutedCount = 0 32 | } 33 | 34 | override func tearDown() { 35 | specBeforeEachExecutedCount = 0 36 | sharedExamplesBeforeEachExecutedCount = 0 37 | super.tearDown() 38 | } 39 | 40 | func testBeforeEachOutsideOfSharedExamplesExecutedOnceBeforeEachExample() { 41 | qck_runSpec(FunctionalTests_SharedExamples_BeforeEachSpec.classForCoder()) 42 | XCTAssertEqual(specBeforeEachExecutedCount, 4) 43 | } 44 | 45 | func testBeforeEachInSharedExamplesExecutedOnceBeforeEachSharedExample() { 46 | qck_runSpec(FunctionalTests_SharedExamples_BeforeEachSpec.classForCoder()) 47 | XCTAssertEqual(sharedExamplesBeforeEachExecutedCount, 3) 48 | } 49 | } 50 | --------------------------------------------------------------------------------