├── Pod ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── NPKeyboardLayoutGuide.h │ └── NPKeyboardLayoutGuide.m ├── Example ├── Pods │ ├── Pods-Tests-NPKeyboardLayoutGuide.xcconfig │ ├── Headers │ │ ├── Specta │ │ │ ├── SPTSpec.h │ │ │ ├── Specta.h │ │ │ ├── SPTExample.h │ │ │ ├── SPTReporter.h │ │ │ ├── SpectaTypes.h │ │ │ ├── SPTXCTestCase.h │ │ │ ├── SpectaSupport.h │ │ │ ├── SpectaUtility.h │ │ │ ├── SPTExampleGroup.h │ │ │ ├── SPTNestedReporter.h │ │ │ ├── SPTXCTestReporter.h │ │ │ ├── XCTestCase+Specta.h │ │ │ ├── XCTestLog+Specta.h │ │ │ ├── XCTestRun+Specta.h │ │ │ └── SPTSharedExampleGroups.h │ │ ├── Expecta │ │ │ ├── Expecta.h │ │ │ ├── EXPDefines.h │ │ │ ├── EXPExpect.h │ │ │ ├── EXPMatcher.h │ │ │ ├── EXPFloatTuple.h │ │ │ ├── EXPDoubleTuple.h │ │ │ ├── EXPMatchers.h │ │ │ ├── ExpectaSupport.h │ │ │ ├── NSObject+Expecta.h │ │ │ ├── NSValue+Expecta.h │ │ │ ├── EXPUnsupportedObject.h │ │ │ ├── EXPBlockDefinedMatcher.h │ │ │ ├── EXPMatcherHelpers.h │ │ │ ├── EXPMatchers+beFalsy.h │ │ │ ├── EXPMatchers+beNil.h │ │ │ ├── EXPMatchers+contain.h │ │ │ ├── EXPMatchers+endWith.h │ │ │ ├── EXPMatchers+equal.h │ │ │ ├── EXPMatchers+notify.h │ │ │ ├── EXPMatchers+raise.h │ │ │ ├── EXPBackwardCompatibility.h │ │ │ ├── EXPMatchers+beCloseTo.h │ │ │ ├── EXPMatchers+beKindOf.h │ │ │ ├── EXPMatchers+beTruthy.h │ │ │ ├── EXPMatchers+beginWith.h │ │ │ ├── EXPMatchers+conformTo.h │ │ │ ├── EXPMatchers+respondTo.h │ │ │ ├── EXPMatchers+beInstanceOf.h │ │ │ ├── EXPMatchers+beLessThan.h │ │ │ ├── EXPMatchers+beSubclassOf.h │ │ │ ├── EXPMatchers+beSupersetOf.h │ │ │ ├── EXPMatchers+haveCountOf.h │ │ │ ├── EXPMatchers+beGreaterThan.h │ │ │ ├── EXPMatchers+beIdenticalTo.h │ │ │ ├── EXPMatchers+beInTheRangeOf.h │ │ │ ├── EXPMatchers+raiseWithReason.h │ │ │ ├── EXPMatchers+beLessThanOrEqualTo.h │ │ │ └── EXPMatchers+beGreaterThanOrEqualTo.h │ │ └── NPKeyboardLayoutGuide │ │ │ └── NPKeyboardLayoutGuide.h │ ├── BuildHeaders │ │ ├── Specta │ │ │ ├── SPTSpec.h │ │ │ ├── Specta.h │ │ │ ├── SPTExample.h │ │ │ ├── SPTReporter.h │ │ │ ├── SpectaTypes.h │ │ │ ├── SPTXCTestCase.h │ │ │ ├── SpectaSupport.h │ │ │ ├── SpectaUtility.h │ │ │ ├── SPTExampleGroup.h │ │ │ ├── SPTNestedReporter.h │ │ │ ├── SPTXCTestReporter.h │ │ │ ├── XCTestCase+Specta.h │ │ │ ├── XCTestLog+Specta.h │ │ │ ├── XCTestRun+Specta.h │ │ │ └── SPTSharedExampleGroups.h │ │ ├── Expecta │ │ │ ├── Expecta.h │ │ │ ├── EXPDefines.h │ │ │ ├── EXPExpect.h │ │ │ ├── EXPMatcher.h │ │ │ ├── EXPFloatTuple.h │ │ │ ├── EXPDoubleTuple.h │ │ │ ├── EXPMatchers.h │ │ │ ├── ExpectaSupport.h │ │ │ ├── NSObject+Expecta.h │ │ │ ├── NSValue+Expecta.h │ │ │ ├── EXPUnsupportedObject.h │ │ │ ├── EXPBlockDefinedMatcher.h │ │ │ ├── EXPMatcherHelpers.h │ │ │ ├── EXPMatchers+beFalsy.h │ │ │ ├── EXPMatchers+beNil.h │ │ │ ├── EXPMatchers+contain.h │ │ │ ├── EXPMatchers+endWith.h │ │ │ ├── EXPMatchers+equal.h │ │ │ ├── EXPMatchers+notify.h │ │ │ ├── EXPMatchers+raise.h │ │ │ ├── EXPBackwardCompatibility.h │ │ │ ├── EXPMatchers+beCloseTo.h │ │ │ ├── EXPMatchers+beKindOf.h │ │ │ ├── EXPMatchers+beTruthy.h │ │ │ ├── EXPMatchers+beginWith.h │ │ │ ├── EXPMatchers+conformTo.h │ │ │ ├── EXPMatchers+respondTo.h │ │ │ ├── EXPMatchers+beInstanceOf.h │ │ │ ├── EXPMatchers+beLessThan.h │ │ │ ├── EXPMatchers+beSubclassOf.h │ │ │ ├── EXPMatchers+beSupersetOf.h │ │ │ ├── EXPMatchers+haveCountOf.h │ │ │ ├── EXPMatchers+beGreaterThan.h │ │ │ ├── EXPMatchers+beIdenticalTo.h │ │ │ ├── EXPMatchers+beInTheRangeOf.h │ │ │ ├── EXPMatchers+raiseWithReason.h │ │ │ ├── EXPMatchers+beLessThanOrEqualTo.h │ │ │ └── EXPMatchers+beGreaterThanOrEqualTo.h │ │ └── NPKeyboardLayoutGuide │ │ │ └── NPKeyboardLayoutGuide.h │ ├── Pods-NPKeyboardLayoutGuide-NPKeyboardLayoutGuide.xcconfig │ ├── Pods-Tests-Expecta.xcconfig │ ├── Specta │ │ ├── src │ │ │ ├── XCTestCase+Specta.h │ │ │ ├── SPTNestedReporter.h │ │ │ ├── SpectaTypes.h │ │ │ ├── XCTestLog+Specta.h │ │ │ ├── XCTestRun+Specta.h │ │ │ ├── SPTXCTestReporter.h │ │ │ ├── SPTXCTestReporter.m │ │ │ ├── SPTExample.m │ │ │ ├── SPTExample.h │ │ │ ├── SPTSpec.h │ │ │ ├── SPTSharedExampleGroups.h │ │ │ ├── SpectaUtility.h │ │ │ ├── SPTSpec.m │ │ │ ├── XCTestCase+Specta.m │ │ │ ├── SPTXCTestCase.h │ │ │ ├── SPTReporter.h │ │ │ ├── XCTestRun+Specta.m │ │ │ ├── SpectaSupport.h │ │ │ ├── XCTestLog+Specta.m │ │ │ ├── SPTExampleGroup.h │ │ │ ├── SPTSharedExampleGroups.m │ │ │ ├── SpectaUtility.m │ │ │ ├── Specta.h │ │ │ ├── SPTReporter.m │ │ │ ├── Specta.m │ │ │ ├── SPTXCTestCase.m │ │ │ └── SPTNestedReporter.m │ │ ├── LICENSE │ │ └── README.md │ ├── Expecta │ │ ├── src │ │ │ ├── matchers │ │ │ │ ├── EXPMatchers+beFalsy.h │ │ │ │ ├── EXPMatchers+beTruthy.h │ │ │ │ ├── EXPMatchers+endWith.h │ │ │ │ ├── EXPMatchers+respondTo.h │ │ │ │ ├── EXPMatchers+beSupersetOf.h │ │ │ │ ├── EXPMatchers+conformTo.h │ │ │ │ ├── EXPMatchers+notify.h │ │ │ │ ├── EXPMatchers+beNil.h │ │ │ │ ├── EXPMatchers+beKindOf.h │ │ │ │ ├── EXPMatchers+beginWith.h │ │ │ │ ├── EXPMatchers+raise.h │ │ │ │ ├── EXPMatcherHelpers.h │ │ │ │ ├── EXPMatchers+beSubclassOf.h │ │ │ │ ├── EXPMatchers+raiseWithReason.h │ │ │ │ ├── EXPMatchers+equal.h │ │ │ │ ├── EXPMatchers+beInstanceOf.h │ │ │ │ ├── EXPMatchers+beLessThan.h │ │ │ │ ├── EXPMatchers+contain.h │ │ │ │ ├── EXPMatchers+beGreaterThan.h │ │ │ │ ├── EXPMatchers+beLessThanOrEqualTo.h │ │ │ │ ├── EXPMatcherHelpers.m │ │ │ │ ├── EXPMatchers+beGreaterThanOrEqualTo.h │ │ │ │ ├── EXPMatchers+haveCountOf.h │ │ │ │ ├── EXPMatchers+beCloseTo.h │ │ │ │ ├── EXPMatchers+beIdenticalTo.h │ │ │ │ ├── EXPMatchers+beInTheRangeOf.h │ │ │ │ ├── EXPMatchers+beNil.m │ │ │ │ ├── EXPMatchers+beLessThan.m │ │ │ │ ├── EXPMatchers+beIdenticalTo.m │ │ │ │ ├── EXPMatchers+beGreaterThan.m │ │ │ │ ├── EXPMatchers+beLessThanOrEqualTo.m │ │ │ │ ├── EXPMatchers+beGreaterThanOrEqualTo.m │ │ │ │ ├── EXPMatchers+beFalsy.m │ │ │ │ ├── EXPMatchers+beTruthy.m │ │ │ │ ├── EXPMatchers.h │ │ │ │ ├── EXPMatchers+equal.m │ │ │ │ ├── EXPMatchers+beInstanceOf.m │ │ │ │ ├── EXPMatchers+beSubclassOf.m │ │ │ │ ├── EXPMatchers+respondTo.m │ │ │ │ ├── EXPMatchers+beKindOf.m │ │ │ │ ├── EXPMatchers+conformTo.m │ │ │ │ ├── EXPMatchers+raise.m │ │ │ │ ├── EXPMatchers+beInTheRangeOf.m │ │ │ │ ├── EXPMatchers+haveCountOf.m │ │ │ │ ├── EXPMatchers+contain.m │ │ │ │ ├── EXPMatchers+raiseWithReason.m │ │ │ │ ├── EXPMatchers+beCloseTo.m │ │ │ │ ├── EXPMatchers+notify.m │ │ │ │ ├── EXPMatchers+beSupersetOf.m │ │ │ │ ├── EXPMatchers+beginWith.m │ │ │ │ └── EXPMatchers+endWith.m │ │ │ ├── NSValue+Expecta.h │ │ │ ├── EXPUnsupportedObject.h │ │ │ ├── EXPBackwardCompatibility.m │ │ │ ├── EXPFloatTuple.h │ │ │ ├── EXPDoubleTuple.h │ │ │ ├── Expecta.m │ │ │ ├── EXPUnsupportedObject.m │ │ │ ├── EXPDefines.h │ │ │ ├── NSObject+Expecta.h │ │ │ ├── EXPMatcher.h │ │ │ ├── NSValue+Expecta.m │ │ │ ├── EXPBlockDefinedMatcher.h │ │ │ ├── Expecta.h │ │ │ ├── EXPBlockDefinedMatcher.m │ │ │ ├── EXPFloatTuple.m │ │ │ ├── EXPDoubleTuple.m │ │ │ ├── EXPExpect.h │ │ │ ├── EXPBackwardCompatibility.h │ │ │ ├── ExpectaSupport.h │ │ │ └── EXPExpect.m │ │ └── LICENSE │ ├── Pods-Tests-Expecta-prefix.pch │ ├── Pods-Tests-Specta-prefix.pch │ ├── Pods-Tests-NPKeyboardLayoutGuide-prefix.pch │ ├── Pods-Tests-dummy.m │ ├── Pods-NPKeyboardLayoutGuide-NPKeyboardLayoutGuide-prefix.pch │ ├── Pods-Tests-Specta-dummy.m │ ├── Pods-Tests-Expecta-dummy.m │ ├── Pods-NPKeyboardLayoutGuide-dummy.m │ ├── Pods-Tests-NPKeyboardLayoutGuide-dummy.m │ ├── Pods-Tests-Specta.xcconfig │ ├── Pods-NPKeyboardLayoutGuide-NPKeyboardLayoutGuide-dummy.m │ ├── Pods-Tests-Expecta-Private.xcconfig │ ├── Pods-Tests-NPKeyboardLayoutGuide-Private.xcconfig │ ├── Pods-NPKeyboardLayoutGuide-NPKeyboardLayoutGuide-Private.xcconfig │ ├── Pods-NPKeyboardLayoutGuide.xcconfig │ ├── Pods-Tests-Specta-Private.xcconfig │ ├── Manifest.lock │ ├── Pods-NPKeyboardLayoutGuide-environment.h │ ├── Pods-Tests.xcconfig │ ├── Pods-Tests-environment.h │ ├── Pods-NPKeyboardLayoutGuide-acknowledgements.markdown │ ├── Local Podspecs │ │ └── NPKeyboardLayoutGuide.podspec │ ├── Pods-NPKeyboardLayoutGuide-acknowledgements.plist │ ├── Pods-Tests-acknowledgements.markdown │ ├── Pods-Tests-resources.sh │ ├── Pods-NPKeyboardLayoutGuide-resources.sh │ └── Pods-Tests-acknowledgements.plist ├── Tests │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── Tests-Prefix.pch │ ├── Tests-Info.plist │ └── Tests.m ├── NPKeyboardLayoutGuide │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── NPViewController.h │ ├── NPAppDelegate.h │ ├── NPKeyboardLayoutGuide-Prefix.pch │ ├── main.m │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── NPViewController.m │ ├── NPKeyboardLayoutGuide-Info.plist │ ├── NPAppDelegate.m │ └── Base.lproj │ │ ├── Main_iPad.storyboard │ │ └── Main_iPhone.storyboard ├── NPKeyboardLayoutGuide.xcworkspace │ └── contents.xcworkspacedata ├── NPKeyboardLayoutGuide.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── NPKeyboardLayoutGuide.xcscheme ├── Podfile └── Podfile.lock ├── .travis.yml ├── .gitignore ├── LICENSE ├── README.md └── NPKeyboardLayoutGuide.podspec /Pod/Assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Pod/Classes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Example/Pods/Pods-Tests-NPKeyboardLayoutGuide.xcconfig: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Example/Pods/Headers/Specta/SPTSpec.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/SPTSpec.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Specta/Specta.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/Specta.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Specta/SPTSpec.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/SPTSpec.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Specta/Specta.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/Specta.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/Expecta.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/Expecta.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/Expecta.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/Expecta.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPDefines.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/EXPDefines.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPExpect.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/EXPExpect.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatcher.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/EXPMatcher.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Specta/SPTExample.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/SPTExample.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Specta/SPTReporter.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/SPTReporter.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Specta/SpectaTypes.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/SpectaTypes.h -------------------------------------------------------------------------------- /Example/Pods/Pods-NPKeyboardLayoutGuide-NPKeyboardLayoutGuide.xcconfig: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPDefines.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/EXPDefines.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPExpect.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/EXPExpect.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatcher.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/EXPMatcher.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Specta/SPTExample.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/SPTExample.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Specta/SPTReporter.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/SPTReporter.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Specta/SpectaTypes.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/SpectaTypes.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPFloatTuple.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/EXPFloatTuple.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Specta/SPTXCTestCase.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/SPTXCTestCase.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Specta/SpectaSupport.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/SpectaSupport.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Specta/SpectaUtility.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/SpectaUtility.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPFloatTuple.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/EXPFloatTuple.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Specta/SPTXCTestCase.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/SPTXCTestCase.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Specta/SpectaSupport.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/SpectaSupport.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Specta/SpectaUtility.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/SpectaUtility.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPDoubleTuple.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/EXPDoubleTuple.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/ExpectaSupport.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/ExpectaSupport.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/NSObject+Expecta.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/NSObject+Expecta.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/NSValue+Expecta.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/NSValue+Expecta.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Specta/SPTExampleGroup.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/SPTExampleGroup.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Specta/SPTNestedReporter.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/SPTNestedReporter.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Specta/SPTXCTestReporter.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/SPTXCTestReporter.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Specta/XCTestCase+Specta.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/XCTestCase+Specta.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Specta/XCTestLog+Specta.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/XCTestLog+Specta.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Specta/XCTestRun+Specta.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/XCTestRun+Specta.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPDoubleTuple.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/EXPDoubleTuple.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/ExpectaSupport.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/ExpectaSupport.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/NSObject+Expecta.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/NSObject+Expecta.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/NSValue+Expecta.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/NSValue+Expecta.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Specta/SPTExampleGroup.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/SPTExampleGroup.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Specta/SPTNestedReporter.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/SPTNestedReporter.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Specta/SPTXCTestReporter.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/SPTXCTestReporter.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Specta/XCTestCase+Specta.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/XCTestCase+Specta.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Specta/XCTestLog+Specta.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/XCTestLog+Specta.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Specta/XCTestRun+Specta.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/XCTestRun+Specta.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPUnsupportedObject.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/EXPUnsupportedObject.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Specta/SPTSharedExampleGroups.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/SPTSharedExampleGroups.h -------------------------------------------------------------------------------- /Example/Tests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPUnsupportedObject.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/EXPUnsupportedObject.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Specta/SPTSharedExampleGroups.h: -------------------------------------------------------------------------------- 1 | ../../Specta/src/SPTSharedExampleGroups.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPBlockDefinedMatcher.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/EXPBlockDefinedMatcher.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatcherHelpers.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatcherHelpers.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+beFalsy.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beFalsy.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+beNil.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beNil.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+contain.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+contain.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+endWith.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+endWith.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+equal.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+equal.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+notify.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+notify.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+raise.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+raise.h -------------------------------------------------------------------------------- /Example/Pods/Pods-Tests-Expecta.xcconfig: -------------------------------------------------------------------------------- 1 | PODS_TESTS_EXPECTA_OTHER_LDFLAGS = -framework Foundation -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPBlockDefinedMatcher.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/EXPBlockDefinedMatcher.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatcherHelpers.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatcherHelpers.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+beFalsy.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beFalsy.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+beNil.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beNil.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+contain.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+contain.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+endWith.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+endWith.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+equal.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+equal.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+notify.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+notify.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+raise.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+raise.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPBackwardCompatibility.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/EXPBackwardCompatibility.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+beCloseTo.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beCloseTo.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+beKindOf.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beKindOf.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+beTruthy.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beTruthy.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+beginWith.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beginWith.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+conformTo.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+conformTo.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+respondTo.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+respondTo.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPBackwardCompatibility.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/EXPBackwardCompatibility.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+beCloseTo.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beCloseTo.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+beKindOf.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beKindOf.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+beTruthy.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beTruthy.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+beginWith.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beginWith.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+conformTo.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+conformTo.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+respondTo.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+respondTo.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+beInstanceOf.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beInstanceOf.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+beLessThan.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beLessThan.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+beSubclassOf.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beSubclassOf.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+beSupersetOf.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beSupersetOf.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+haveCountOf.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+haveCountOf.h -------------------------------------------------------------------------------- /Example/NPKeyboardLayoutGuide/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+beInstanceOf.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beInstanceOf.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+beLessThan.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beLessThan.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+beSubclassOf.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beSubclassOf.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+beSupersetOf.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beSupersetOf.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+haveCountOf.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+haveCountOf.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+beGreaterThan.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beGreaterThan.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+beIdenticalTo.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beIdenticalTo.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+beInTheRangeOf.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beInTheRangeOf.h -------------------------------------------------------------------------------- /Example/Pods/Headers/NPKeyboardLayoutGuide/NPKeyboardLayoutGuide.h: -------------------------------------------------------------------------------- 1 | ../../../../Pod/Classes/NPKeyboardLayoutGuide.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+beGreaterThan.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beGreaterThan.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+beIdenticalTo.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beIdenticalTo.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+beInTheRangeOf.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beInTheRangeOf.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/NPKeyboardLayoutGuide/NPKeyboardLayoutGuide.h: -------------------------------------------------------------------------------- 1 | ../../../../Pod/Classes/NPKeyboardLayoutGuide.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+raiseWithReason.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+raiseWithReason.h -------------------------------------------------------------------------------- /Example/Pods/Specta/src/XCTestCase+Specta.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface XCTestCase (Specta) 4 | @end -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+raiseWithReason.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+raiseWithReason.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+beLessThanOrEqualTo.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beLessThanOrEqualTo.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+beLessThanOrEqualTo.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beLessThanOrEqualTo.h -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beFalsy.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beFalsy, (void)); 4 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beTruthy.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beTruthy, (void)); 4 | -------------------------------------------------------------------------------- /Example/Pods/Headers/Expecta/EXPMatchers+beGreaterThanOrEqualTo.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beGreaterThanOrEqualTo.h -------------------------------------------------------------------------------- /Example/Pods/BuildHeaders/Expecta/EXPMatchers+beGreaterThanOrEqualTo.h: -------------------------------------------------------------------------------- 1 | ../../Expecta/src/matchers/EXPMatchers+beGreaterThanOrEqualTo.h -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+endWith.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(endWith, (id expected)); 4 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+respondTo.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(respondTo, (SEL expected)); 4 | -------------------------------------------------------------------------------- /Example/Pods/Specta/src/SPTNestedReporter.h: -------------------------------------------------------------------------------- 1 | #import "SPTReporter.h" 2 | 3 | @interface SPTNestedReporter : SPTReporter 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beSupersetOf.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beSupersetOf, (id subset)); 4 | 5 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+conformTo.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(conformTo, (Protocol *expected)); 4 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+notify.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(notify, (id expectedNotification)); 4 | 5 | -------------------------------------------------------------------------------- /Example/Pods/Pods-Tests-Expecta-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-Tests-environment.h" 6 | -------------------------------------------------------------------------------- /Example/Pods/Pods-Tests-Specta-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-Tests-environment.h" 6 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beNil.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beNil, (void)); 4 | 5 | #define beNull beNil 6 | -------------------------------------------------------------------------------- /Example/Pods/Pods-Tests-NPKeyboardLayoutGuide-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-Tests-environment.h" 6 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beKindOf.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beKindOf, (Class expected)); 4 | 5 | #define beAKindOf beKindOf 6 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beginWith.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beginWith, (id expected)); 4 | 5 | #define startWith beginWith 6 | -------------------------------------------------------------------------------- /Example/Pods/Pods-Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+raise.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(raise, (NSString *expectedExceptionName)); 4 | #define raiseAny() raise(nil) 5 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatcherHelpers.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | BOOL EXPIsValuePointer(NSValue *value); 4 | BOOL EXPIsNumberFloat(NSNumber *number); 5 | -------------------------------------------------------------------------------- /Example/Pods/Specta/src/SpectaTypes.h: -------------------------------------------------------------------------------- 1 | typedef void (^SPTVoidBlock)(); 2 | typedef void (^SPTAsyncBlock)(void (^)()); 3 | typedef void (^SPTDictionaryBlock)(NSDictionary *dictionary); 4 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beSubclassOf.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beSubclassOf, (Class expected)); 4 | 5 | #define beASubclassOf beSubclassOf 6 | -------------------------------------------------------------------------------- /Example/Pods/Pods-NPKeyboardLayoutGuide-NPKeyboardLayoutGuide-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-NPKeyboardLayoutGuide-environment.h" 6 | -------------------------------------------------------------------------------- /Example/Pods/Specta/src/XCTestLog+Specta.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface XCTestLog (Specta) 4 | 5 | - (void)spt_pauseObservationInBlock:(void (^)(void))block; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+raiseWithReason.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(raiseWithReason, (NSString *expectedExceptionName, NSString *expectedReason)); 4 | -------------------------------------------------------------------------------- /Example/Pods/Pods-Tests-Specta-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Tests_Specta : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Tests_Specta 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Pods-Tests-Expecta-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Tests_Expecta : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Tests_Expecta 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Specta/src/XCTestRun+Specta.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface XCTestRun (Specta) 4 | 5 | - (NSUInteger)spt_pendingTestCaseCount; 6 | - (NSUInteger)spt_skippedTestCaseCount; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Example/Pods/Pods-NPKeyboardLayoutGuide-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_NPKeyboardLayoutGuide : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_NPKeyboardLayoutGuide 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/NSValue+Expecta.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NSValue (Expecta) 4 | 5 | - (const char *)_EXP_objCType; 6 | - (void)set_EXP_objCType:(const char *)_EXP_objCType; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Example/Pods/Pods-Tests-NPKeyboardLayoutGuide-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Tests_NPKeyboardLayoutGuide : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Tests_NPKeyboardLayoutGuide 5 | @end 6 | -------------------------------------------------------------------------------- /Example/NPKeyboardLayoutGuide.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Example/Pods/Pods-Tests-Specta.xcconfig: -------------------------------------------------------------------------------- 1 | PODS_TESTS_SPECTA_FRAMEWORK_SEARCH_PATHS = $(inherited) "$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks" 2 | PODS_TESTS_SPECTA_OTHER_LDFLAGS = -framework Foundation -framework XCTest -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+equal.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_equal, (id expected)); 4 | EXPMatcherInterface(equal, (id expected)); // to aid code completion 5 | #define equal(...) _equal(EXPObjectify((__VA_ARGS__))) 6 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beInstanceOf.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beInstanceOf, (Class expected)); 4 | 5 | #define beAnInstanceOf beInstanceOf 6 | #define beMemberOf beInstanceOf 7 | #define beAMemberOf beInstanceOf 8 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beLessThan.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_beLessThan, (id expected)); 4 | EXPMatcherInterface(beLessThan, (id expected)); 5 | 6 | #define beLessThan(expected) _beLessThan(EXPObjectify((expected))) 7 | -------------------------------------------------------------------------------- /Example/NPKeyboardLayoutGuide.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+contain.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_contain, (id expected)); 4 | EXPMatcherInterface(contain, (id expected)); // to aid code completion 5 | #define contain(expected) _contain(EXPObjectify((expected))) 6 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beGreaterThan.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_beGreaterThan, (id expected)); 4 | EXPMatcherInterface(beGreaterThan, (id expected)); 5 | 6 | #define beGreaterThan(expected) _beGreaterThan(EXPObjectify((expected))) 7 | -------------------------------------------------------------------------------- /Example/Pods/Pods-NPKeyboardLayoutGuide-NPKeyboardLayoutGuide-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_NPKeyboardLayoutGuide_NPKeyboardLayoutGuide : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_NPKeyboardLayoutGuide_NPKeyboardLayoutGuide 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/EXPUnsupportedObject.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface EXPUnsupportedObject : NSObject { 4 | NSString *_type; 5 | } 6 | 7 | @property (nonatomic, retain) NSString *type; 8 | 9 | - (id)initWithType:(NSString *)type; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | target 'NPKeyboardLayoutGuide', :exclusive => true do 2 | pod "NPKeyboardLayoutGuide", :path => "../" 3 | end 4 | 5 | target 'Tests', :exclusive => true do 6 | pod "NPKeyboardLayoutGuide", :path => "../" 7 | 8 | pod 'Specta', '~> 0.2.1' 9 | pod 'Expecta' 10 | end 11 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # reference: http://www.objc.io/issue-6/travis-ci.html 2 | 3 | language: objective-c 4 | # before_install: cd Example && pod install && cd - 5 | script: 6 | - xctool test -workspace Example/NPKeyboardLayoutGuide.xcworkspace -scheme NPKeyboardLayoutGuide -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO 7 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beLessThanOrEqualTo.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_beLessThanOrEqualTo, (id expected)); 4 | EXPMatcherInterface(beLessThanOrEqualTo, (id expected)); 5 | 6 | #define beLessThanOrEqualTo(expected) _beLessThanOrEqualTo(EXPObjectify((expected))) 7 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatcherHelpers.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatcherHelpers.h" 2 | 3 | BOOL EXPIsValuePointer(NSValue *value) { 4 | return [value objCType][0] == @encode(void *)[0]; 5 | } 6 | 7 | BOOL EXPIsNumberFloat(NSNumber *number) { 8 | return strcmp([number objCType], @encode(float)) == 0; 9 | } 10 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beGreaterThanOrEqualTo.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_beGreaterThanOrEqualTo, (id expected)); 4 | EXPMatcherInterface(beGreaterThanOrEqualTo, (id expected)); 5 | 6 | #define beGreaterThanOrEqualTo(expected) _beGreaterThanOrEqualTo(EXPObjectify((expected))) 7 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every test case source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | 9 | #define EXP_SHORTHAND 10 | #import 11 | #import 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /Example/Pods/Specta/src/SPTXCTestReporter.h: -------------------------------------------------------------------------------- 1 | #import "SPTReporter.h" 2 | 3 | /** 4 | * Reporter that produces output identical to XCode's default output. Useful when integrating with 3rd-party tools that 5 | * may not like SPTNestedReporter's indented output. 6 | */ 7 | @interface SPTXCTestReporter : SPTReporter 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Example/NPKeyboardLayoutGuide/NPViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NPViewController.h 3 | // NPKeyboardLayoutGuide 4 | // 5 | // Created by Oleksii Kuchma on 09/13/2014. 6 | // Copyright (c) 2014 Oleksii Kuchma. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NPViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/Pods/Specta/src/SPTXCTestReporter.m: -------------------------------------------------------------------------------- 1 | #import "SPTXCTestReporter.h" 2 | 3 | @implementation SPTXCTestReporter 4 | 5 | /* 6 | * Intentionally left blank. 7 | * This class is included for future-compatibility just in case we need to 8 | * weak reporter output for users who want test output idential to XCTestLog. 9 | */ 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Example/Pods/Specta/src/SPTExample.m: -------------------------------------------------------------------------------- 1 | #import "SPTExample.h" 2 | 3 | @implementation SPTExample 4 | 5 | - (id)initWithName:(NSString *)name block:(id)block { 6 | self = [super init]; 7 | if (self) { 8 | self.name = name; 9 | self.block = block; 10 | self.pending = block == nil; 11 | } 12 | return self; 13 | } 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/EXPBackwardCompatibility.m: -------------------------------------------------------------------------------- 1 | #import "EXPBackwardCompatibility.h" 2 | 3 | @implementation EXPExpect (BackwardCompatiblity) 4 | 5 | - (EXPExpect *)Not { 6 | return self.toNot; 7 | } 8 | 9 | - (EXPExpect *)isGoing { 10 | return self.will; 11 | } 12 | 13 | - (EXPExpect *)isNotGoing { 14 | return self.willNot; 15 | } 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/EXPFloatTuple.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface EXPFloatTuple : NSObject { 4 | float *_values; 5 | size_t _size; 6 | } 7 | 8 | @property (nonatomic, assign) float *values; 9 | @property (nonatomic, assign) size_t size; 10 | 11 | - (id)initWithFloatValues:(float *)values size:(size_t)size; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/EXPDoubleTuple.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface EXPDoubleTuple : NSObject { 4 | double *_values; 5 | size_t _size; 6 | } 7 | 8 | @property (nonatomic, assign) double *values; 9 | @property (nonatomic, assign) size_t size; 10 | 11 | - (id)initWithDoubleValues:(double *)values size:(size_t)size; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/Expecta.m: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | @implementation Expecta 4 | 5 | static NSTimeInterval _asynchronousTestTimeout = 1.0; 6 | 7 | + (NSTimeInterval)asynchronousTestTimeout { 8 | return _asynchronousTestTimeout; 9 | } 10 | 11 | + (void)setAsynchronousTestTimeout:(NSTimeInterval)timeout { 12 | _asynchronousTestTimeout = timeout; 13 | } 14 | 15 | @end -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+haveCountOf.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(haveCountOf, (NSUInteger expected)); 4 | 5 | #define haveCount haveCountOf 6 | #define haveACountOf haveCountOf 7 | #define haveLength haveCountOf 8 | #define haveLengthOf haveCountOf 9 | #define haveALengthOf haveCountOf 10 | #define beEmpty() haveCountOf(0) 11 | -------------------------------------------------------------------------------- /Example/NPKeyboardLayoutGuide/NPAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // NPAppDelegate.h 3 | // NPKeyboardLayoutGuide 4 | // 5 | // Created by CocoaPods on 09/13/2014. 6 | // Copyright (c) 2014 Oleksii Kuchma. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NPAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beCloseTo.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_beCloseToWithin, (id expected, id within)); 4 | EXPMatcherInterface(beCloseToWithin, (id expected, id within)); 5 | 6 | #define beCloseTo(expected) _beCloseToWithin(EXPObjectify((expected)), nil) 7 | #define beCloseToWithin(expected, range) _beCloseToWithin(EXPObjectify((expected)), EXPObjectify((range))) 8 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beIdenticalTo.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_beIdenticalTo, (void *expected)); 4 | EXPMatcherInterface(beIdenticalTo, (void *expected)); // to aid code completion 5 | 6 | #if __has_feature(objc_arc) 7 | #define beIdenticalTo(expected) _beIdenticalTo((__bridge void*)expected) 8 | #else 9 | #define beIdenticalTo _beIdenticalTo 10 | #endif 11 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/EXPUnsupportedObject.m: -------------------------------------------------------------------------------- 1 | #import "EXPUnsupportedObject.h" 2 | 3 | @implementation EXPUnsupportedObject 4 | 5 | @synthesize type=_type; 6 | 7 | - (id)initWithType:(NSString *)type { 8 | self = [super init]; 9 | if(self) { 10 | self.type = type; 11 | } 12 | return self; 13 | } 14 | 15 | - (void)dealloc { 16 | self.type = nil; 17 | [super dealloc]; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beInTheRangeOf.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_beInTheRangeOf, (id expectedLowerBound, id expectedUpperBound)); 4 | EXPMatcherInterface(beInTheRangeOf, (id expectedLowerBound, id expectedUpperBound)); 5 | 6 | #define beInTheRangeOf(expectedLowerBound, expectedUpperBound) _beInTheRangeOf(EXPObjectify((expectedLowerBound)), EXPObjectify((expectedUpperBound))) 7 | -------------------------------------------------------------------------------- /Example/Pods/Specta/src/SPTExample.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "SpectaTypes.h" 3 | 4 | @interface SPTExample : NSObject 5 | 6 | @property (nonatomic, copy) NSString *name; 7 | @property (nonatomic, copy) id block; 8 | @property (nonatomic) BOOL pending; 9 | @property (nonatomic, getter = isFocused) BOOL focused; 10 | 11 | - (id)initWithName:(NSString *)name block:(id)block; 12 | 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /Example/Pods/Pods-Tests-Expecta-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-Tests-Expecta.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/Expecta" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Expecta" "${PODS_ROOT}/Headers/NPKeyboardLayoutGuide" "${PODS_ROOT}/Headers/Specta" 4 | OTHER_LDFLAGS = -ObjC ${PODS_TESTS_EXPECTA_OTHER_LDFLAGS} 5 | PODS_ROOT = ${SRCROOT} -------------------------------------------------------------------------------- /Example/Pods/Pods-Tests-NPKeyboardLayoutGuide-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-Tests-NPKeyboardLayoutGuide.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/NPKeyboardLayoutGuide" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Expecta" "${PODS_ROOT}/Headers/NPKeyboardLayoutGuide" "${PODS_ROOT}/Headers/Specta" 4 | OTHER_LDFLAGS = -ObjC 5 | PODS_ROOT = ${SRCROOT} -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/EXPDefines.h: -------------------------------------------------------------------------------- 1 | // 2 | // EXPDefines.h 3 | // Expecta 4 | // 5 | // Created by Luke Redpath on 26/03/2012. 6 | // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved. 7 | // 8 | 9 | #ifndef Expecta_EXPDefines_h 10 | #define Expecta_EXPDefines_h 11 | 12 | typedef void (^EXPBasicBlock)(); 13 | typedef id (^EXPIdBlock)(); 14 | typedef BOOL (^EXPBoolBlock)(); 15 | typedef NSString *(^EXPStringBlock)(); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /Example/Pods/Pods-NPKeyboardLayoutGuide-NPKeyboardLayoutGuide-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-NPKeyboardLayoutGuide-NPKeyboardLayoutGuide.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/NPKeyboardLayoutGuide" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Expecta" "${PODS_ROOT}/Headers/NPKeyboardLayoutGuide" "${PODS_ROOT}/Headers/Specta" 4 | OTHER_LDFLAGS = -ObjC 5 | PODS_ROOT = ${SRCROOT} -------------------------------------------------------------------------------- /Example/NPKeyboardLayoutGuide/NPKeyboardLayoutGuide-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /Example/NPKeyboardLayoutGuide/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // NPKeyboardLayoutGuide 4 | // 5 | // Created by Oleksii Kuchma on 09/13/2014. 6 | // Copyright (c) 2014 Oleksii Kuchma. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "NPAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([NPAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/NSObject+Expecta.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NSObject (Expecta) 4 | 5 | #ifdef USE_XCTEST 6 | - (void)recordFailureWithDescription:(NSString *)description 7 | inFile:(NSString *)filename 8 | atLine:(NSUInteger)lineNumber 9 | expected:(BOOL)expected; 10 | #else 11 | - (void)failWithException:(NSException *)exception; 12 | #endif 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Example/Pods/Pods-NPKeyboardLayoutGuide.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Expecta" "${PODS_ROOT}/Headers/NPKeyboardLayoutGuide" "${PODS_ROOT}/Headers/Specta" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers" -isystem "${PODS_ROOT}/Headers/Expecta" -isystem "${PODS_ROOT}/Headers/NPKeyboardLayoutGuide" -isystem "${PODS_ROOT}/Headers/Specta" 4 | OTHER_LDFLAGS = -ObjC 5 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Example/Pods/Pods-Tests-Specta-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-Tests-Specta.xcconfig" 2 | FRAMEWORK_SEARCH_PATHS = ${PODS_TESTS_SPECTA_FRAMEWORK_SEARCH_PATHS} 3 | GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1 4 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/Specta" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Expecta" "${PODS_ROOT}/Headers/NPKeyboardLayoutGuide" "${PODS_ROOT}/Headers/Specta" 5 | OTHER_LDFLAGS = -ObjC ${PODS_TESTS_SPECTA_OTHER_LDFLAGS} 6 | PODS_ROOT = ${SRCROOT} -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/EXPMatcher.h: -------------------------------------------------------------------------------- 1 | // 2 | // EXPMatcher.h 3 | // Expecta 4 | // 5 | // Created by Luke Redpath on 26/03/2012. 6 | // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol EXPMatcher 12 | 13 | - (BOOL)matches:(id)actual; 14 | 15 | @optional 16 | - (BOOL)meetsPrerequesiteFor:(id)actual; 17 | - (NSString *)failureMessageForTo:(id)actual; 18 | - (NSString *)failureMessageForNotTo:(id)actual; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Expecta (0.3.1) 3 | - NPKeyboardLayoutGuide (1.0.0) 4 | - Specta (0.2.1) 5 | 6 | DEPENDENCIES: 7 | - Expecta 8 | - NPKeyboardLayoutGuide (from `../`) 9 | - Specta (~> 0.2.1) 10 | 11 | EXTERNAL SOURCES: 12 | NPKeyboardLayoutGuide: 13 | :path: ../ 14 | 15 | SPEC CHECKSUMS: 16 | Expecta: 03aabd0a89d8dea843baecb19a7fd7466a69a31d 17 | NPKeyboardLayoutGuide: 3e9640a5d011dc6c0fbb69e347adf5c2609b01f2 18 | Specta: 9141310f46b1f68b676650ff2854e1ed0b74163a 19 | 20 | COCOAPODS: 0.33.1 21 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Expecta (0.3.1) 3 | - NPKeyboardLayoutGuide (1.0.0) 4 | - Specta (0.2.1) 5 | 6 | DEPENDENCIES: 7 | - Expecta 8 | - NPKeyboardLayoutGuide (from `../`) 9 | - Specta (~> 0.2.1) 10 | 11 | EXTERNAL SOURCES: 12 | NPKeyboardLayoutGuide: 13 | :path: ../ 14 | 15 | SPEC CHECKSUMS: 16 | Expecta: 03aabd0a89d8dea843baecb19a7fd7466a69a31d 17 | NPKeyboardLayoutGuide: 3e9640a5d011dc6c0fbb69e347adf5c2609b01f2 18 | Specta: 9141310f46b1f68b676650ff2854e1ed0b74163a 19 | 20 | COCOAPODS: 0.33.1 21 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beNil.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beNil.h" 2 | 3 | EXPMatcherImplementationBegin(beNil, (void)) { 4 | match(^BOOL{ 5 | return actual == nil; 6 | }); 7 | 8 | failureMessageForTo(^NSString *{ 9 | return [NSString stringWithFormat:@"expected: nil/null, got: %@", EXPDescribeObject(actual)]; 10 | }); 11 | 12 | failureMessageForNotTo(^NSString *{ 13 | return [NSString stringWithFormat:@"expected: not nil/null, got: %@", EXPDescribeObject(actual)]; 14 | }); 15 | } 16 | EXPMatcherImplementationEnd 17 | -------------------------------------------------------------------------------- /Example/Pods/Pods-NPKeyboardLayoutGuide-environment.h: -------------------------------------------------------------------------------- 1 | 2 | // To check if a library is compiled with CocoaPods you 3 | // can use the `COCOAPODS` macro definition which is 4 | // defined in the xcconfigs so it is available in 5 | // headers also when they are imported in the client 6 | // project. 7 | 8 | 9 | // NPKeyboardLayoutGuide 10 | #define COCOAPODS_POD_AVAILABLE_NPKeyboardLayoutGuide 11 | #define COCOAPODS_VERSION_MAJOR_NPKeyboardLayoutGuide 1 12 | #define COCOAPODS_VERSION_MINOR_NPKeyboardLayoutGuide 0 13 | #define COCOAPODS_VERSION_PATCH_NPKeyboardLayoutGuide 0 14 | 15 | -------------------------------------------------------------------------------- /Example/Pods/Pods-Tests.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Expecta" "${PODS_ROOT}/Headers/NPKeyboardLayoutGuide" "${PODS_ROOT}/Headers/Specta" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers" -isystem "${PODS_ROOT}/Headers/Expecta" -isystem "${PODS_ROOT}/Headers/NPKeyboardLayoutGuide" -isystem "${PODS_ROOT}/Headers/Specta" 5 | OTHER_LDFLAGS = -ObjC -framework Foundation -framework XCTest 6 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Example/Pods/Specta/src/SPTSpec.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class 4 | SPTExample 5 | , SPTExampleGroup 6 | ; 7 | 8 | @interface SPTSpec : NSObject 9 | 10 | @property (nonatomic, strong) SPTExampleGroup *rootGroup; 11 | @property (nonatomic, strong) NSMutableArray *groupStack; 12 | @property (nonatomic, strong) NSArray *compiledExamples; 13 | @property (nonatomic, strong) NSString *fileName; 14 | @property (nonatomic) NSUInteger lineNumber; 15 | @property (nonatomic, getter = isDisabled) BOOL disabled; 16 | @property (nonatomic) BOOL hasFocusedExamples; 17 | 18 | - (SPTExampleGroup *)currentGroup; 19 | - (void)compile; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Example/Pods/Specta/src/SPTSharedExampleGroups.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "SpectaTypes.h" 3 | 4 | @class 5 | SPTExampleGroup 6 | ; 7 | 8 | @interface SPTSharedExampleGroups : NSObject 9 | 10 | + (void)addSharedExampleGroupWithName:(NSString *)name block:(SPTDictionaryBlock)block exampleGroup:(SPTExampleGroup *)exampleGroup; 11 | + (SPTDictionaryBlock)sharedExampleGroupWithName:(NSString *)name exampleGroup:(SPTExampleGroup *)exampleGroup; 12 | + (void)defineSharedExampleGroups; 13 | 14 | + (void)recordFailureWithDescription:(NSString *)description inFile:(NSString *)filename atLine:(NSUInteger)lineNumber expected:(BOOL)expected; 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/NSValue+Expecta.m: -------------------------------------------------------------------------------- 1 | #import "NSValue+Expecta.h" 2 | #import 3 | #import "Expecta.h" 4 | 5 | EXPFixCategoriesBug(NSValue_Expecta); 6 | 7 | @implementation NSValue (Expecta) 8 | 9 | static char _EXP_typeKey; 10 | 11 | - (const char *)_EXP_objCType { 12 | return [(NSString *)objc_getAssociatedObject(self, &_EXP_typeKey) cStringUsingEncoding:NSASCIIStringEncoding]; 13 | } 14 | 15 | - (void)set_EXP_objCType:(const char *)_EXP_objCType { 16 | objc_setAssociatedObject(self, &_EXP_typeKey, 17 | [NSString stringWithCString:_EXP_objCType encoding:NSASCIIStringEncoding], 18 | OBJC_ASSOCIATION_COPY_NONATOMIC); 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Example/Pods/Specta/src/SpectaUtility.h: -------------------------------------------------------------------------------- 1 | #import 2 | extern NSString * const SPTCurrentSpecKey; 3 | extern NSString * const SPTCurrentTestCaseKey; 4 | 5 | #define SPTCurrentSpec [[NSThread currentThread] threadDictionary][SPTCurrentSpecKey] 6 | #define SPTCurrentTestCase [[NSThread currentThread] threadDictionary][SPTCurrentTestCaseKey] 7 | #define SPTCurrentGroup [SPTCurrentSpec currentGroup] 8 | #define SPTGroupStack [SPTCurrentSpec groupStack] 9 | 10 | #define SPTReturnUnlessBlockOrNil(block) if ((block) && !SPTIsBlock((block))) return; 11 | #define SPTIsBlock(obj) [(obj) isKindOfClass:NSClassFromString(@"NSBlock")] 12 | 13 | const char *SPTGetBlockSignature(id blockObject); 14 | BOOL SPTIsSpecClass(Class aClass); -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | # We recommend against adding the Pods directory to your .gitignore. However 26 | # you should judge for yourself, the pros and cons are mentioned at: 27 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 28 | # 29 | # Note: if you ignore the Pods directory, make sure to uncomment 30 | # `pod install` in .travis.yml 31 | # 32 | # Pods/ 33 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Example/Pods/Specta/src/SPTSpec.m: -------------------------------------------------------------------------------- 1 | #import "SPTSpec.h" 2 | #import "SPTExampleGroup.h" 3 | #import "SPTExample.h" 4 | 5 | @implementation SPTSpec 6 | 7 | - (id)init { 8 | self = [super init]; 9 | if (self) { 10 | self.rootGroup = [[SPTExampleGroup alloc] init]; 11 | self.rootGroup.root = self.rootGroup; 12 | self.groupStack = [NSMutableArray arrayWithObject:self.rootGroup]; 13 | } 14 | return self; 15 | } 16 | 17 | - (SPTExampleGroup *)currentGroup { 18 | return [self.groupStack lastObject]; 19 | } 20 | 21 | - (void)compile { 22 | self.compiledExamples = [self.rootGroup compileExamplesWithNameStack:@[]]; 23 | for (SPTExample *example in self.compiledExamples) { 24 | if (example.focused) { 25 | self.hasFocusedExamples = YES; 26 | break; 27 | } 28 | } 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beLessThan.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beLessThan.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(_beLessThan, (id expected)) { 5 | match(^BOOL{ 6 | if ([actual respondsToSelector:@selector(compare:)]) { 7 | return [actual compare:expected] == NSOrderedAscending; 8 | } 9 | return NO; 10 | }); 11 | 12 | failureMessageForTo(^NSString *{ 13 | return [NSString stringWithFormat:@"expected: %@ to be less than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 14 | }); 15 | 16 | failureMessageForNotTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: %@ not to be less than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 18 | }); 19 | } 20 | EXPMatcherImplementationEnd -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beIdenticalTo.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+equal.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(beIdenticalTo, (void *expected)) { 5 | match(^BOOL{ 6 | if(actual == expected) { 7 | return YES; 8 | } else if([actual isKindOfClass:[NSValue class]] && EXPIsValuePointer((NSValue *)actual)) { 9 | if([(NSValue *)actual pointerValue] == expected) { 10 | return YES; 11 | } 12 | } 13 | return NO; 14 | }); 15 | 16 | failureMessageForTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: <%p>, got: <%p>", expected, actual]; 18 | }); 19 | 20 | failureMessageForNotTo(^NSString *{ 21 | return [NSString stringWithFormat:@"expected: not <%p>, got: <%p>", expected, actual]; 22 | }); 23 | } 24 | EXPMatcherImplementationEnd 25 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/EXPBlockDefinedMatcher.h: -------------------------------------------------------------------------------- 1 | // 2 | // EXPRuntimeMatcher.h 3 | // Expecta 4 | // 5 | // Created by Luke Redpath on 26/03/2012. 6 | // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "EXPMatcher.h" 11 | #import "EXPDefines.h" 12 | 13 | @interface EXPBlockDefinedMatcher : NSObject { 14 | EXPBoolBlock prerequisiteBlock; 15 | EXPBoolBlock matchBlock; 16 | EXPStringBlock failureMessageForToBlock; 17 | EXPStringBlock failureMessageForNotToBlock; 18 | } 19 | 20 | @property(nonatomic, copy) EXPBoolBlock prerequisiteBlock; 21 | @property(nonatomic, copy) EXPBoolBlock matchBlock; 22 | @property(nonatomic, copy) EXPStringBlock failureMessageForToBlock; 23 | @property(nonatomic, copy) EXPStringBlock failureMessageForNotToBlock; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beGreaterThan.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beGreaterThan.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(_beGreaterThan, (id expected)) { 5 | match(^BOOL{ 6 | if ([actual respondsToSelector:@selector(compare:)]) { 7 | return [actual compare:expected] == NSOrderedDescending; 8 | } 9 | return NO; 10 | }); 11 | 12 | failureMessageForTo(^NSString *{ 13 | return [NSString stringWithFormat:@"expected: %@ to be greater than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 14 | }); 15 | 16 | failureMessageForNotTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: %@ not to be greater than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 18 | }); 19 | } 20 | EXPMatcherImplementationEnd -------------------------------------------------------------------------------- /Example/Pods/Specta/src/XCTestCase+Specta.m: -------------------------------------------------------------------------------- 1 | #import "XCTestCase+Specta.h" 2 | #import "SPTXCTestCase.h" 3 | #import "SPTExample.h" 4 | #import 5 | 6 | @interface XCTestCase (xct_allSubclasses) 7 | 8 | - (NSArray *)xct_allSubclasses; 9 | 10 | @end 11 | 12 | @implementation XCTestCase (Specta) 13 | 14 | + (void)load { 15 | Method xct_allSubclasses = class_getClassMethod(self, @selector(xct_allSubclasses)); 16 | Method xct_allSubclasses_swizzle = class_getClassMethod(self, @selector(xct_allSubclasses_swizzle)); 17 | method_exchangeImplementations(xct_allSubclasses, xct_allSubclasses_swizzle); 18 | } 19 | 20 | + (NSArray *)xct_allSubclasses_swizzle { 21 | NSMutableArray *subclasses = [[self xct_allSubclasses_swizzle] mutableCopy]; // call original 22 | [subclasses removeObject:[SPTXCTestCase class]]; 23 | return subclasses; 24 | } 25 | 26 | @end -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beLessThanOrEqualTo.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beLessThanOrEqualTo.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(_beLessThanOrEqualTo, (id expected)) { 5 | match(^BOOL{ 6 | if ([actual respondsToSelector:@selector(compare:)]) { 7 | return [actual compare:expected] != NSOrderedDescending; 8 | } 9 | return NO; 10 | }); 11 | 12 | failureMessageForTo(^NSString *{ 13 | return [NSString stringWithFormat:@"expected: %@ to be less than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 14 | }); 15 | 16 | failureMessageForNotTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: %@ not to be less than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 18 | }); 19 | } 20 | EXPMatcherImplementationEnd -------------------------------------------------------------------------------- /Example/Pods/Specta/src/SPTXCTestCase.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "XCTestCase+Specta.h" 3 | 4 | @class 5 | SPTSpec 6 | , SPTExample 7 | ; 8 | 9 | @interface SPTXCTestCase : XCTestCase 10 | 11 | @property (nonatomic, strong) NSInvocation *spt_invocation; 12 | @property (nonatomic, strong) XCTestCaseRun *spt_run; 13 | @property (nonatomic, assign) BOOL spt_skipped; 14 | @property (nonatomic, assign, readonly, getter = spt_isPending) BOOL spt_pending; 15 | 16 | + (BOOL)spt_isDisabled; 17 | + (void)spt_setDisabled:(BOOL)disabled; 18 | + (BOOL)spt_focusedExamplesExist; 19 | 20 | + (SPTSpec *)spt_spec; 21 | - (void)spt_setCurrentSpecWithFileName:(const char *)fileName lineNumber:(NSUInteger)lineNumber; 22 | - (void)spt_defineSpec; 23 | - (void)spt_unsetCurrentSpec; 24 | - (void)spt_runExampleAtIndex:(NSUInteger)index; 25 | - (SPTExample *)spt_getCurrentExample; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beGreaterThanOrEqualTo.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beGreaterThanOrEqualTo.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(_beGreaterThanOrEqualTo, (id expected)) { 5 | match(^BOOL{ 6 | if ([actual respondsToSelector:@selector(compare:)]) { 7 | return [actual compare:expected] != NSOrderedAscending; 8 | } 9 | return NO; 10 | }); 11 | 12 | failureMessageForTo(^NSString *{ 13 | return [NSString stringWithFormat:@"expected: %@ to be greater than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 14 | }); 15 | 16 | failureMessageForNotTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: %@ not to be greater than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 18 | }); 19 | } 20 | EXPMatcherImplementationEnd -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beFalsy.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beFalsy.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(beFalsy, (void)) { 5 | match(^BOOL{ 6 | if([actual isKindOfClass:[NSNumber class]]) { 7 | return ![(NSNumber *)actual boolValue]; 8 | } else if([actual isKindOfClass:[NSValue class]]) { 9 | if(EXPIsValuePointer((NSValue *)actual)) { 10 | return ![(NSValue *)actual pointerValue]; 11 | } 12 | } 13 | return !actual; 14 | }); 15 | 16 | failureMessageForTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: a falsy value, got: %@, which is truthy", EXPDescribeObject(actual)]; 18 | }); 19 | 20 | failureMessageForNotTo(^NSString *{ 21 | return [NSString stringWithFormat:@"expected: a non-falsy value, got: %@, which is falsy", EXPDescribeObject(actual)]; 22 | }); 23 | } 24 | EXPMatcherImplementationEnd 25 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beTruthy.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beTruthy.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(beTruthy, (void)) { 5 | match(^BOOL{ 6 | if([actual isKindOfClass:[NSNumber class]]) { 7 | return !![(NSNumber *)actual boolValue]; 8 | } else if([actual isKindOfClass:[NSValue class]]) { 9 | if(EXPIsValuePointer((NSValue *)actual)) { 10 | return !![(NSValue *)actual pointerValue]; 11 | } 12 | } 13 | return !!actual; 14 | }); 15 | 16 | failureMessageForTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: a truthy value, got: %@, which is falsy", EXPDescribeObject(actual)]; 18 | }); 19 | 20 | failureMessageForNotTo(^NSString *{ 21 | return [NSString stringWithFormat:@"expected: a non-truthy value, got: %@, which is truthy", EXPDescribeObject(actual)]; 22 | }); 23 | } 24 | EXPMatcherImplementationEnd 25 | -------------------------------------------------------------------------------- /Example/Pods/Pods-Tests-environment.h: -------------------------------------------------------------------------------- 1 | 2 | // To check if a library is compiled with CocoaPods you 3 | // can use the `COCOAPODS` macro definition which is 4 | // defined in the xcconfigs so it is available in 5 | // headers also when they are imported in the client 6 | // project. 7 | 8 | 9 | // Expecta 10 | #define COCOAPODS_POD_AVAILABLE_Expecta 11 | #define COCOAPODS_VERSION_MAJOR_Expecta 0 12 | #define COCOAPODS_VERSION_MINOR_Expecta 3 13 | #define COCOAPODS_VERSION_PATCH_Expecta 1 14 | 15 | // NPKeyboardLayoutGuide 16 | #define COCOAPODS_POD_AVAILABLE_NPKeyboardLayoutGuide 17 | #define COCOAPODS_VERSION_MAJOR_NPKeyboardLayoutGuide 1 18 | #define COCOAPODS_VERSION_MINOR_NPKeyboardLayoutGuide 0 19 | #define COCOAPODS_VERSION_PATCH_NPKeyboardLayoutGuide 0 20 | 21 | // Specta 22 | #define COCOAPODS_POD_AVAILABLE_Specta 23 | #define COCOAPODS_VERSION_MAJOR_Specta 0 24 | #define COCOAPODS_VERSION_MINOR_Specta 2 25 | #define COCOAPODS_VERSION_PATCH_Specta 1 26 | 27 | -------------------------------------------------------------------------------- /Example/Tests/Tests.m: -------------------------------------------------------------------------------- 1 | // 2 | // NPKeyboardLayoutGuideTests.m 3 | // NPKeyboardLayoutGuideTests 4 | // 5 | // Created by Oleksii Kuchma on 09/13/2014. 6 | // Copyright (c) 2014 Oleksii Kuchma. All rights reserved. 7 | // 8 | 9 | #import "NPKeyboardLayoutGuide.h" 10 | 11 | #import 12 | 13 | SpecBegin(InitialSpecs) 14 | 15 | describe(@"Creation of layout guide", ^{ 16 | 17 | it (@"lazily", ^{ 18 | UIViewController *vc = [[UIViewController alloc] init]; 19 | 20 | id layoutGuide = vc.keyboardLayoutGuide; 21 | 22 | expect(layoutGuide).toNot.equal(nil); 23 | }); 24 | 25 | it (@"repeatedly", ^{ 26 | UIViewController *vc = [[UIViewController alloc] init]; 27 | 28 | id layoutGuide = vc.keyboardLayoutGuide; 29 | id nextLayoutGuide = vc.keyboardLayoutGuide; 30 | 31 | expect(layoutGuide).to.equal(nextLayoutGuide); 32 | }); 33 | }); 34 | 35 | SpecEnd 36 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers.h: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beNil.h" 2 | #import "EXPMatchers+equal.h" 3 | #import "EXPMatchers+beInstanceOf.h" 4 | #import "EXPMatchers+beKindOf.h" 5 | #import "EXPMatchers+beSubclassOf.h" 6 | #import "EXPMatchers+conformTo.h" 7 | #import "EXPMatchers+beTruthy.h" 8 | #import "EXPMatchers+beFalsy.h" 9 | #import "EXPMatchers+contain.h" 10 | #import "EXPMatchers+beSupersetOf.h" 11 | #import "EXPMatchers+haveCountOf.h" 12 | #import "EXPMatchers+beIdenticalTo.h" 13 | #import "EXPMatchers+beGreaterThan.h" 14 | #import "EXPMatchers+beGreaterThanOrEqualTo.h" 15 | #import "EXPMatchers+beLessThan.h" 16 | #import "EXPMatchers+beLessThanOrEqualTo.h" 17 | #import "EXPMatchers+beInTheRangeOf.h" 18 | #import "EXPMatchers+beCloseTo.h" 19 | #import "EXPMatchers+raise.h" 20 | #import "EXPMatchers+raiseWithReason.h" 21 | #import "EXPMatchers+respondTo.h" 22 | #import "EXPMatchers+notify.h" 23 | #import "EXPMatchers+beginWith.h" 24 | #import "EXPMatchers+endWith.h" 25 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/Expecta.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "ExpectaSupport.h" 3 | 4 | #define EXPObjectify(value) _EXPObjectify(@encode(__typeof__((value))), (value)) 5 | 6 | #define EXP_expect(actual) _EXP_expect(self, __LINE__, __FILE__, ^id{ return EXPObjectify((actual)); }) 7 | 8 | #define EXPMatcherInterface(matcherName, matcherArguments) _EXPMatcherInterface(matcherName, matcherArguments) 9 | #define EXPMatcherImplementationBegin(matcherName, matcherArguments) _EXPMatcherImplementationBegin(matcherName, matcherArguments) 10 | #define EXPMatcherImplementationEnd _EXPMatcherImplementationEnd 11 | 12 | #import "EXPMatchers.h" 13 | 14 | #ifdef EXP_SHORTHAND 15 | # define expect(...) EXP_expect((__VA_ARGS__)) 16 | #endif 17 | 18 | #ifdef EXP_OLD_SYNTAX 19 | # import "EXPBackwardCompatibility.h" 20 | #endif 21 | 22 | @interface Expecta : NSObject 23 | 24 | + (NSTimeInterval)asynchronousTestTimeout; 25 | + (void)setAsynchronousTestTimeout:(NSTimeInterval)timeout; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+equal.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+equal.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(_equal, (id expected)) { 5 | match(^BOOL{ 6 | if((actual == expected) || [actual isEqual:expected]) { 7 | return YES; 8 | } else if([actual isKindOfClass:[NSNumber class]] && [expected isKindOfClass:[NSNumber class]]) { 9 | if(EXPIsNumberFloat((NSNumber *)actual) || EXPIsNumberFloat((NSNumber *)expected)) { 10 | return [(NSNumber *)actual floatValue] == [(NSNumber *)expected floatValue]; 11 | } 12 | } 13 | return NO; 14 | }); 15 | 16 | failureMessageForTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: %@, got: %@", EXPDescribeObject(expected), EXPDescribeObject(actual)]; 18 | }); 19 | 20 | failureMessageForNotTo(^NSString *{ 21 | return [NSString stringWithFormat:@"expected: not %@, got: %@", EXPDescribeObject(expected), EXPDescribeObject(actual)]; 22 | }); 23 | } 24 | EXPMatcherImplementationEnd 25 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beInstanceOf.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beInstanceOf.h" 2 | 3 | EXPMatcherImplementationBegin(beInstanceOf, (Class expected)) { 4 | BOOL actualIsNil = (actual == nil); 5 | BOOL expectedIsNil = (expected == nil); 6 | 7 | prerequisite(^BOOL{ 8 | return !(actualIsNil || expectedIsNil); 9 | }); 10 | 11 | match(^BOOL{ 12 | return [actual isMemberOfClass:expected]; 13 | }); 14 | 15 | failureMessageForTo(^NSString *{ 16 | if(actualIsNil) return @"the actual value is nil/null"; 17 | if(expectedIsNil) return @"the expected value is nil/null"; 18 | return [NSString stringWithFormat:@"expected: an instance of %@, got: an instance of %@", [expected class], [actual class]]; 19 | }); 20 | 21 | failureMessageForNotTo(^NSString *{ 22 | if(actualIsNil) return @"the actual value is nil/null"; 23 | if(expectedIsNil) return @"the expected value is nil/null"; 24 | return [NSString stringWithFormat:@"expected: not an instance of %@, got: an instance of %@", [expected class], [actual class]]; 25 | }); 26 | } 27 | EXPMatcherImplementationEnd 28 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beSubclassOf.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beSubclassOf.h" 2 | #import "NSValue+Expecta.h" 3 | #import 4 | 5 | EXPMatcherImplementationBegin(beSubclassOf, (Class expected)) { 6 | __block BOOL actualIsClass = YES; 7 | 8 | prerequisite(^BOOL { 9 | actualIsClass = class_isMetaClass(object_getClass(actual)); 10 | return actualIsClass; 11 | }); 12 | 13 | match(^BOOL{ 14 | return [actual isSubclassOfClass:expected]; 15 | }); 16 | 17 | failureMessageForTo(^NSString *{ 18 | if(!actualIsClass) return @"the actual value is not a Class"; 19 | return [NSString stringWithFormat:@"expected: a subclass of %@, got: a class %@, which is not a subclass of %@", [expected class], actual, [expected class]]; 20 | }); 21 | 22 | failureMessageForNotTo(^NSString *{ 23 | if(!actualIsClass) return @"the actual value is not a Class"; 24 | return [NSString stringWithFormat:@"expected: not a subclass of %@, got: a class %@, which is a subclass of %@", [expected class], actual, [expected class]]; 25 | }); 26 | } 27 | EXPMatcherImplementationEnd 28 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+respondTo.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+respondTo.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(respondTo, (SEL expected)) { 5 | BOOL actualIsNil = (actual == nil); 6 | BOOL expectedIsNull = (expected == NULL); 7 | 8 | prerequisite (^BOOL { 9 | return !(actualIsNil || expectedIsNull); 10 | }); 11 | 12 | match(^BOOL { 13 | return [actual respondsToSelector:expected]; 14 | }); 15 | 16 | failureMessageForTo(^NSString *{ 17 | if (actualIsNil) return @"the object is nil/null"; 18 | if (expectedIsNull) return @"the selector is null"; 19 | return [NSString stringWithFormat:@"expected: %@ to respond to %@", EXPDescribeObject(actual), NSStringFromSelector(expected)]; 20 | }); 21 | 22 | failureMessageForNotTo(^NSString *{ 23 | if (actualIsNil) return @"the object is nil/null"; 24 | if (expectedIsNull) return @"the selector is null"; 25 | return [NSString stringWithFormat:@"expected: %@ not to respond to %@", EXPDescribeObject(actual), NSStringFromSelector(expected)]; 26 | }); 27 | } 28 | EXPMatcherImplementationEnd 29 | -------------------------------------------------------------------------------- /Example/NPKeyboardLayoutGuide/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "ipad", 20 | "size" : "29x29", 21 | "scale" : "1x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "40x40", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "76x76", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "2x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Oleksii Kuchma 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Example/Pods/Specta/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012-2013 Specta Team. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | 21 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beKindOf.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beKindOf.h" 2 | 3 | EXPMatcherImplementationBegin(beKindOf, (Class expected)) { 4 | BOOL actualIsNil = (actual == nil); 5 | BOOL expectedIsNil = (expected == nil); 6 | 7 | prerequisite(^BOOL{ 8 | return !(actualIsNil || expectedIsNil); 9 | }); 10 | 11 | match(^BOOL{ 12 | return [actual isKindOfClass:expected]; 13 | }); 14 | 15 | failureMessageForTo(^NSString *{ 16 | if(actualIsNil) return @"the actual value is nil/null"; 17 | if(expectedIsNil) return @"the expected value is nil/null"; 18 | return [NSString stringWithFormat:@"expected: a kind of %@, got: an instance of %@, which is not a kind of %@", [expected class], [actual class], [expected class]]; 19 | }); 20 | 21 | failureMessageForNotTo(^NSString *{ 22 | if(actualIsNil) return @"the actual value is nil/null"; 23 | if(expectedIsNil) return @"the expected value is nil/null"; 24 | return [NSString stringWithFormat:@"expected: not a kind of %@, got: an instance of %@, which is a kind of %@", [expected class], [actual class], [expected class]]; 25 | }); 26 | } 27 | EXPMatcherImplementationEnd 28 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2012 Specta Team - https://github.com/specta 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+conformTo.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+conformTo.h" 2 | #import "NSValue+Expecta.h" 3 | #import 4 | 5 | EXPMatcherImplementationBegin(conformTo, (Protocol *expected)) { 6 | BOOL actualIsNil = (actual == nil); 7 | BOOL expectedIsNil = (expected == nil); 8 | 9 | prerequisite(^BOOL{ 10 | return !(actualIsNil || expectedIsNil); 11 | }); 12 | 13 | match(^BOOL{ 14 | return [actual conformsToProtocol:expected]; 15 | }); 16 | 17 | failureMessageForTo(^NSString *{ 18 | if(actualIsNil) return @"the object is nil/null"; 19 | if(expectedIsNil) return @"the protocol is nil/null"; 20 | 21 | NSString *name = NSStringFromProtocol(expected); 22 | return [NSString stringWithFormat:@"expected: %@ to conform to %@", actual, name]; 23 | }); 24 | 25 | failureMessageForNotTo(^NSString *{ 26 | if(actualIsNil) return @"the object is nil/null"; 27 | if(expectedIsNil) return @"the protocol is nil/null"; 28 | 29 | NSString *name = NSStringFromProtocol(expected); 30 | return [NSString stringWithFormat:@"expected: %@ not to conform to %@", actual, name]; 31 | }); 32 | } 33 | EXPMatcherImplementationEnd 34 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+raise.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+raise.h" 2 | #import "EXPDefines.h" 3 | 4 | EXPMatcherImplementationBegin(raise, (NSString *expectedExceptionName)) { 5 | __block NSException *exceptionCaught = nil; 6 | 7 | match(^BOOL{ 8 | BOOL expectedExceptionCaught = NO; 9 | @try { 10 | ((EXPBasicBlock)actual)(); 11 | } @catch(NSException *e) { 12 | exceptionCaught = e; 13 | expectedExceptionCaught = (expectedExceptionName == nil) || [[exceptionCaught name] isEqualToString:expectedExceptionName]; 14 | } 15 | return expectedExceptionCaught; 16 | }); 17 | 18 | failureMessageForTo(^NSString *{ 19 | return [NSString stringWithFormat:@"expected: %@, got: %@", 20 | expectedExceptionName ? expectedExceptionName : @"any exception", 21 | exceptionCaught ? [exceptionCaught name] : @"no exception"]; 22 | }); 23 | 24 | failureMessageForNotTo(^NSString *{ 25 | return [NSString stringWithFormat:@"expected: %@, got: %@", 26 | expectedExceptionName ? [NSString stringWithFormat:@"not %@", expectedExceptionName] : @"no exception", 27 | exceptionCaught ? [exceptionCaught name] : @"no exception"]; 28 | }); 29 | } 30 | EXPMatcherImplementationEnd 31 | -------------------------------------------------------------------------------- /Example/Pods/Specta/src/SPTReporter.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface SPTReporter : XCTestLog 4 | 5 | /* 6 | * Returns a singleton reporter used to generate Specta's test output. 7 | * The type of reporter can be customized by subclassing and setting the 8 | * SPECTA_REPORTER_CLASS environment variable. 9 | * 10 | * Subclasses may override methods from XCTestObserver to change test output. 11 | * Initialization shuld be performed in the -startObserving / -stopObserving methods, 12 | * and MUST invoke the super class implementation. 13 | */ 14 | + (instancetype)sharedReporter; 15 | 16 | #pragma mark - Run Stack 17 | 18 | @property (nonatomic, strong, readonly) NSArray *runStack; 19 | @property (nonatomic, assign, readonly) NSUInteger runStackCount; 20 | 21 | @property (nonatomic, assign, readonly) NSInteger numberOfTestCases; 22 | @property (nonatomic, assign, readonly) NSInteger numberOfCompletedTestCases; 23 | 24 | #pragma mark - Printing 25 | 26 | - (void)printString:(NSString *)string; 27 | - (void)printStringWithFormat:(NSString *)formatString, ... NS_FORMAT_FUNCTION(1,2); 28 | 29 | - (void)printLine; 30 | - (void)printLine:(NSString *)line; 31 | - (void)printLineWithFormat:(NSString *)formatString, ... NS_FORMAT_FUNCTION(1,2); 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Example/NPKeyboardLayoutGuide/NPViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // NPViewController.m 3 | // NPKeyboardLayoutGuide 4 | // 5 | // Created by Oleksii Kuchma on 09/13/2014. 6 | // Copyright (c) 2014 Oleksii Kuchma. All rights reserved. 7 | // 8 | 9 | #import "NPViewController.h" 10 | 11 | #import "NPKeyboardLayoutGuide.h" 12 | 13 | @interface NPViewController () 14 | 15 | @property (weak, nonatomic) IBOutlet UITextField *bottomTextField; 16 | 17 | @end 18 | 19 | @implementation NPViewController 20 | 21 | - (void)viewDidLoad 22 | { 23 | [super viewDidLoad]; 24 | 25 | NSArray *constraints = [NSLayoutConstraint constraintsWithVisualFormat:@"V:[textField]-[keyboard]" 26 | options:kNilOptions 27 | metrics:nil 28 | views:@{@"textField" : self.bottomTextField, @"keyboard" : self.keyboardLayoutGuide}]; 29 | 30 | [self.view addConstraints:constraints]; 31 | } 32 | 33 | - (void)didReceiveMemoryWarning 34 | { 35 | [super didReceiveMemoryWarning]; 36 | // Dispose of any resources that can be recreated. 37 | } 38 | 39 | - (BOOL)textFieldShouldReturn:(UITextField *)textField 40 | { 41 | return [textField resignFirstResponder]; 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /Example/Pods/Pods-NPKeyboardLayoutGuide-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## NPKeyboardLayoutGuide 5 | 6 | Copyright (c) 2014 Oleksii Kuchma 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - http://cocoapods.org 27 | -------------------------------------------------------------------------------- /Example/NPKeyboardLayoutGuide/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NPKeyboardLayoutGuide 2 | 3 | [![CI Status](http://img.shields.io/travis/Nodepad/NPKeyboardLayoutGuide.svg?style=flat)](https://travis-ci.org/Nodepad/NPKeyboardLayoutGuide) 4 | [![Version](https://img.shields.io/cocoapods/v/NPKeyboardLayoutGuide.svg?style=flat)](http://cocoadocs.org/docsets/NPKeyboardLayoutGuide) 5 | [![License](https://img.shields.io/cocoapods/l/NPKeyboardLayoutGuide.svg?style=flat)](http://cocoadocs.org/docsets/NPKeyboardLayoutGuide) 6 | [![Platform](https://img.shields.io/cocoapods/p/NPKeyboardLayoutGuide.svg?style=flat)](http://cocoadocs.org/docsets/NPKeyboardLayoutGuide) 7 | 8 | ## Usage 9 | 10 | To use keyboard layout guide in your project, add `#import "NPKeyboardLayoutGuide.h"` to your pch file, and use `keyboardLayoutGuide` property 11 | of `UIViewController` class to get and add constraints to the top of keyboard. 12 | 13 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 14 | 15 | ## Requirements 16 | 17 | ## Installation 18 | 19 | NPKeyboardLayoutGuide is available through [CocoaPods](http://cocoapods.org). To install 20 | it, simply add the following line to your Podfile: 21 | 22 | pod "NPKeyboardLayoutGuide" 23 | 24 | ## Author 25 | 26 | Oleksii Kuchma, nod3pad@gmail.com 27 | 28 | ## License 29 | 30 | NPKeyboardLayoutGuide is available under the MIT license. See the LICENSE file for more info. 31 | 32 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/EXPBlockDefinedMatcher.m: -------------------------------------------------------------------------------- 1 | // 2 | // EXPRuntimeMatcher.m 3 | // Expecta 4 | // 5 | // Created by Luke Redpath on 26/03/2012. 6 | // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved. 7 | // 8 | 9 | #import "EXPBlockDefinedMatcher.h" 10 | 11 | @implementation EXPBlockDefinedMatcher 12 | 13 | - (void)dealloc 14 | { 15 | self.prerequisiteBlock = nil; 16 | self.matchBlock = nil; 17 | self.failureMessageForToBlock = nil; 18 | self.failureMessageForNotToBlock = nil; 19 | 20 | [super dealloc]; 21 | } 22 | 23 | @synthesize prerequisiteBlock; 24 | @synthesize matchBlock; 25 | @synthesize failureMessageForToBlock; 26 | @synthesize failureMessageForNotToBlock; 27 | 28 | - (BOOL)meetsPrerequesiteFor:(id)actual 29 | { 30 | if (self.prerequisiteBlock) { 31 | return self.prerequisiteBlock(); 32 | } 33 | return YES; 34 | } 35 | 36 | - (BOOL)matches:(id)actual 37 | { 38 | if (self.matchBlock) { 39 | return self.matchBlock(); 40 | } 41 | return YES; 42 | } 43 | 44 | - (NSString *)failureMessageForTo:(id)actual 45 | { 46 | if (self.failureMessageForToBlock) { 47 | return self.failureMessageForToBlock(); 48 | } 49 | return nil; 50 | } 51 | 52 | - (NSString *)failureMessageForNotTo:(id)actual 53 | { 54 | if (self.failureMessageForNotToBlock) { 55 | return self.failureMessageForNotToBlock(); 56 | } 57 | return nil; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/EXPFloatTuple.m: -------------------------------------------------------------------------------- 1 | #import "EXPFloatTuple.h" 2 | 3 | @implementation EXPFloatTuple 4 | 5 | @synthesize values = _values, size = _size; 6 | 7 | - (id)initWithFloatValues:(float *)values size:(size_t)size { 8 | if ((self = [super init])) { 9 | self.values = malloc(sizeof(float) * size); 10 | memcpy(self.values, values, sizeof(float) * size); 11 | self.size = size; 12 | } 13 | return self; 14 | } 15 | 16 | - (void)dealloc { 17 | free(self.values); 18 | [super dealloc]; 19 | } 20 | 21 | - (BOOL)isEqual:(id)object { 22 | if (![object isKindOfClass:[EXPFloatTuple class]]) return NO; 23 | EXPFloatTuple *other = (EXPFloatTuple *)object; 24 | if (self.size == other.size) { 25 | for (int i = 0; i < self.size; ++i) { 26 | if (self.values[i] != other.values[i]) return NO; 27 | } 28 | return YES; 29 | } 30 | return NO; 31 | } 32 | 33 | - (NSString *)description { 34 | if (self.size == 2) { 35 | return [NSString stringWithFormat:@"Float tuple: {%f, %f}", self.values[0], self.values[1]]; 36 | } else if (self.size == 4) { 37 | return [NSString stringWithFormat:@"Float tuple: {%f, %f, %f, %f}", self.values[0], self.values[1], self.values[2], self.values[3]]; 38 | } 39 | return [NSString stringWithFormat:@"Float tuple of unexpected size %zd, sadly", self.size]; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Example/Pods/Specta/src/XCTestRun+Specta.m: -------------------------------------------------------------------------------- 1 | #import "XCTestRun+Specta.h" 2 | #import "SPTXCTestCase.h" 3 | 4 | @implementation XCTestRun (Specta) 5 | 6 | #pragma mark - Pending Test Cases 7 | 8 | - (NSUInteger)spt_pendingTestCaseCount { 9 | NSUInteger pendingTestCaseCount = 0; 10 | 11 | if ([self isKindOfClass:[XCTestSuiteRun class]]) { 12 | for (XCTestRun * testRun in [(XCTestSuiteRun *)self testRuns]) { 13 | pendingTestCaseCount += [testRun spt_pendingTestCaseCount]; 14 | } 15 | } else if ([[self test] isKindOfClass:[SPTXCTestCase class]]) { 16 | SPTXCTestCase * testCase = (SPTXCTestCase *)[self test]; 17 | if (testCase != nil && [testCase spt_isPending]) { 18 | pendingTestCaseCount++; 19 | } 20 | } 21 | 22 | return pendingTestCaseCount; 23 | } 24 | 25 | #pragma mark - Skipped Test Cases 26 | 27 | - (NSUInteger)spt_skippedTestCaseCount { 28 | NSUInteger skippedTestCaseCount = 0; 29 | 30 | if ([self isKindOfClass:[XCTestSuiteRun class]]) { 31 | for (XCTestRun * testRun in [(XCTestSuiteRun *)self testRuns]) { 32 | skippedTestCaseCount += [testRun spt_skippedTestCaseCount]; 33 | } 34 | } else if ([[self test] isKindOfClass:[SPTXCTestCase class]]) { 35 | SPTXCTestCase * testCase = (SPTXCTestCase *)[self test]; 36 | if (testCase.spt_skipped) { 37 | skippedTestCaseCount++; 38 | } 39 | } 40 | 41 | return skippedTestCaseCount; 42 | } 43 | 44 | @end -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/EXPDoubleTuple.m: -------------------------------------------------------------------------------- 1 | #import "EXPDoubleTuple.h" 2 | 3 | @implementation EXPDoubleTuple 4 | 5 | @synthesize values = _values, size = _size; 6 | 7 | - (id)initWithDoubleValues:(double *)values size:(size_t)size { 8 | if ((self = [super init])) { 9 | self.values = malloc(sizeof(double) * size); 10 | memcpy(self.values, values, sizeof(double) * size); 11 | self.size = size; 12 | } 13 | return self; 14 | } 15 | 16 | - (void)dealloc { 17 | free(self.values); 18 | [super dealloc]; 19 | } 20 | 21 | - (BOOL)isEqual:(id)object { 22 | if (![object isKindOfClass:[EXPDoubleTuple class]]) return NO; 23 | EXPDoubleTuple *other = (EXPDoubleTuple *)object; 24 | if (self.size == other.size) { 25 | for (int i = 0; i < self.size; ++i) { 26 | if (self.values[i] != other.values[i]) return NO; 27 | } 28 | return YES; 29 | } 30 | return NO; 31 | } 32 | 33 | - (NSString *)description { 34 | if (self.size == 2) { 35 | return [NSString stringWithFormat:@"Double tuple: {%f, %f}", self.values[0], self.values[1]]; 36 | } else if (self.size == 4) { 37 | return [NSString stringWithFormat:@"Double tuple: {%f, %f, %f, %f}", self.values[0], self.values[1], self.values[2], self.values[3]]; 38 | } 39 | return [NSString stringWithFormat:@"Double tuple of unexpected size %zd, sadly", self.size]; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /NPKeyboardLayoutGuide.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint NPKeyboardLayoutGuide.podspec' to ensure this is a 3 | # valid spec and remove all comments before submitting the spec. 4 | # 5 | # Any lines starting with a # are optional, but encouraged 6 | # 7 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 8 | # 9 | 10 | Pod::Spec.new do |s| 11 | s.name = "NPKeyboardLayoutGuide" 12 | s.version = "1.0.0" 13 | s.summary = "Add layout guide for keyboard to UIViewController" 14 | s.description = <<-DESC 15 | Layout guide for keyboard allows indirecty add constraints to keyboard. 16 | 17 | This class helps to raise text fields or other view when keyboard appears on screen. 18 | DESC 19 | s.homepage = "https://github.com/Nodepad/NPKeyboardLayoutGuide" 20 | s.license = 'MIT' 21 | s.author = { "Oleksii Kuchma" => "nod3pad@gmail.com" } 22 | s.source = { :git => "https://github.com/Nodepad/NPKeyboardLayoutGuide.git", :tag => s.version.to_s } 23 | s.social_media_url = 'https://twitter.com/oleksiikuchma' 24 | 25 | s.platform = :ios, '6.0' 26 | s.requires_arc = true 27 | 28 | s.source_files = 'Pod/Classes' 29 | s.resource_bundles = { 30 | 'NPKeyboardLayoutGuide' => ['Pod/Assets/*.png'] 31 | } 32 | 33 | # s.public_header_files = 'Pod/Classes/**/*.h' 34 | end 35 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beInTheRangeOf.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beInTheRangeOf.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(_beInTheRangeOf, (id expectedLowerBound, id expectedUpperBound)) { 5 | match(^BOOL{ 6 | if ([actual respondsToSelector:@selector(compare:)]) { 7 | NSComparisonResult compareLowerBound = [expectedLowerBound compare: actual]; 8 | NSComparisonResult compareUpperBound = [expectedUpperBound compare: actual]; 9 | if (compareLowerBound == NSOrderedSame) { 10 | return YES; 11 | } 12 | if (compareUpperBound == NSOrderedSame) { 13 | return YES; 14 | } 15 | if ((compareLowerBound == NSOrderedAscending) && (compareUpperBound == NSOrderedDescending)) { 16 | return YES; 17 | } 18 | } 19 | return NO; 20 | }); 21 | 22 | failureMessageForTo(^NSString *{ 23 | return [NSString stringWithFormat:@"expected: %@ to be in the range [%@, %@] (inclusive)", EXPDescribeObject(actual), EXPDescribeObject(expectedLowerBound), EXPDescribeObject(expectedUpperBound)]; 24 | }); 25 | 26 | failureMessageForNotTo(^NSString *{ 27 | return [NSString stringWithFormat:@"expected: %@ not to be in the range [%@, %@] (inclusive)", EXPDescribeObject(actual), EXPDescribeObject(expectedLowerBound), EXPDescribeObject(expectedUpperBound)]; 28 | }); 29 | } 30 | EXPMatcherImplementationEnd -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/NPKeyboardLayoutGuide.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint NPKeyboardLayoutGuide.podspec' to ensure this is a 3 | # valid spec and remove all comments before submitting the spec. 4 | # 5 | # Any lines starting with a # are optional, but encouraged 6 | # 7 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 8 | # 9 | 10 | Pod::Spec.new do |s| 11 | s.name = "NPKeyboardLayoutGuide" 12 | s.version = "1.0.0" 13 | s.summary = "Add layout guide for keyboard to UIViewController" 14 | s.description = <<-DESC 15 | Layout guide for keyboard allows indirecty add constraints to keyboard. 16 | 17 | This class helps to raise text fields or other view when keyboard appears on screen. 18 | DESC 19 | s.homepage = "https://github.com/Nodepad/NPKeyboardLayoutGuide" 20 | s.license = 'MIT' 21 | s.author = { "Oleksii Kuchma" => "nod3pad@gmail.com" } 22 | s.source = { :git => "https://github.com/Nodepad/NPKeyboardLayoutGuide.git", :tag => s.version.to_s } 23 | s.social_media_url = 'https://twitter.com/oleksiikuchma' 24 | 25 | s.platform = :ios, '6.0' 26 | s.requires_arc = true 27 | 28 | s.source_files = 'Pod/Classes' 29 | s.resource_bundles = { 30 | 'NPKeyboardLayoutGuide' => ['Pod/Assets/*.png'] 31 | } 32 | 33 | # s.public_header_files = 'Pod/Classes/**/*.h' 34 | end 35 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+haveCountOf.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+haveCountOf.h" 2 | 3 | EXPMatcherImplementationBegin(haveCountOf, (NSUInteger expected)) { 4 | BOOL actualIsStringy = [actual isKindOfClass:[NSString class]] || [actual isKindOfClass:[NSAttributedString class]]; 5 | BOOL actualIsCompatible = actualIsStringy || [actual respondsToSelector:@selector(count)]; 6 | 7 | prerequisite(^BOOL{ 8 | return actualIsCompatible; 9 | }); 10 | 11 | NSUInteger (^count)(id) = ^(id actual) { 12 | if(actualIsStringy) { 13 | return [actual length]; 14 | } else { 15 | return [actual count]; 16 | } 17 | }; 18 | 19 | match(^BOOL{ 20 | if(actualIsCompatible) { 21 | return count(actual) == expected; 22 | } 23 | return NO; 24 | }); 25 | 26 | failureMessageForTo(^NSString *{ 27 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSString, NSAttributedString, NSArray, NSSet, NSOrderedSet, or NSDictionary", EXPDescribeObject(actual)]; 28 | return [NSString stringWithFormat:@"expected %@ to have a count of %zi but got %zi", EXPDescribeObject(actual), expected, count(actual)]; 29 | }); 30 | 31 | failureMessageForNotTo(^NSString *{ 32 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSString, NSAttributedString, NSArray, NSSet, NSOrderedSet, or NSDictionary", EXPDescribeObject(actual)]; 33 | return [NSString stringWithFormat:@"expected %@ not to have a count of %zi", EXPDescribeObject(actual), expected]; 34 | }); 35 | } 36 | EXPMatcherImplementationEnd 37 | -------------------------------------------------------------------------------- /Example/Pods/Specta/src/SpectaSupport.h: -------------------------------------------------------------------------------- 1 | #ifndef SPT_SUBCLASS 2 | #define SPT_SUBCLASS SPTXCTestCase 3 | #endif 4 | 5 | 6 | 7 | #define _SPTSpecBegin(name, file, line) \ 8 | @interface name##Spec : SPT_SUBCLASS \ 9 | @end \ 10 | @implementation name##Spec \ 11 | - (void)spt_defineSpec { \ 12 | const char *specFileName = file; \ 13 | @try { \ 14 | [self spt_setCurrentSpecWithFileName:(file) lineNumber:(line)]; 15 | 16 | #define _SPTSpecEnd \ 17 | [self spt_unsetCurrentSpec]; \ 18 | } @catch(NSException *exception) { \ 19 | fprintf(stderr, "%s: An exception has occured outside of tests, aborting.\n\n%s (%s) \n", specFileName, [[exception name] UTF8String], [[exception reason] UTF8String]); \ 20 | if ([exception respondsToSelector:@selector(callStackSymbols)]) { \ 21 | NSArray *callStackSymbols = [exception callStackSymbols]; \ 22 | if (callStackSymbols) { \ 23 | NSString *callStack = [NSString stringWithFormat:@"\n Call Stack:\n %@\n", [callStackSymbols componentsJoinedByString:@"\n "]]; \ 24 | fprintf(stderr, "%s", [callStack UTF8String]); \ 25 | } \ 26 | } \ 27 | exit(1); \ 28 | } \ 29 | } \ 30 | @end 31 | 32 | #define _SPTSharedExampleGroupsBegin(name) \ 33 | @interface name##SharedExampleGroups : SPTSharedExampleGroups \ 34 | @end \ 35 | @implementation name##SharedExampleGroups \ 36 | + (void)defineSharedExampleGroups { 37 | 38 | #define _SPTSharedExampleGroupsEnd \ 39 | } \ 40 | @end 41 | 42 | #undef _XCTRegisterFailure 43 | #define _XCTRegisterFailure(condition, format...) \ 44 | ({ \ 45 | _XCTFailureHandler((id)self, YES, __FILE__, __LINE__, condition, @"" format); \ 46 | }) -------------------------------------------------------------------------------- /Example/Pods/Specta/src/XCTestLog+Specta.m: -------------------------------------------------------------------------------- 1 | #import "XCTestLog+Specta.h" 2 | #import "SPTReporter.h" 3 | #import 4 | 5 | static void spt_swizzleInstanceMethod(Class class, SEL originalSelector, SEL swizzledSelector) { 6 | Method originalMethod = class_getInstanceMethod(class, originalSelector); 7 | Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector); 8 | 9 | method_exchangeImplementations(originalMethod, swizzledMethod); 10 | } 11 | 12 | @implementation XCTestLog (Specta) 13 | 14 | + (void)load { 15 | spt_swizzleInstanceMethod(self, @selector(startObserving), @selector(XCTestLog_startObserving)); 16 | spt_swizzleInstanceMethod(self, @selector(stopObserving), @selector(XCTestLog_stopObserving)); 17 | } 18 | 19 | - (BOOL)spt_shouldProxyToSPTReporter { 20 | // Instances of XCTestLog (but not subclasses) simply forward to -[SPTReporter sharedReporter] 21 | return [self isMemberOfClass:[XCTestLog class]]; 22 | } 23 | 24 | - (void)spt_pauseObservationInBlock:(void (^)(void))block { 25 | [self XCTestLog_stopObserving]; 26 | block(); 27 | [self XCTestLog_startObserving]; 28 | } 29 | 30 | #pragma mark - XCTestObserver 31 | 32 | - (void)XCTestLog_startObserving { 33 | if ([self spt_shouldProxyToSPTReporter]) { 34 | [[SPTReporter sharedReporter] startObserving]; 35 | } else { 36 | [self XCTestLog_startObserving]; 37 | } 38 | } 39 | 40 | - (void)XCTestLog_stopObserving { 41 | if ([self spt_shouldProxyToSPTReporter]) { 42 | [[SPTReporter sharedReporter] stopObserving]; 43 | } else { 44 | [self XCTestLog_stopObserving]; 45 | usleep(100000); 46 | } 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+contain.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+contain.h" 2 | 3 | EXPMatcherImplementationBegin(_contain, (id expected)) { 4 | BOOL actualIsCompatible = [actual isKindOfClass:[NSString class]] || [actual conformsToProtocol:@protocol(NSFastEnumeration)]; 5 | BOOL expectedIsNil = (expected == nil); 6 | 7 | prerequisite(^BOOL{ 8 | return actualIsCompatible && !expectedIsNil; 9 | }); 10 | 11 | match(^BOOL{ 12 | if(actualIsCompatible) { 13 | if([actual isKindOfClass:[NSString class]]) { 14 | return [(NSString *)actual rangeOfString:[expected description]].location != NSNotFound; 15 | } else { 16 | for (id object in actual) { 17 | if ([object isEqual:expected]) { 18 | return YES; 19 | } 20 | } 21 | } 22 | } 23 | return NO; 24 | }); 25 | 26 | failureMessageForTo(^NSString *{ 27 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSString or NSFastEnumeration", EXPDescribeObject(actual)]; 28 | if(expectedIsNil) return @"the expected value is nil/null"; 29 | return [NSString stringWithFormat:@"expected %@ to contain %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 30 | }); 31 | 32 | failureMessageForNotTo(^NSString *{ 33 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSString or NSFastEnumeration", EXPDescribeObject(actual)]; 34 | if(expectedIsNil) return @"the expected value is nil/null"; 35 | return [NSString stringWithFormat:@"expected %@ not to contain %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 36 | }); 37 | } 38 | EXPMatcherImplementationEnd 39 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/EXPExpect.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "EXPMatcher.h" 3 | #import "EXPDefines.h" 4 | 5 | @interface EXPExpect : NSObject { 6 | EXPIdBlock _actualBlock; 7 | id _testCase; 8 | int _lineNumber; 9 | char *_fileName; 10 | BOOL _negative; 11 | BOOL _asynchronous; 12 | NSTimeInterval _timeout; 13 | } 14 | 15 | @property(nonatomic, copy) EXPIdBlock actualBlock; 16 | @property(nonatomic, readonly) id actual; 17 | @property(nonatomic, assign) id testCase; 18 | @property(nonatomic) int lineNumber; 19 | @property(nonatomic) const char *fileName; 20 | @property(nonatomic) BOOL negative; 21 | @property(nonatomic) BOOL asynchronous; 22 | @property(nonatomic) NSTimeInterval timeout; 23 | 24 | @property(nonatomic, readonly) EXPExpect *to; 25 | @property(nonatomic, readonly) EXPExpect *toNot; 26 | @property(nonatomic, readonly) EXPExpect *notTo; 27 | @property(nonatomic, readonly) EXPExpect *will; 28 | @property(nonatomic, readonly) EXPExpect *willNot; 29 | @property(nonatomic, readonly) EXPExpect *(^after)(NSTimeInterval timeInterval); 30 | 31 | - (id)initWithActualBlock:(id)actualBlock testCase:(id)testCase lineNumber:(int)lineNumber fileName:(const char *)fileName; 32 | + (EXPExpect *)expectWithActualBlock:(id)actualBlock testCase:(id)testCase lineNumber:(int)lineNumber fileName:(const char *)fileName; 33 | 34 | - (void)applyMatcher:(id)matcher; 35 | - (void)applyMatcher:(id)matcher to:(NSObject **)actual; 36 | 37 | @end 38 | 39 | @interface EXPDynamicPredicateMatcher : NSObject { 40 | EXPExpect *_expectation; 41 | SEL _selector; 42 | } 43 | - (id)initWithExpectation:(EXPExpect *)expectation selector:(SEL)selector; 44 | - (void (^)(void))dispatch; 45 | @end 46 | -------------------------------------------------------------------------------- /Example/Pods/Specta/src/SPTExampleGroup.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "SpectaTypes.h" 4 | 5 | @class 6 | SPTExample 7 | ; 8 | 9 | @interface SPTExampleGroup : NSObject 10 | 11 | @property (nonatomic, copy) NSString *name; 12 | @property (nonatomic, strong) SPTExampleGroup *root; 13 | @property (nonatomic, strong) SPTExampleGroup *parent; 14 | @property (nonatomic, strong) NSMutableArray *children; 15 | @property (nonatomic, strong) NSMutableArray *beforeAllArray; 16 | @property (nonatomic, strong) NSMutableArray *afterAllArray; 17 | @property (nonatomic, strong) NSMutableArray *beforeEachArray; 18 | @property (nonatomic, strong) NSMutableArray *afterEachArray; 19 | @property (nonatomic, strong) NSMutableDictionary *sharedExamples; 20 | @property (nonatomic) unsigned int exampleCount; 21 | @property (nonatomic) unsigned int ranExampleCount; 22 | @property (nonatomic, getter=isFocused) BOOL focused; 23 | 24 | + (void)setAsyncSpecTimeout:(NSTimeInterval)timeout; 25 | - (id)initWithName:(NSString *)name parent:(SPTExampleGroup *)parent root:(SPTExampleGroup *)root; 26 | 27 | - (SPTExampleGroup *)addExampleGroupWithName:(NSString *)name; 28 | - (SPTExampleGroup *)addExampleGroupWithName:(NSString *)name focused:(BOOL)focused; 29 | 30 | - (SPTExample *)addExampleWithName:(NSString *)name block:(id)block; 31 | - (SPTExample *)addExampleWithName:(NSString *)name block:(id)block focused:(BOOL)focused; 32 | 33 | - (void)addBeforeAllBlock:(SPTVoidBlock)block; 34 | - (void)addAfterAllBlock:(SPTVoidBlock)block; 35 | - (void)addBeforeEachBlock:(SPTVoidBlock)block; 36 | - (void)addAfterEachBlock:(SPTVoidBlock)block; 37 | 38 | - (NSArray *)compileExamplesWithNameStack:(NSArray *)nameStack; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+raiseWithReason.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+raiseWithReason.h" 2 | #import "EXPDefines.h" 3 | 4 | EXPMatcherImplementationBegin(raiseWithReason, (NSString *expectedExceptionName, NSString *expectedReason)) { 5 | __block NSException *exceptionCaught = nil; 6 | 7 | match(^BOOL{ 8 | BOOL expectedExceptionCaught = NO; 9 | @try { 10 | ((EXPBasicBlock)actual)(); 11 | } @catch(NSException *e) { 12 | exceptionCaught = e; 13 | expectedExceptionCaught = (((expectedExceptionName == nil) || [[exceptionCaught name] isEqualToString:expectedExceptionName]) && 14 | ((expectedReason == nil) || ([[exceptionCaught reason] isEqualToString:expectedReason]))); 15 | } 16 | return expectedExceptionCaught; 17 | }); 18 | 19 | failureMessageForTo(^NSString *{ 20 | return [NSString stringWithFormat:@"expected: %@ (%@), got: %@ (%@)", 21 | expectedExceptionName ?: @"any exception", 22 | expectedReason ?: @"any reason", 23 | exceptionCaught ? [exceptionCaught name] : @"no exception", 24 | exceptionCaught ? [exceptionCaught reason] : @""]; 25 | }); 26 | 27 | failureMessageForNotTo(^NSString *{ 28 | return [NSString stringWithFormat:@"expected: %@ (%@), got: %@ (%@)", 29 | expectedExceptionName ? [NSString stringWithFormat:@"not %@", expectedExceptionName] : @"no exception", 30 | expectedReason ? [NSString stringWithFormat:@"not '%@'", expectedReason] : @"no reason", 31 | exceptionCaught ? [exceptionCaught name] : @"no exception", 32 | exceptionCaught ? [exceptionCaught reason] : @"no reason"]; 33 | }); 34 | } 35 | EXPMatcherImplementationEnd 36 | -------------------------------------------------------------------------------- /Example/NPKeyboardLayoutGuide/NPKeyboardLayoutGuide-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | Main_iPhone 29 | UIMainStoryboardFile~ipad 30 | Main_iPad 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /Pod/Classes/NPKeyboardLayoutGuide.h: -------------------------------------------------------------------------------- 1 | // 2 | // NPKeyboardLayoutGuide.h 3 | // 4 | // Created by Oleksii Kuchma on 9/13/14. 5 | // 6 | // Copyright (c) 2014 Oleksii Kuchma 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | // 26 | 27 | #import 28 | 29 | /** 30 | `NPKeyboardLayoutGuide` is a category for UIViewController which add keyboardLayoutGuide to main view. 31 | KeyboardLayoutGuide allows indirectly add auto layout constraints to keyboard. 32 | */ 33 | @interface UIViewController (NPKeyboardLayoutGuide) 34 | 35 | /** 36 | Lazily creates and return keyboard layout guide. 37 | 38 | @return Layout guide for keyboard. 39 | */ 40 | @property (nonatomic, weak, readonly) id keyboardLayoutGuide; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/EXPBackwardCompatibility.h: -------------------------------------------------------------------------------- 1 | #import "EXPExpect.h" 2 | 3 | @interface EXPExpect (BackwardCompatiblity) 4 | 5 | @property(nonatomic, readonly) EXPExpect *Not; 6 | @property(nonatomic, readonly) EXPExpect *isGoing; 7 | @property(nonatomic, readonly) EXPExpect *isNotGoing; 8 | 9 | @end 10 | 11 | #define toBeFalsy beFalsy 12 | #define toBeGreaterThan beGreaterThan 13 | #define toBeGreaterThanOrEqualTo beGreaterThanOrEqualTo 14 | #define toBeIdenticalTo beIdenticalTo 15 | #define toBeInTheRangeOf beInTheRangeOf 16 | #define toBeInstanceOf beInstanceOf 17 | #define toBeAnInstanceOf beInstanceOf 18 | #define toBeMemberOf beInstanceOf 19 | #define toBeAMemberOf beInstanceOf 20 | #define toBeKindOf beKindOf 21 | #define toBeAKindOf beKindOf 22 | #define toBeLessThan beLessThan 23 | #define toBeLessThanOrEqualTo beLessThanOrEqualTo 24 | #define toBeNil beNil 25 | #define toBeNull beNil 26 | #define toBeSubclassOf beSubclassOf 27 | #define toBeASubclassOf beSubclassOf 28 | #define toBeTruthy beTruthy 29 | #define toBeFalsy beFalsy 30 | #define toContain contain 31 | #define toEqual equal 32 | #define toBeCloseTo beCloseTo 33 | #define toBeCloseToWithin beCloseToWithin 34 | #define toHaveCount haveCountOf 35 | #define toHaveCountOf haveCountOf 36 | #define toHaveACountOf haveCountOf 37 | #define toHaveLength haveCountOf 38 | #define toHaveLengthOf haveCountOf 39 | #define toHaveALengthOf haveCountOf 40 | #define toBeEmpty beEmpty 41 | #define toRaise raise 42 | #define toRaiseAny raiseAny 43 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beCloseTo.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beCloseTo.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(_beCloseToWithin, (id expected, id within)) { 5 | prerequisite(^BOOL{ 6 | return [actual isKindOfClass:[NSNumber class]] && 7 | [expected isKindOfClass:[NSNumber class]] && 8 | ([within isKindOfClass:[NSNumber class]] || (within == nil)); 9 | }); 10 | 11 | match(^BOOL{ 12 | double actualValue = [actual doubleValue]; 13 | double expectedValue = [expected doubleValue]; 14 | 15 | if (within != nil) { 16 | double withinValue = [within doubleValue]; 17 | double lowerBound = expectedValue - withinValue; 18 | double upperBound = expectedValue + withinValue; 19 | return (actualValue >= lowerBound) && (actualValue <= upperBound); 20 | } else { 21 | double diff = fabs(actualValue - expectedValue); 22 | actualValue = fabs(actualValue); 23 | expectedValue = fabs(expectedValue); 24 | double largest = (expectedValue > actualValue) ? expectedValue : actualValue; 25 | return (diff <= largest * FLT_EPSILON); 26 | } 27 | }); 28 | 29 | failureMessageForTo(^NSString *{ 30 | if (within) { 31 | return [NSString stringWithFormat:@"expected %@ to be close to %@ within %@", 32 | EXPDescribeObject(actual), EXPDescribeObject(expected), EXPDescribeObject(within)]; 33 | } else { 34 | return [NSString stringWithFormat:@"expected %@ to be close to %@", 35 | EXPDescribeObject(actual), EXPDescribeObject(expected)]; 36 | } 37 | }); 38 | 39 | failureMessageForNotTo(^NSString *{ 40 | if (within) { 41 | return [NSString stringWithFormat:@"expected %@ not to be close to %@ within %@", 42 | EXPDescribeObject(actual), EXPDescribeObject(expected), EXPDescribeObject(within)]; 43 | } else { 44 | return [NSString stringWithFormat:@"expected %@ not to be close to %@", 45 | EXPDescribeObject(actual), EXPDescribeObject(expected)]; 46 | } 47 | }); 48 | } 49 | EXPMatcherImplementationEnd -------------------------------------------------------------------------------- /Example/NPKeyboardLayoutGuide/NPAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // NPAppDelegate.m 3 | // NPKeyboardLayoutGuide 4 | // 5 | // Created by CocoaPods on 09/13/2014. 6 | // Copyright (c) 2014 Oleksii Kuchma. All rights reserved. 7 | // 8 | 9 | #import "NPAppDelegate.h" 10 | 11 | @implementation NPAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Example/Pods/Specta/src/SPTSharedExampleGroups.m: -------------------------------------------------------------------------------- 1 | #import "SPTSharedExampleGroups.h" 2 | #import "SPTExampleGroup.h" 3 | #import "SPTXCTestCase.h" 4 | #import "SpectaUtility.h" 5 | #import 6 | 7 | NSMutableDictionary *globalSharedExampleGroups = nil; 8 | BOOL initialized = NO; 9 | 10 | @implementation SPTSharedExampleGroups 11 | 12 | + (void)initialize { 13 | Class SPTSharedExampleGroupsClass = [SPTSharedExampleGroups class]; 14 | if ([self class] == SPTSharedExampleGroupsClass) { 15 | if (!initialized) { 16 | initialized = YES; 17 | globalSharedExampleGroups = [[NSMutableDictionary alloc] init]; 18 | 19 | Class *classes = NULL; 20 | int numClasses = objc_getClassList(NULL, 0); 21 | 22 | if (numClasses > 0) { 23 | classes = (Class *)malloc(sizeof(Class) * numClasses); 24 | numClasses = objc_getClassList(classes, numClasses); 25 | 26 | Class klass, superClass; 27 | for(uint i = 0; i < numClasses; i++) { 28 | klass = classes[i]; 29 | superClass = class_getSuperclass(klass); 30 | if (superClass == SPTSharedExampleGroupsClass) { 31 | [klass defineSharedExampleGroups]; 32 | } 33 | } 34 | 35 | free(classes); 36 | } 37 | } 38 | } 39 | } 40 | 41 | + (void)addSharedExampleGroupWithName:(NSString *)name block:(SPTDictionaryBlock)block exampleGroup:(SPTExampleGroup *)exampleGroup { 42 | (exampleGroup == nil ? globalSharedExampleGroups : exampleGroup.sharedExamples)[name] = [block copy]; 43 | } 44 | 45 | + (SPTDictionaryBlock)sharedExampleGroupWithName:(NSString *)name exampleGroup:(SPTExampleGroup *)exampleGroup { 46 | SPTDictionaryBlock sharedExampleGroup = nil; 47 | while (exampleGroup != nil) { 48 | if ((sharedExampleGroup = exampleGroup.sharedExamples[name])) { 49 | return sharedExampleGroup; 50 | } 51 | exampleGroup = exampleGroup.parent; 52 | } 53 | return globalSharedExampleGroups[name]; 54 | } 55 | 56 | + (void)defineSharedExampleGroups {} 57 | 58 | + (void)recordFailureWithDescription:(NSString *)description inFile:(NSString *)filename atLine:(NSUInteger)lineNumber expected:(BOOL)expected { 59 | [SPTCurrentTestCase recordFailureWithDescription:description inFile:filename atLine:lineNumber expected:expected]; 60 | } 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /Example/Pods/Specta/src/SpectaUtility.m: -------------------------------------------------------------------------------- 1 | #import "SpectaUtility.h" 2 | #import "SPTXCTestCase.h" 3 | #import 4 | 5 | NSString * const SPTCurrentSpecKey = @"SPTCurrentSpec"; 6 | NSString * const SPTCurrentTestCaseKey = @"SPTCurrentTestCase"; 7 | 8 | // http://clang.llvm.org/docs/Block-ABI-Apple.html 9 | struct SPTBlockLiteral { 10 | void *isa; // initialized to &_NSConcreteStackBlock or &_NSConcreteGlobalBlock 11 | int flags; 12 | int reserved; 13 | void (*invoke)(void *, ...); 14 | struct Block_descriptor_1 { 15 | unsigned long int reserved; // NULL 16 | unsigned long int size; // sizeof(struct Block_literal_1) 17 | // optional helper functions 18 | void (*copy_helper)(void *dst, void *src); // IFF (1<<25) 19 | void (*dispose_helper)(void *src); // IFF (1<<25) 20 | // required ABI.2010.3.16 21 | const char *signature; // IFF (1<<30) 22 | } *descriptor; 23 | // imported variables 24 | }; 25 | 26 | enum { 27 | SPT_BLOCK_HAS_COPY_DISPOSE = (1 << 25), 28 | SPT_BLOCK_HAS_CTOR = (1 << 26), // helpers have C++ code 29 | SPT_BLOCK_IS_GLOBAL = (1 << 28), 30 | SPT_BLOCK_HAS_STRET = (1 << 29), // IFF BLOCK_HAS_SIGNATURE 31 | SPT_BLOCK_HAS_SIGNATURE = (1 << 30), 32 | }; 33 | 34 | const char *SPTGetBlockSignature(id blockObject) { 35 | struct SPTBlockLiteral *block = (__bridge struct SPTBlockLiteral *)blockObject; 36 | 37 | int flags = block->flags; 38 | 39 | if (flags & SPT_BLOCK_HAS_SIGNATURE) { 40 | void *signaturePtr = block->descriptor; 41 | signaturePtr += sizeof(unsigned long int); // skip reserved 42 | signaturePtr += sizeof(unsigned long int); // skip size 43 | 44 | if (flags & SPT_BLOCK_HAS_COPY_DISPOSE) { 45 | signaturePtr += sizeof(void(*)(void *dst, void *src)); // skip copy_helper 46 | signaturePtr += sizeof(void(*)(void *src)); // skip dispose_helper 47 | } 48 | 49 | return *(const char **)signaturePtr; 50 | } 51 | 52 | return NULL; 53 | } 54 | 55 | BOOL SPTIsSpecClass(Class aClass) { 56 | Class superclass = class_getSuperclass(aClass); 57 | while (superclass != Nil) { 58 | if (superclass == [SPTXCTestCase class]) { 59 | return YES; 60 | } else { 61 | superclass = class_getSuperclass(superclass); 62 | } 63 | } 64 | return NO; 65 | } -------------------------------------------------------------------------------- /Example/Pods/Pods-NPKeyboardLayoutGuide-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2014 Oleksii Kuchma <nod3pad@gmail.com> 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | Title 38 | NPKeyboardLayoutGuide 39 | Type 40 | PSGroupSpecifier 41 | 42 | 43 | FooterText 44 | Generated by CocoaPods - http://cocoapods.org 45 | Title 46 | 47 | Type 48 | PSGroupSpecifier 49 | 50 | 51 | StringsTable 52 | Acknowledgements 53 | Title 54 | Acknowledgements 55 | 56 | 57 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+notify.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+notify.h" 2 | 3 | EXPMatcherImplementationBegin(notify, (id expected)){ 4 | BOOL actualIsNil = (actual == nil); 5 | BOOL expectedIsNil = (expected == nil); 6 | BOOL isNotification = [expected isKindOfClass:[NSNotification class]]; 7 | BOOL isName = [expected isKindOfClass:[NSString class]]; 8 | 9 | __block NSString *expectedName; 10 | __block BOOL expectedNotificationOccurred = NO; 11 | __block id observer; 12 | 13 | prerequisite(^BOOL{ 14 | expectedNotificationOccurred = NO; 15 | if (actualIsNil || expectedIsNil) return NO; 16 | if (isNotification) { 17 | expectedName = [expected name]; 18 | }else if(isName) { 19 | expectedName = expected; 20 | }else{ 21 | return NO; 22 | } 23 | 24 | observer = [[NSNotificationCenter defaultCenter] addObserverForName:expectedName object:nil queue:nil usingBlock:^(NSNotification *note){ 25 | if (isNotification) { 26 | expectedNotificationOccurred |= [expected isEqual:note]; 27 | }else{ 28 | expectedNotificationOccurred = YES; 29 | } 30 | }]; 31 | ((EXPBasicBlock)actual)(); 32 | return YES; 33 | }); 34 | 35 | match(^BOOL{ 36 | if(expectedNotificationOccurred) { 37 | [[NSNotificationCenter defaultCenter] removeObserver:observer]; 38 | } 39 | return expectedNotificationOccurred; 40 | }); 41 | 42 | failureMessageForTo(^NSString *{ 43 | if (observer) { 44 | [[NSNotificationCenter defaultCenter] removeObserver:observer]; 45 | } 46 | if(actualIsNil) return @"the actual value is nil/null"; 47 | if(expectedIsNil) return @"the expected value is nil/null"; 48 | if(!(isNotification || isName)) return @"the actual value is not a notification or string"; 49 | return [NSString stringWithFormat:@"expected: %@, got: none",expectedName]; 50 | }); 51 | 52 | failureMessageForNotTo(^NSString *{ 53 | if (observer) { 54 | [[NSNotificationCenter defaultCenter] removeObserver:observer]; 55 | } 56 | if(actualIsNil) return @"the actual value is nil/null"; 57 | if(expectedIsNil) return @"the expected value is nil/null"; 58 | if(!(isNotification || isName)) return @"the actual value is not a notification or string"; 59 | return [NSString stringWithFormat:@"expected: none, got: %@", expectedName]; 60 | }); 61 | } 62 | 63 | EXPMatcherImplementationEnd 64 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beSupersetOf.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+contain.h" 2 | 3 | EXPMatcherImplementationBegin(beSupersetOf, (id subset)) { 4 | BOOL actualIsCompatible = [actual isKindOfClass:[NSDictionary class]] || [actual respondsToSelector:@selector(containsObject:)]; 5 | BOOL subsetIsNil = (subset == nil); 6 | 7 | // For some instances the isKindOfClass: method returns false, even though 8 | // they are both actually dictionaries. e.g. Comparing a NSCFDictionary and a 9 | // NSDictionary. 10 | BOOL bothAreDictionaries = [actual isKindOfClass:[NSDictionary class]] && [subset isKindOfClass:[NSDictionary class]]; 11 | 12 | BOOL classMatches = bothAreDictionaries || [subset isKindOfClass:[actual class]]; 13 | 14 | prerequisite(^BOOL{ 15 | return actualIsCompatible && !subsetIsNil && classMatches; 16 | }); 17 | 18 | match(^BOOL{ 19 | if(!actualIsCompatible) return NO; 20 | 21 | if([actual isKindOfClass:[NSDictionary class]]) { 22 | for (id key in subset) { 23 | id actualValue = [actual valueForKey:key]; 24 | id subsetValue = [subset valueForKey:key]; 25 | 26 | if (![subsetValue isEqual:actualValue]) return NO; 27 | } 28 | } else { 29 | for (id object in subset) { 30 | if (![actual containsObject:object]) return NO; 31 | } 32 | } 33 | 34 | return YES; 35 | }); 36 | 37 | failureMessageForTo(^NSString *{ 38 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSDictionary and does not implement -containsObject:", EXPDescribeObject(actual)]; 39 | 40 | if(subsetIsNil) return @"the expected value is nil/null"; 41 | 42 | if(!classMatches) return [NSString stringWithFormat:@"%@ does not match the class of %@", EXPDescribeObject(subset), EXPDescribeObject(actual)]; 43 | 44 | return [NSString stringWithFormat:@"expected %@ to be a superset of %@", EXPDescribeObject(actual), EXPDescribeObject(subset)]; 45 | }); 46 | 47 | failureMessageForNotTo(^NSString *{ 48 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSDictionary and does not implement -containsObject:", EXPDescribeObject(actual)]; 49 | 50 | if(subsetIsNil) return @"the expected value is nil/null"; 51 | 52 | if(!classMatches) return [NSString stringWithFormat:@"%@ does not match the class of %@", EXPDescribeObject(subset), EXPDescribeObject(actual)]; 53 | 54 | return [NSString stringWithFormat:@"expected %@ not to be a superset of %@", EXPDescribeObject(actual), EXPDescribeObject(subset)]; 55 | }); 56 | } 57 | EXPMatcherImplementationEnd 58 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/ExpectaSupport.h: -------------------------------------------------------------------------------- 1 | #import "EXPExpect.h" 2 | #import "EXPBlockDefinedMatcher.h" 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | id _EXPObjectify(const char *type, ...); 9 | EXPExpect *_EXP_expect(id testCase, int lineNumber, const char *fileName, EXPIdBlock actualBlock); 10 | 11 | void EXPFail(id testCase, int lineNumber, const char *fileName, NSString *message); 12 | NSString *EXPDescribeObject(id obj); 13 | 14 | void EXP_prerequisite(EXPBoolBlock block); 15 | void EXP_match(EXPBoolBlock block); 16 | void EXP_failureMessageForTo(EXPStringBlock block); 17 | void EXP_failureMessageForNotTo(EXPStringBlock block); 18 | 19 | #if __has_feature(objc_arc) 20 | #define _EXP_release(x) 21 | #define _EXP_autorelease(x) (x) 22 | 23 | #else 24 | #define _EXP_release(x) [x release] 25 | #define _EXP_autorelease(x) [x autorelease] 26 | #endif 27 | 28 | // workaround for the categories bug: http://developer.apple.com/library/mac/#qa/qa1490/_index.html 29 | #define EXPFixCategoriesBug(name) \ 30 | __attribute__((constructor)) static void EXPFixCategoriesBug##name() {} 31 | 32 | #define _EXPMatcherInterface(matcherName, matcherArguments) \ 33 | @interface EXPExpect (matcherName##Matcher) \ 34 | @property (nonatomic, readonly) void(^ matcherName) matcherArguments; \ 35 | @end 36 | 37 | #define _EXPMatcherImplementationBegin(matcherName, matcherArguments) \ 38 | EXPFixCategoriesBug(EXPMatcher##matcherName##Matcher); \ 39 | @implementation EXPExpect (matcherName##Matcher) \ 40 | @dynamic matcherName;\ 41 | - (void(^) matcherArguments) matcherName { \ 42 | EXPBlockDefinedMatcher *matcher = [[EXPBlockDefinedMatcher alloc] init]; \ 43 | [[[NSThread currentThread] threadDictionary] setObject:matcher forKey:@"EXP_currentMatcher"]; \ 44 | __block id actual = self.actual; \ 45 | __block void (^prerequisite)(EXPBoolBlock block) = ^(EXPBoolBlock block) { EXP_prerequisite(block); }; \ 46 | __block void (^match)(EXPBoolBlock block) = ^(EXPBoolBlock block) { EXP_match(block); }; \ 47 | __block void (^failureMessageForTo)(EXPStringBlock block) = ^(EXPStringBlock block) { EXP_failureMessageForTo(block); }; \ 48 | __block void (^failureMessageForNotTo)(EXPStringBlock block) = ^(EXPStringBlock block) { EXP_failureMessageForNotTo(block); }; \ 49 | prerequisite(nil); match(nil); failureMessageForTo(nil); failureMessageForNotTo(nil); \ 50 | void (^matcherBlock) matcherArguments = [^ matcherArguments { \ 51 | { 52 | 53 | #define _EXPMatcherImplementationEnd \ 54 | } \ 55 | [self applyMatcher:matcher to:&actual]; \ 56 | } copy]; \ 57 | _EXP_release(matcher); \ 58 | return _EXP_autorelease(matcherBlock); \ 59 | } \ 60 | @end 61 | 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+beginWith.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beginWith.h" 2 | 3 | EXPMatcherImplementationBegin(beginWith, (id expected)) { 4 | BOOL actualIsNil = (actual == nil); 5 | BOOL expectedIsNil = (expected == nil); 6 | //This condition allows the comparison of an immutable string or ordered collection to the mutable type of the same 7 | BOOL actualAndExpectedAreCompatible = (([actual isKindOfClass:[NSString class]] && [expected isKindOfClass:[NSString class]]) 8 | || ([actual isKindOfClass:[NSArray class]] && [expected isKindOfClass:[NSArray class]]) 9 | || ([actual isKindOfClass:[NSOrderedSet class]] && [expected isKindOfClass:[NSOrderedSet class]])); 10 | 11 | prerequisite(^BOOL { 12 | return actualAndExpectedAreCompatible; 13 | }); 14 | 15 | match(^BOOL { 16 | if ([actual isKindOfClass:[NSString class]]) { 17 | return [actual hasPrefix:expected]; 18 | } else if ([actual isKindOfClass:[NSArray class]]) { 19 | if ([expected count] > [actual count] || [expected count] == 0) { 20 | return NO; 21 | } 22 | NSArray *subArray = [actual subarrayWithRange:NSMakeRange(0, [expected count])]; 23 | return [subArray isEqualToArray:expected]; 24 | } else { 25 | if ([expected count] > [actual count] || [expected count] == 0) { 26 | return NO; 27 | } 28 | 29 | NSOrderedSet *subset = [NSOrderedSet orderedSetWithOrderedSet:actual range:NSMakeRange(0, [expected count]) copyItems:NO]; 30 | return [subset isEqualToOrderedSet:expected]; 31 | } 32 | }); 33 | 34 | failureMessageForTo(^NSString *{ 35 | if (actualIsNil) return @"the object is nil/null"; 36 | if (expectedIsNil) return @"the expected value is nil/null"; 37 | if (!actualAndExpectedAreCompatible) return [NSString stringWithFormat:@"%@ and %@ are not instances of one of %@, %@, or %@", EXPDescribeObject(actual), EXPDescribeObject(expected), [NSString class], [NSArray class], [NSOrderedSet class]]; 38 | return [NSString stringWithFormat:@"expected: %@ to begin with %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 39 | }); 40 | 41 | failureMessageForNotTo(^NSString *{ 42 | if (actualIsNil) return @"the object is nil/null"; 43 | if (expectedIsNil) return @"the expected value is nil/null"; 44 | if (!actualAndExpectedAreCompatible) return [NSString stringWithFormat:@"%@ and %@ are not instances of one of %@, %@, or %@", EXPDescribeObject(actual), EXPDescribeObject(expected), [NSString class], [NSArray class], [NSOrderedSet class]]; 45 | 46 | return [NSString stringWithFormat:@"expected: %@ not to begin with %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 47 | }); 48 | } 49 | EXPMatcherImplementationEnd 50 | -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/matchers/EXPMatchers+endWith.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+endWith.h" 2 | 3 | EXPMatcherImplementationBegin(endWith, (id expected)) { 4 | BOOL actualIsNil = (actual == nil); 5 | BOOL expectedIsNil = (expected == nil); 6 | //This condition allows the comparison of an immutable string or ordered collection to the mutable type of the same 7 | BOOL actualAndExpectedAreCompatible = (([actual isKindOfClass:[NSString class]] && [expected isKindOfClass:[NSString class]]) 8 | || ([actual isKindOfClass:[NSArray class]] && [expected isKindOfClass:[NSArray class]]) 9 | || ([actual isKindOfClass:[NSOrderedSet class]] && [expected isKindOfClass:[NSOrderedSet class]])); 10 | 11 | prerequisite(^BOOL { 12 | return actualAndExpectedAreCompatible; 13 | }); 14 | 15 | match(^BOOL { 16 | if ([actual isKindOfClass:[NSString class]]) { 17 | return [actual hasSuffix:expected]; 18 | } else if ([actual isKindOfClass:[NSArray class]]) { 19 | if ([expected count] > [actual count] || [expected count] == 0) { 20 | return NO; 21 | } 22 | NSArray *subArray = [actual subarrayWithRange:NSMakeRange([actual count] - [expected count], [expected count])]; 23 | return [subArray isEqualToArray:expected]; 24 | } else { 25 | if ([expected count] > [actual count] || [expected count] == 0) { 26 | return NO; 27 | } 28 | 29 | NSOrderedSet *subset = [NSOrderedSet orderedSetWithOrderedSet:actual range:NSMakeRange([actual count] - [expected count], [expected count]) copyItems:NO]; 30 | return [subset isEqualToOrderedSet:expected]; 31 | } 32 | }); 33 | 34 | failureMessageForTo(^NSString *{ 35 | if (actualIsNil) return @"the object is nil/null"; 36 | if (expectedIsNil) return @"the expected value is nil/null"; 37 | if (!actualAndExpectedAreCompatible) return [NSString stringWithFormat:@"%@ and %@ are not instances of one of %@, %@, or %@", EXPDescribeObject(actual), EXPDescribeObject(expected), [NSString class], [NSArray class], [NSOrderedSet class]]; 38 | return [NSString stringWithFormat:@"expected: %@ to end with %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 39 | }); 40 | 41 | failureMessageForNotTo(^NSString *{ 42 | if (actualIsNil) return @"the object is nil/null"; 43 | if (expectedIsNil) return @"the expected value is nil/null"; 44 | if (!actualAndExpectedAreCompatible) return [NSString stringWithFormat:@"%@ and %@ are not instances of one of %@, %@, or %@", EXPDescribeObject(actual), EXPDescribeObject(expected), [NSString class], [NSArray class], [NSOrderedSet class]]; 45 | 46 | return [NSString stringWithFormat:@"expected: %@ not to end with %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 47 | }); 48 | } 49 | EXPMatcherImplementationEnd 50 | -------------------------------------------------------------------------------- /Example/Pods/Specta/src/Specta.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "SpectaSupport.h" 4 | #import "SPTXCTestCase.h" 5 | #import "SPTSpec.h" 6 | #import "SPTExampleGroup.h" 7 | #import "SPTSharedExampleGroups.h" 8 | 9 | @interface Specta : NSObject 10 | @end 11 | 12 | #define SpecBegin(name) _SPTSpecBegin(name, __FILE__, __LINE__) 13 | #define SpecEnd _SPTSpecEnd 14 | 15 | #define SharedExamplesBegin(name) _SPTSharedExampleGroupsBegin(name) 16 | #define SharedExamplesEnd _SPTSharedExampleGroupsEnd 17 | #define SharedExampleGroupsBegin(name) _SPTSharedExampleGroupsBegin(name) 18 | #define SharedExampleGroupsEnd _SPTSharedExampleGroupsEnd 19 | 20 | #ifdef SPT_CEDAR_SYNTAX 21 | # define SPEC_BEGIN(name) SpecBegin(name) 22 | # define SPEC_END SpecEnd 23 | # define SHARED_EXAMPLE_GROUPS_BEGIN(name) SharedExamplesBegin(name) 24 | # define SHARED_EXAMPLE_GROUPS_END SharedExamplesEnd 25 | # ifndef PENDING 26 | # define PENDING nil 27 | # endif 28 | #endif 29 | 30 | void SPTdescribe(NSString *name, BOOL focused, void (^block)()); 31 | void describe(NSString *name, void (^block)()); 32 | void fdescribe(NSString *name, void (^block)()); 33 | void context(NSString *name, void (^block)()); 34 | void fcontext(NSString *name, void (^block)()); 35 | 36 | void SPTexample(NSString *name, BOOL focused, id block); 37 | void example(NSString *name, id block); 38 | void fexample(NSString *name, id block); 39 | void it(NSString *name, id block); 40 | void fit(NSString *name, id block); 41 | void specify(NSString *name, id block); 42 | void fspecify(NSString *name, id block); 43 | 44 | 45 | void SPTpending(NSString *name, ...); 46 | #define xdescribe(...) SPTpending(__VA_ARGS__, nil) 47 | #define xcontext(...) SPTpending(__VA_ARGS__, nil) 48 | #define xexample(...) SPTpending(__VA_ARGS__, nil) 49 | #define xit(...) SPTpending(__VA_ARGS__, nil) 50 | #define xspecify(...) SPTpending(__VA_ARGS__, nil) 51 | #define pending(...) SPTpending(__VA_ARGS__, nil) 52 | 53 | void beforeAll(id block); 54 | void afterAll(id block); 55 | void beforeEach(id block); 56 | void afterEach(id block); 57 | void before(id block); 58 | void after(id block); 59 | 60 | void sharedExamplesFor(NSString *name, void (^block)(NSDictionary *data)); 61 | void sharedExamples(NSString *name, void (^block)(NSDictionary *data)); 62 | 63 | void SPTitShouldBehaveLike(const char *fileName, NSUInteger lineNumber, NSString *name, id dictionaryOrBlock); 64 | void itShouldBehaveLike(NSString *name, id dictionaryOrBlockOrNil); // aid code completion 65 | void itBehavesLike(NSString *name, id dictionaryOrBlockOrNil); 66 | #define itShouldBehaveLike(...) SPTitShouldBehaveLike(__FILE__, __LINE__, __VA_ARGS__) 67 | #define itBehavesLike(...) SPTitShouldBehaveLike(__FILE__, __LINE__, __VA_ARGS__) 68 | 69 | void setAsyncSpecTimeout(NSTimeInterval timeout); 70 | #define AsyncBlock (void (^done)(void)) 71 | -------------------------------------------------------------------------------- /Example/Pods/Pods-Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## Expecta 5 | 6 | Copyright (c) 2011-2012 Specta Team - https://github.com/specta 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | 27 | ## NPKeyboardLayoutGuide 28 | 29 | Copyright (c) 2014 Oleksii Kuchma 30 | 31 | Permission is hereby granted, free of charge, to any person obtaining a copy 32 | of this software and associated documentation files (the "Software"), to deal 33 | in the Software without restriction, including without limitation the rights 34 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 35 | copies of the Software, and to permit persons to whom the Software is 36 | furnished to do so, subject to the following conditions: 37 | 38 | The above copyright notice and this permission notice shall be included in 39 | all copies or substantial portions of the Software. 40 | 41 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 42 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 43 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 44 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 45 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 46 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 47 | THE SOFTWARE. 48 | 49 | 50 | ## Specta 51 | 52 | Copyright (c) 2012-2013 Specta Team. 53 | 54 | Permission is hereby granted, free of charge, to any person obtaining a copy 55 | of this software and associated documentation files (the "Software"), to deal 56 | in the Software without restriction, including without limitation the rights 57 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 58 | copies of the Software, and to permit persons to whom the Software is 59 | furnished to do so, subject to the following conditions: 60 | 61 | The above copyright notice and this permission notice shall be included in 62 | all copies or substantial portions of the Software. 63 | 64 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 65 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 66 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 67 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 68 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 69 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 70 | THE SOFTWARE. 71 | 72 | 73 | Generated by CocoaPods - http://cocoapods.org 74 | -------------------------------------------------------------------------------- /Example/Pods/Specta/src/SPTReporter.m: -------------------------------------------------------------------------------- 1 | #import "SPTReporter.h" 2 | #import "SPTNestedReporter.h" 3 | #import "XCTestLog+Specta.h" 4 | 5 | @interface SPTReporter () 6 | 7 | @property (nonatomic, strong, readwrite) NSArray *runStack; 8 | @property (nonatomic, assign, readwrite) NSInteger numberOfCompletedTestCases; 9 | 10 | @end 11 | 12 | @implementation SPTReporter 13 | 14 | + (instancetype)sharedReporter { 15 | static SPTReporter * sharedReporter; 16 | static dispatch_once_t onceToken; 17 | dispatch_once(&onceToken, ^{ 18 | sharedReporter = [self loadSharedReporter]; 19 | }); 20 | 21 | return sharedReporter; 22 | } 23 | 24 | + (SPTReporter *)loadSharedReporter { 25 | NSString * customReporterClassName = [[NSProcessInfo processInfo] environment][@"SPECTA_REPORTER_CLASS"]; 26 | if (customReporterClassName != nil) { 27 | Class customReporterClass = NSClassFromString(customReporterClassName); 28 | if (customReporterClass != nil) { 29 | return [[customReporterClass alloc] init]; 30 | } 31 | } 32 | 33 | return [[SPTNestedReporter alloc] init]; 34 | } 35 | 36 | #pragma mark - Run Stack 37 | 38 | - (NSUInteger)runStackCount { 39 | return self.runStack.count; 40 | } 41 | 42 | - (void)pushRunStack:(XCTestRun *)run { 43 | [(NSMutableArray *)self.runStack addObject:run]; 44 | } 45 | 46 | - (void)popRunStack:(XCTestRun *)run { 47 | NSAssert(run != nil, @"Attempt to pop nil test run"); 48 | 49 | NSAssert([self.runStack lastObject] == run, 50 | @"Attempt to pop test run (%@) out of order: %@", 51 | run, 52 | self.runStack); 53 | 54 | [(NSMutableArray *)self.runStack removeLastObject]; 55 | } 56 | 57 | - (NSInteger)numberOfTestCases { 58 | XCTestRun * rootRun = self.runStack.firstObject; 59 | if (rootRun) { 60 | return rootRun.testCaseCount; 61 | } else { 62 | return 0; 63 | } 64 | } 65 | 66 | #pragma mark - Printing 67 | 68 | - (void)printString:(NSString *)string { 69 | [[self logFileHandle] writeData:[string dataUsingEncoding:NSUTF8StringEncoding]]; 70 | } 71 | 72 | - (void)printStringWithFormat:(NSString *)formatString, ... { 73 | va_list args; 74 | va_start(args, formatString); 75 | NSString * formattedString = [[NSString alloc] initWithFormat:formatString arguments:args]; 76 | va_end(args); 77 | 78 | [self printString:formattedString]; 79 | } 80 | 81 | - (void)printLine { 82 | [self printString:@"\n"]; 83 | } 84 | 85 | - (void)printLine:(NSString *)line { 86 | [self printStringWithFormat:@"%@\n", line]; 87 | } 88 | 89 | - (void)printLineWithFormat:(NSString *)formatString, ... { 90 | va_list args; 91 | va_start(args, formatString); 92 | NSString * formattedString = [[NSString alloc] initWithFormat:formatString arguments:args]; 93 | va_end(args); 94 | 95 | [self printLine:formattedString]; 96 | } 97 | 98 | #pragma mark - XCTestObserver 99 | 100 | - (void)startObserving { 101 | [super startObserving]; 102 | 103 | self.runStack = [[NSMutableArray alloc] init]; 104 | } 105 | 106 | - (void)stopObserving { 107 | [super stopObserving]; 108 | 109 | self.runStack = nil; 110 | } 111 | 112 | - (void)testSuiteDidStart:(XCTestRun *)testRun { 113 | [super testSuiteDidStart:testRun]; 114 | [self pushRunStack:testRun]; 115 | } 116 | 117 | - (void)testSuiteDidStop:(XCTestRun *)testRun { 118 | [super testSuiteDidStop:testRun]; 119 | [self popRunStack:testRun]; 120 | } 121 | 122 | - (void)testCaseDidStart:(XCTestRun *)testRun { 123 | [super testCaseDidStart:testRun]; 124 | [self pushRunStack:testRun]; 125 | } 126 | 127 | - (void)testCaseDidStop:(XCTestRun *)testRun { 128 | [super testCaseDidStop:testRun]; 129 | [self popRunStack:testRun]; 130 | 131 | self.numberOfCompletedTestCases++; 132 | } 133 | 134 | @end -------------------------------------------------------------------------------- /Example/Pods/Pods-Tests-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 5 | > "$RESOURCES_TO_COPY" 6 | 7 | install_resource() 8 | { 9 | case $1 in 10 | *.storyboard) 11 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 12 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 13 | ;; 14 | *.xib) 15 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 16 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 17 | ;; 18 | *.framework) 19 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 21 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 22 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 23 | ;; 24 | *.xcdatamodel) 25 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" 26 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" 27 | ;; 28 | *.xcdatamodeld) 29 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" 30 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" 31 | ;; 32 | *.xcassets) 33 | ;; 34 | /*) 35 | echo "$1" 36 | echo "$1" >> "$RESOURCES_TO_COPY" 37 | ;; 38 | *) 39 | echo "${PODS_ROOT}/$1" 40 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" 41 | ;; 42 | esac 43 | } 44 | install_resource "${BUILT_PRODUCTS_DIR}/NPKeyboardLayoutGuide.bundle" 45 | 46 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 47 | if [[ "${ACTION}" == "install" ]]; then 48 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 49 | fi 50 | rm -f "$RESOURCES_TO_COPY" 51 | 52 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ `xcrun --find actool` ] && [ `find . -name '*.xcassets' | wc -l` -ne 0 ] 53 | then 54 | case "${TARGETED_DEVICE_FAMILY}" in 55 | 1,2) 56 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 57 | ;; 58 | 1) 59 | TARGET_DEVICE_ARGS="--target-device iphone" 60 | ;; 61 | 2) 62 | TARGET_DEVICE_ARGS="--target-device ipad" 63 | ;; 64 | *) 65 | TARGET_DEVICE_ARGS="--target-device mac" 66 | ;; 67 | esac 68 | find "${PWD}" -name "*.xcassets" -print0 | xargs -0 actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 69 | fi 70 | -------------------------------------------------------------------------------- /Example/Pods/Pods-NPKeyboardLayoutGuide-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 5 | > "$RESOURCES_TO_COPY" 6 | 7 | install_resource() 8 | { 9 | case $1 in 10 | *.storyboard) 11 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 12 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 13 | ;; 14 | *.xib) 15 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 16 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 17 | ;; 18 | *.framework) 19 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 21 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 22 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 23 | ;; 24 | *.xcdatamodel) 25 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" 26 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" 27 | ;; 28 | *.xcdatamodeld) 29 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" 30 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" 31 | ;; 32 | *.xcassets) 33 | ;; 34 | /*) 35 | echo "$1" 36 | echo "$1" >> "$RESOURCES_TO_COPY" 37 | ;; 38 | *) 39 | echo "${PODS_ROOT}/$1" 40 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" 41 | ;; 42 | esac 43 | } 44 | install_resource "${BUILT_PRODUCTS_DIR}/NPKeyboardLayoutGuide.bundle" 45 | 46 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 47 | if [[ "${ACTION}" == "install" ]]; then 48 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 49 | fi 50 | rm -f "$RESOURCES_TO_COPY" 51 | 52 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ `xcrun --find actool` ] && [ `find . -name '*.xcassets' | wc -l` -ne 0 ] 53 | then 54 | case "${TARGETED_DEVICE_FAMILY}" in 55 | 1,2) 56 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 57 | ;; 58 | 1) 59 | TARGET_DEVICE_ARGS="--target-device iphone" 60 | ;; 61 | 2) 62 | TARGET_DEVICE_ARGS="--target-device ipad" 63 | ;; 64 | *) 65 | TARGET_DEVICE_ARGS="--target-device mac" 66 | ;; 67 | esac 68 | find "${PWD}" -name "*.xcassets" -print0 | xargs -0 actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 69 | fi 70 | -------------------------------------------------------------------------------- /Pod/Classes/NPKeyboardLayoutGuide.m: -------------------------------------------------------------------------------- 1 | // 2 | // NPKeyboardLayoutGuide.m 3 | // 4 | // Created by Oleksii Kuchma on 9/13/14. 5 | // 6 | // Copyright (c) 2014 Oleksii Kuchma 7 | // 8 | 9 | #import "NPKeyboardLayoutGuide.h" 10 | 11 | #import 12 | 13 | @interface NPKeyboardLayoutGuide : UIView 14 | 15 | @property (nonatomic, weak) NSLayoutConstraint *verticalPositionConstraint; 16 | 17 | /** 18 | Add layout guide to view 19 | 20 | @param view View to which layout guide should be added. 21 | */ 22 | - (void)addToView:(UIView *)view; 23 | 24 | @end 25 | 26 | @implementation UIViewController (NPKeyboardLayoutGuide) 27 | 28 | - (id)keyboardLayoutGuide 29 | { 30 | NPKeyboardLayoutGuide *layoutGuide = objc_getAssociatedObject(self, "NPKeyboardLayoutGuide"); 31 | 32 | if (!layoutGuide) 33 | { 34 | layoutGuide = [[NPKeyboardLayoutGuide alloc] init]; 35 | [layoutGuide addToView:self.view]; 36 | 37 | objc_setAssociatedObject(self, "NPKeyboardLayoutGuide", layoutGuide, OBJC_ASSOCIATION_ASSIGN); 38 | } 39 | 40 | return layoutGuide; 41 | } 42 | 43 | @end 44 | 45 | @implementation NPKeyboardLayoutGuide 46 | 47 | - (id)initWithFrame:(CGRect)frame 48 | { 49 | self = [super initWithFrame:frame]; 50 | 51 | if (self) 52 | { 53 | 54 | } 55 | 56 | return self; 57 | } 58 | 59 | - (void)dealloc 60 | { 61 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 62 | } 63 | 64 | - (void)addToView:(UIView *)view 65 | { 66 | NSAssert((self.superview == nil), @"Keyboard layout guide has already added to view!"); 67 | 68 | self.hidden = YES; 69 | self.translatesAutoresizingMaskIntoConstraints = NO; 70 | 71 | [view addSubview:self]; 72 | 73 | NSLayoutConstraint *constraint = [NSLayoutConstraint constraintWithItem:self 74 | attribute:NSLayoutAttributeTop 75 | relatedBy:NSLayoutRelationEqual 76 | toItem:view 77 | attribute:NSLayoutAttributeBottom 78 | multiplier:1.f 79 | constant:0.f]; 80 | 81 | [view addConstraint:constraint]; 82 | 83 | self.verticalPositionConstraint = constraint; 84 | 85 | [[NSNotificationCenter defaultCenter] addObserver:self 86 | selector:@selector(keyboardWillChangeFrame:) 87 | name:UIKeyboardWillChangeFrameNotification 88 | object:nil]; 89 | } 90 | 91 | - (void)keyboardWillChangeFrame:(NSNotification *)notification 92 | { 93 | NSDictionary *info = [notification userInfo]; 94 | NSTimeInterval animationDuration = [[info objectForKey:UIKeyboardAnimationDurationUserInfoKey] doubleValue]; 95 | UIViewAnimationOptions animationCurveOptions = [[info objectForKey:UIKeyboardAnimationCurveUserInfoKey] integerValue] << 16; 96 | 97 | CGRect endKeyboardFrame = [[info objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue]; 98 | CGRect windowFrame = self.window.frame; 99 | 100 | CGRect convertedEndFrame = [self.window convertRect:endKeyboardFrame toView:self.superview]; 101 | CGRect convertedWindowFrame = [self.window convertRect:windowFrame toView:self.superview]; 102 | 103 | _verticalPositionConstraint.constant = convertedEndFrame.origin.y - (convertedWindowFrame.origin.y + convertedWindowFrame.size.height); 104 | 105 | [UIView animateWithDuration:animationDuration 106 | delay:0 107 | options:UIViewAnimationOptionBeginFromCurrentState | animationCurveOptions 108 | animations:^ 109 | { 110 | [self.superview layoutIfNeeded]; 111 | } 112 | completion:nil]; 113 | } 114 | 115 | @end 116 | -------------------------------------------------------------------------------- /Example/Pods/Specta/src/Specta.m: -------------------------------------------------------------------------------- 1 | #import "Specta.h" 2 | #import "SpectaTypes.h" 3 | #import "SpectaUtility.h" 4 | 5 | @implementation Specta 6 | @end 7 | 8 | void SPTdescribe(NSString *name, BOOL focused, void (^block)()) { 9 | if (block) { 10 | [SPTGroupStack addObject:[SPTCurrentGroup addExampleGroupWithName:name focused:focused]]; 11 | block(); 12 | [SPTGroupStack removeLastObject]; 13 | } else { 14 | SPTexample(name, focused, nil); 15 | } 16 | } 17 | 18 | void describe(NSString *name, void (^block)()) { 19 | SPTdescribe(name, NO, block); 20 | } 21 | 22 | void fdescribe(NSString *name, void (^block)()) { 23 | SPTdescribe(name, YES, block); 24 | } 25 | 26 | void context(NSString *name, void (^block)()) { 27 | SPTdescribe(name, NO, block); 28 | } 29 | void fcontext(NSString *name, void (^block)()) { 30 | SPTdescribe(name, YES, block); 31 | } 32 | 33 | void SPTexample(NSString *name, BOOL focused, id block) { 34 | SPTReturnUnlessBlockOrNil(block); 35 | [SPTCurrentGroup addExampleWithName:name block:block focused:focused]; 36 | } 37 | 38 | void example(NSString *name, id block) { 39 | SPTexample(name, NO, block); 40 | } 41 | 42 | void fexample(NSString *name, id block) { 43 | SPTexample(name, YES, block); 44 | } 45 | 46 | void it(NSString *name, id block) { 47 | SPTexample(name, NO, block); 48 | } 49 | 50 | void fit(NSString *name, id block) { 51 | SPTexample(name, YES, block); 52 | } 53 | 54 | void specify(NSString *name, id block) { 55 | SPTexample(name, NO, block); 56 | } 57 | 58 | void fspecify(NSString *name, id block) { 59 | SPTexample(name, YES, block); 60 | } 61 | 62 | void SPTpending(NSString *name, ...) { 63 | SPTexample(name, NO, nil); 64 | } 65 | 66 | void beforeAll(id block) { 67 | SPTReturnUnlessBlockOrNil(block); 68 | [SPTCurrentGroup addBeforeAllBlock:block]; 69 | } 70 | 71 | void afterAll(id block) { 72 | SPTReturnUnlessBlockOrNil(block); 73 | [SPTCurrentGroup addAfterAllBlock:block]; 74 | } 75 | 76 | void beforeEach(id block) { 77 | SPTReturnUnlessBlockOrNil(block); 78 | [SPTCurrentGroup addBeforeEachBlock:block]; 79 | } 80 | 81 | void afterEach(id block) { 82 | SPTReturnUnlessBlockOrNil(block); 83 | [SPTCurrentGroup addAfterEachBlock:block]; 84 | } 85 | 86 | void before(id block) { 87 | beforeEach(block); 88 | } 89 | 90 | void after(id block) { 91 | afterEach(block); 92 | } 93 | 94 | void sharedExamplesFor(NSString *name, void (^block)(NSDictionary *data)) { 95 | [SPTSharedExampleGroups addSharedExampleGroupWithName:name block:block exampleGroup:SPTCurrentGroup]; 96 | } 97 | 98 | void sharedExamples(NSString *name, void (^block)(NSDictionary *data)) { 99 | sharedExamplesFor(name, block); 100 | } 101 | 102 | void SPTitShouldBehaveLike(const char *fileName, NSUInteger lineNumber, NSString *name, id dictionaryOrBlock) { 103 | SPTDictionaryBlock block = [SPTSharedExampleGroups sharedExampleGroupWithName:name exampleGroup:SPTCurrentGroup]; 104 | if (block) { 105 | if (SPTIsBlock(dictionaryOrBlock)) { 106 | id (^dataBlock)(void) = [dictionaryOrBlock copy]; 107 | 108 | describe(name, ^{ 109 | __block NSMutableDictionary *dataDict = [[NSMutableDictionary alloc] init]; 110 | 111 | beforeEach(^{ 112 | NSDictionary *blockData = dataBlock(); 113 | [dataDict removeAllObjects]; 114 | [dataDict addEntriesFromDictionary:blockData]; 115 | }); 116 | 117 | block(dataDict); 118 | 119 | afterAll(^{ 120 | dataDict = nil; 121 | }); 122 | }); 123 | } else { 124 | NSDictionary *data = dictionaryOrBlock; 125 | 126 | describe(name, ^{ 127 | block(data); 128 | }); 129 | } 130 | } else { 131 | SPTXCTestCase *currentTestCase = SPTCurrentTestCase; 132 | if (currentTestCase) { 133 | [currentTestCase recordFailureWithDescription:@"itShouldBehaveLike should not be invoked inside an example block!" inFile:@(fileName) atLine:lineNumber expected:NO]; 134 | } else { 135 | it(name, ^{ 136 | [currentTestCase recordFailureWithDescription:[NSString stringWithFormat:@"Shared example group \"%@\" does not exist.", name] inFile:@(fileName) atLine:lineNumber expected:NO]; 137 | }); 138 | } 139 | } 140 | } 141 | 142 | void setAsyncSpecTimeout(NSTimeInterval timeout) { 143 | [SPTExampleGroup setAsyncSpecTimeout:timeout]; 144 | } -------------------------------------------------------------------------------- /Example/NPKeyboardLayoutGuide.xcodeproj/xcshareddata/xcschemes/NPKeyboardLayoutGuide.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 44 | 45 | 46 | 47 | 48 | 54 | 55 | 56 | 57 | 66 | 67 | 73 | 74 | 75 | 76 | 77 | 78 | 84 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /Example/Pods/Pods-Tests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2011-2012 Specta Team - https://github.com/specta 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | Title 38 | Expecta 39 | Type 40 | PSGroupSpecifier 41 | 42 | 43 | FooterText 44 | Copyright (c) 2014 Oleksii Kuchma <nod3pad@gmail.com> 45 | 46 | Permission is hereby granted, free of charge, to any person obtaining a copy 47 | of this software and associated documentation files (the "Software"), to deal 48 | in the Software without restriction, including without limitation the rights 49 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 50 | copies of the Software, and to permit persons to whom the Software is 51 | furnished to do so, subject to the following conditions: 52 | 53 | The above copyright notice and this permission notice shall be included in 54 | all copies or substantial portions of the Software. 55 | 56 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 57 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 58 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 59 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 60 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 61 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 62 | THE SOFTWARE. 63 | 64 | Title 65 | NPKeyboardLayoutGuide 66 | Type 67 | PSGroupSpecifier 68 | 69 | 70 | FooterText 71 | Copyright (c) 2012-2013 Specta Team. 72 | 73 | Permission is hereby granted, free of charge, to any person obtaining a copy 74 | of this software and associated documentation files (the "Software"), to deal 75 | in the Software without restriction, including without limitation the rights 76 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 77 | copies of the Software, and to permit persons to whom the Software is 78 | furnished to do so, subject to the following conditions: 79 | 80 | The above copyright notice and this permission notice shall be included in 81 | all copies or substantial portions of the Software. 82 | 83 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 84 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 85 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 86 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 87 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 88 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 89 | THE SOFTWARE. 90 | 91 | 92 | Title 93 | Specta 94 | Type 95 | PSGroupSpecifier 96 | 97 | 98 | FooterText 99 | Generated by CocoaPods - http://cocoapods.org 100 | Title 101 | 102 | Type 103 | PSGroupSpecifier 104 | 105 | 106 | StringsTable 107 | Acknowledgements 108 | Title 109 | Acknowledgements 110 | 111 | 112 | -------------------------------------------------------------------------------- /Example/NPKeyboardLayoutGuide/Base.lproj/Main_iPad.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /Example/Pods/Specta/src/SPTXCTestCase.m: -------------------------------------------------------------------------------- 1 | #import "SPTXCTestCase.h" 2 | #import "SPTSpec.h" 3 | #import "SPTExample.h" 4 | #import "SPTSharedExampleGroups.h" 5 | #import "SpectaUtility.h" 6 | #import 7 | 8 | @implementation SPTXCTestCase 9 | 10 | + (void)initialize { 11 | [SPTSharedExampleGroups initialize]; 12 | SPTSpec *spec = [[SPTSpec alloc] init]; 13 | SPTXCTestCase *testCase = [[[self class] alloc] init]; 14 | objc_setAssociatedObject(self, "spt_spec", spec, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 15 | [testCase spt_defineSpec]; 16 | [spec compile]; 17 | [super initialize]; 18 | } 19 | 20 | + (SPTSpec *)spt_spec { 21 | return objc_getAssociatedObject(self, "spt_spec"); 22 | } 23 | 24 | + (BOOL)spt_isDisabled { 25 | return [self spt_spec].disabled; 26 | } 27 | 28 | + (void)spt_setDisabled:(BOOL)disabled { 29 | [self spt_spec].disabled = disabled; 30 | } 31 | 32 | - (BOOL)spt_isPending { 33 | SPTExample *example = [self spt_getCurrentExample]; 34 | return example == nil || example.pending; 35 | } 36 | 37 | + (NSArray *)spt_allSpecClasses { 38 | static NSArray *allSpecClasses = nil; 39 | static dispatch_once_t onceToken; 40 | dispatch_once(&onceToken, ^{ 41 | 42 | NSMutableArray *specClasses = [[NSMutableArray alloc] init]; 43 | 44 | int numberOfClasses = objc_getClassList(NULL, 0); 45 | if (numberOfClasses > 0) { 46 | Class *classes = (Class *)malloc(sizeof(Class) * numberOfClasses); 47 | numberOfClasses = objc_getClassList(classes, numberOfClasses); 48 | 49 | for (int classIndex = 0; classIndex < numberOfClasses; classIndex++) { 50 | Class aClass = classes[classIndex]; 51 | if (SPTIsSpecClass(aClass)) { 52 | [specClasses addObject:aClass]; 53 | } 54 | } 55 | 56 | free(classes); 57 | } 58 | 59 | allSpecClasses = [specClasses copy]; 60 | }); 61 | 62 | return allSpecClasses; 63 | } 64 | 65 | + (BOOL)spt_focusedExamplesExist { 66 | for (Class specClass in [self spt_allSpecClasses]) { 67 | SPTSpec *spec = [specClass spt_spec]; 68 | if (spec.disabled == NO && [spec hasFocusedExamples]) { 69 | return YES; 70 | } 71 | } 72 | 73 | return NO; 74 | } 75 | 76 | - (void)spt_setCurrentSpecWithFileName:(const char *)fileName lineNumber:(NSUInteger)lineNumber { 77 | SPTSpec *spec = [[self class] spt_spec]; 78 | spec.fileName = @(fileName); 79 | spec.lineNumber = lineNumber; 80 | [[NSThread currentThread] threadDictionary][SPTCurrentSpecKey] = spec; 81 | } 82 | 83 | - (void)spt_defineSpec {} 84 | 85 | - (void)spt_unsetCurrentSpec { 86 | [[[NSThread currentThread] threadDictionary] removeObjectForKey:SPTCurrentSpecKey]; 87 | } 88 | 89 | - (void)spt_runExampleAtIndex:(NSUInteger)index { 90 | [[NSThread currentThread] threadDictionary][SPTCurrentTestCaseKey] = self; 91 | SPTExample *compiledExample = ([[self class] spt_spec].compiledExamples)[index]; 92 | if (!compiledExample.pending) { 93 | if ([[self class] spt_isDisabled] == NO && 94 | (compiledExample.focused || [[self class] spt_focusedExamplesExist] == NO)) { 95 | ((SPTVoidBlock)compiledExample.block)(); 96 | } else { 97 | self.spt_skipped = YES; 98 | } 99 | } 100 | 101 | [[[NSThread currentThread] threadDictionary] removeObjectForKey:SPTCurrentTestCaseKey]; 102 | } 103 | 104 | - (SPTExample *)spt_getCurrentExample { 105 | if (!self.spt_invocation) { 106 | return nil; 107 | } 108 | NSUInteger i; 109 | [self.spt_invocation getArgument:&i atIndex:2]; 110 | return ([[self class] spt_spec].compiledExamples)[i]; 111 | } 112 | 113 | #pragma mark - XCTestCase overrides 114 | 115 | + (NSArray *)testInvocations { 116 | NSMutableArray *invocations = [NSMutableArray array]; 117 | for(NSUInteger i = 0; i < [[self spt_spec].compiledExamples count]; i ++) { 118 | NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[self instanceMethodSignatureForSelector:@selector(spt_runExampleAtIndex:)]]; 119 | NSUInteger j = i; 120 | [invocation setSelector:@selector(spt_runExampleAtIndex:)]; 121 | [invocation setArgument:&j atIndex:2]; 122 | [invocations addObject:invocation]; 123 | } 124 | return invocations; 125 | } 126 | 127 | - (void)setInvocation:(NSInvocation *)invocation { 128 | self.spt_invocation = invocation; 129 | [super setInvocation:invocation]; 130 | } 131 | 132 | - (NSString *)name { 133 | NSString *specName = NSStringFromClass([self class]); 134 | SPTExample *compiledExample = [self spt_getCurrentExample]; 135 | NSCharacterSet *charSet = [NSCharacterSet characterSetWithCharactersInString:@"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"]; 136 | NSString *exampleName = [[compiledExample.name componentsSeparatedByCharactersInSet:[charSet invertedSet]] componentsJoinedByString:@"_"]; 137 | return [NSString stringWithFormat:@"-[%@ %@]", specName, exampleName]; 138 | } 139 | 140 | - (void)recordFailureWithDescription:(NSString *)description inFile:(NSString *)filename atLine:(NSUInteger)lineNumber expected:(BOOL)expected { 141 | SPTXCTestCase *currentTestCase = SPTCurrentTestCase; 142 | [currentTestCase.spt_run recordFailureInTest:currentTestCase withDescription:description inFile:filename atLine:lineNumber expected:expected]; 143 | } 144 | 145 | - (void)performTest:(XCTestRun *)run { 146 | self.spt_run = (XCTestCaseRun *)run; 147 | [super performTest:run]; 148 | self.spt_run = nil; 149 | } 150 | 151 | @end 152 | -------------------------------------------------------------------------------- /Example/NPKeyboardLayoutGuide/Base.lproj/Main_iPhone.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /Example/Pods/Specta/README.md: -------------------------------------------------------------------------------- 1 | # Specta 2 | 3 | A light-weight TDD / BDD framework for Objective-C & Cocoa. 4 | 5 | ### FEATURES 6 | 7 | * RSpec-like BDD DSL 8 | * Super quick and easy to set up 9 | * Runs on top of XCTest 10 | * Excellent Xcode integration 11 | 12 | ### SCREENSHOT 13 | 14 | ![Specta Screenshot](http://github.com/petejkim/stuff/raw/master/images/specta-screenshot.png) 15 | 16 | ### SETUP 17 | 18 | Use [CocoaPods](http://github.com/CocoaPods/CocoaPods) 19 | 20 | ```ruby 21 | target :MyApp do 22 | # your app dependencies 23 | end 24 | 25 | target :MyAppTests do 26 | pod 'Specta', '~> 0.2.1' 27 | # pod 'Expecta', '~> 0.2.3' # expecta matchers 28 | # pod 'OCMock', '~> 2.2.1' # OCMock 29 | # pod 'OCHamcrest', '~> 3.0.0' # hamcrest matchers 30 | # pod 'OCMockito', '~> 1.0.0' # OCMock 31 | # pod 'LRMocky', '~> 0.9.1' # LRMocky 32 | end 33 | ``` 34 | 35 | or 36 | 37 | 1. Clone from Github. 38 | 2. Run `rake` in project root to build. 39 | 3. Add a "Cocoa/Cocoa Touch Unit Testing Bundle" target if you don't already have one. 40 | 4. Copy and add all header files in `products` folder to the Test target in your Xcode project. 41 | 5. For **OS X projects**, copy and add `libSpecta-macosx.a` in `products` folder to the Test target in your Xcode project. 42 | For **iOS projects**, copy and add `libSpecta-ios-universal.a` in `products` folder to the Test target in your Xcode project. 43 | 6. Add `-ObjC` and `-all_load` to the "Other Linker Flags" build setting for the Spec/Test target in your Xcode project. 44 | 7. Add the following to your test code. 45 | 46 | ```objective-c 47 | #import "Specta.h" 48 | ``` 49 | 50 | Standard XCTest matchers such as `XCTAssertEqualObjects` and `XCTAssertNil` work, but you probably want to add a nicer matcher framework - [Expecta](http://github.com/petejkim/expecta/) to your setup. Or if you really prefer, [OCHamcrest](https://github.com/jonreid/OCHamcrest) works fine too. Also, add a mocking framework: [OCMock](http://ocmock.org/). 51 | 52 | ## WRITING SPECS 53 | 54 | ```objective-c 55 | #import "Specta.h" 56 | 57 | SharedExamplesBegin(MySharedExamples) 58 | // Global shared examples are shared across all spec files. 59 | 60 | sharedExamplesFor(@"a shared behavior", ^(NSDictionary *data) { 61 | it(@"should do some stuff", ^{ 62 | id obj = data[@"key"]; 63 | // ... 64 | }); 65 | }); 66 | 67 | SharedExamplesEnd 68 | 69 | SpecBegin(Thing) 70 | 71 | describe(@"Thing", ^{ 72 | sharedExamplesFor(@"another shared behavior", ^(NSDictionary *data) { 73 | // Locally defined shared examples can override global shared examples within its scope. 74 | }); 75 | 76 | beforeAll(^{ 77 | // This is run once and only once before all of the examples 78 | // in this group and before any beforeEach blocks. 79 | }); 80 | 81 | beforeEach(^{ 82 | // This is run before each example. 83 | }); 84 | 85 | it(@"should do stuff", ^{ 86 | // This is an example block. Place your assertions here. 87 | }); 88 | 89 | it(@"should do some stuff asynchronously", ^AsyncBlock { 90 | // Async example blocks need to invoke done() callback. 91 | done(); 92 | }); 93 | 94 | itShouldBehaveLike(@"a shared behavior", @{@"key" : @"obj"}); 95 | 96 | itShouldBehaveLike(@"another shared behavior", ^{ 97 | // Use a block that returns a dictionary if you need the context to be evaluated lazily, 98 | // e.g. to use an object prepared in a beforeEach block. 99 | return @{@"key" : @"obj"}; 100 | }); 101 | 102 | describe(@"Nested examples", ^{ 103 | it(@"should do even more stuff", ^{ 104 | // ... 105 | }); 106 | }); 107 | 108 | pending(@"pending example"); 109 | 110 | pending(@"another pending example", ^{ 111 | // ... 112 | }); 113 | 114 | afterEach(^{ 115 | // This is run after each example. 116 | }); 117 | 118 | afterAll(^{ 119 | // This is run once and only once after all of the examples 120 | // in this group and after any afterEach blocks. 121 | }); 122 | }); 123 | 124 | SpecEnd 125 | ``` 126 | 127 | * `beforeEach` and `afterEach` are also aliased as `before` and `after` respectively. 128 | * `describe` is also aliased as `context`. 129 | * `it` is also aliased as `example` and `specify`. 130 | * `itShouldBehaveLike` is also aliased as `itBehavesLike`. 131 | * Use `pending` or prepend `x` to `describe`, `context`, `example`, `it`, and `specify` to mark examples or groups as pending. 132 | * Use `^AsyncBlock` as shown in the example above to make examples wait for completion. `done()` callback needs to be invoked to let Specta know that your test is complete. The default timeout is 10.0 seconds but this can be changed by calling the function `setAsyncSpecTimeout(NSTimeInterval timeout)`. 133 | * `(before|after)(Each/All)` also accept `^AsyncBlock`s. 134 | * Do `#define SPT_CEDAR_SYNTAX` before importing Specta if you prefer to write `SPEC_BEGIN` and `SPEC_END` instead of `SpecBegin` and `SpecEnd`. 135 | * Prepend `f` to your `describe`, `context`, `example`, `it`, and `specify` to set focus on examples or groups. When specs are focused, all unfocused specs are skipped. 136 | * To use original XCTest reporter, set an environment variable named `SPECTA_REPORTER_CLASS` to `SPTXCTestReporter` in your test scheme. 137 | 138 | ### CONTRIBUTION GUIDELINES 139 | 140 | * Please use only spaces and indent 2 spaces at a time. 141 | * Please prefix instance variable names with a single underscore (`_`). 142 | * Please prefix custom classes and functions defined in the global scope with `SPT`. 143 | 144 | ## LICENSE 145 | 146 | Copyright (c) 2012-2013 [Specta Team](https://github.com/specta?tab=members). This software is licensed under the [MIT License](http://github.com/petejkim/specta/raw/master/LICENSE). -------------------------------------------------------------------------------- /Example/Pods/Expecta/src/EXPExpect.m: -------------------------------------------------------------------------------- 1 | #import "EXPExpect.h" 2 | #import "NSObject+Expecta.h" 3 | #import "Expecta.h" 4 | #import "EXPUnsupportedObject.h" 5 | #import "EXPMatcher.h" 6 | #import "EXPBlockDefinedMatcher.h" 7 | #import 8 | 9 | @implementation EXPExpect 10 | 11 | @dynamic 12 | actual, 13 | to, 14 | toNot, 15 | notTo, 16 | will, 17 | willNot, 18 | after; 19 | 20 | @synthesize 21 | actualBlock=_actualBlock, 22 | testCase=_testCase, 23 | negative=_negative, 24 | asynchronous=_asynchronous, 25 | timeout=_timeout, 26 | lineNumber=_lineNumber, 27 | fileName=_fileName; 28 | 29 | - (id)initWithActualBlock:(id)actualBlock testCase:(id)testCase lineNumber:(int)lineNumber fileName:(const char *)fileName { 30 | self = [super init]; 31 | if(self) { 32 | self.actualBlock = actualBlock; 33 | self.testCase = testCase; 34 | self.negative = NO; 35 | self.asynchronous = NO; 36 | self.timeout = [Expecta asynchronousTestTimeout]; 37 | self.lineNumber = lineNumber; 38 | self.fileName = fileName; 39 | } 40 | return self; 41 | } 42 | 43 | - (void)dealloc 44 | { 45 | self.actualBlock = nil; 46 | [super dealloc]; 47 | } 48 | 49 | + (EXPExpect *)expectWithActualBlock:(id)actualBlock testCase:(id)testCase lineNumber:(int)lineNumber fileName:(const char *)fileName { 50 | return [[[EXPExpect alloc] initWithActualBlock:actualBlock testCase:(id)testCase lineNumber:lineNumber fileName:fileName] autorelease]; 51 | } 52 | 53 | #pragma mark - 54 | 55 | - (EXPExpect *)to { 56 | return self; 57 | } 58 | 59 | - (EXPExpect *)toNot { 60 | self.negative = !self.negative; 61 | return self; 62 | } 63 | 64 | - (EXPExpect *)notTo { 65 | return [self toNot]; 66 | } 67 | 68 | - (EXPExpect *)will { 69 | self.asynchronous = YES; 70 | return self; 71 | } 72 | 73 | - (EXPExpect *)willNot { 74 | return self.will.toNot; 75 | } 76 | 77 | - (EXPExpect *(^)(NSTimeInterval))after 78 | { 79 | EXPExpect * (^block)(NSTimeInterval) = [^EXPExpect *(NSTimeInterval timeout) { 80 | self.asynchronous = YES; 81 | self.timeout = timeout; 82 | return self; 83 | } copy]; 84 | 85 | return [block autorelease]; 86 | } 87 | 88 | #pragma mark - 89 | 90 | - (id)actual { 91 | if(self.actualBlock) { 92 | return self.actualBlock(); 93 | } 94 | return nil; 95 | } 96 | 97 | - (void)applyMatcher:(id)matcher 98 | { 99 | id actual = [self actual]; 100 | [self applyMatcher:matcher to:&actual]; 101 | } 102 | 103 | - (void)applyMatcher:(id)matcher to:(NSObject **)actual { 104 | if([*actual isKindOfClass:[EXPUnsupportedObject class]]) { 105 | EXPFail(self.testCase, self.lineNumber, self.fileName, 106 | [NSString stringWithFormat:@"expecting a %@ is not supported", ((EXPUnsupportedObject *)*actual).type]); 107 | } else { 108 | BOOL failed = NO; 109 | if([matcher respondsToSelector:@selector(meetsPrerequesiteFor:)] && 110 | ![matcher meetsPrerequesiteFor:*actual]) { 111 | failed = YES; 112 | } else { 113 | BOOL matchResult = NO; 114 | if(self.asynchronous) { 115 | NSTimeInterval timeOut = self.timeout; 116 | NSDate *expiryDate = [NSDate dateWithTimeIntervalSinceNow:timeOut]; 117 | while(1) { 118 | matchResult = [matcher matches:*actual]; 119 | failed = self.negative ? matchResult : !matchResult; 120 | if(!failed || ([(NSDate *)[NSDate date] compare:expiryDate] == NSOrderedDescending)) { 121 | break; 122 | } 123 | [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.01]]; 124 | OSMemoryBarrier(); 125 | *actual = self.actual; 126 | } 127 | } else { 128 | matchResult = [matcher matches:*actual]; 129 | } 130 | failed = self.negative ? matchResult : !matchResult; 131 | } 132 | if(failed) { 133 | NSString *message = nil; 134 | 135 | if(self.negative) { 136 | if ([matcher respondsToSelector:@selector(failureMessageForNotTo:)]) { 137 | message = [matcher failureMessageForNotTo:*actual]; 138 | } 139 | } else { 140 | if ([matcher respondsToSelector:@selector(failureMessageForTo:)]) { 141 | message = [matcher failureMessageForTo:*actual]; 142 | } 143 | } 144 | if (message == nil) { 145 | message = @"Match Failed."; 146 | } 147 | 148 | EXPFail(self.testCase, self.lineNumber, self.fileName, message); 149 | } 150 | } 151 | self.negative = NO; 152 | } 153 | 154 | #pragma mark - Dynamic predicate dispatch 155 | 156 | - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector 157 | { 158 | if ([self.actual respondsToSelector:aSelector]) { 159 | return [self.actual methodSignatureForSelector:aSelector]; 160 | } 161 | return [super methodSignatureForSelector:aSelector]; 162 | } 163 | 164 | - (void)forwardInvocation:(NSInvocation *)anInvocation 165 | { 166 | if ([self.actual respondsToSelector:anInvocation.selector]) { 167 | EXPDynamicPredicateMatcher *matcher = [[EXPDynamicPredicateMatcher alloc] initWithExpectation:self selector:anInvocation.selector]; 168 | [anInvocation setSelector:@selector(dispatch)]; 169 | [anInvocation invokeWithTarget:matcher]; 170 | [matcher release]; 171 | } 172 | else { 173 | [super forwardInvocation:anInvocation]; 174 | } 175 | } 176 | 177 | @end 178 | 179 | @implementation EXPDynamicPredicateMatcher 180 | 181 | - (id)initWithExpectation:(EXPExpect *)expectation selector:(SEL)selector 182 | { 183 | if ((self = [super init])) { 184 | _expectation = expectation; 185 | _selector = selector; 186 | } 187 | return self; 188 | } 189 | 190 | - (BOOL)matches:(id)actual 191 | { 192 | return (BOOL)[actual performSelector:_selector]; 193 | } 194 | 195 | - (NSString *)failureMessageForTo:(id)actual 196 | { 197 | return [NSString stringWithFormat:@"expected %@ to be true", NSStringFromSelector(_selector)]; 198 | } 199 | 200 | - (NSString *)failureMessageForNotTo:(id)actual 201 | { 202 | return [NSString stringWithFormat:@"expected %@ to be false", NSStringFromSelector(_selector)]; 203 | } 204 | 205 | - (void (^)(void))dispatch 206 | { 207 | __block id blockExpectation = _expectation; 208 | 209 | return [[^{ 210 | [blockExpectation applyMatcher:self]; 211 | } copy] autorelease]; 212 | } 213 | 214 | @end 215 | -------------------------------------------------------------------------------- /Example/Pods/Specta/src/SPTNestedReporter.m: -------------------------------------------------------------------------------- 1 | #import "SPTNestedReporter.h" 2 | #import "XCTestRun+Specta.h" 3 | 4 | @interface SPTNestedReporter () 5 | 6 | @property (readwrite, assign, nonatomic) NSInteger nestingLevel; 7 | @property (readwrite, assign, nonatomic) BOOL indentationEnabled; 8 | 9 | @end 10 | 11 | @implementation SPTNestedReporter 12 | 13 | #pragma mark - Printing 14 | 15 | - (NSString *)indentation { 16 | // XCode does not strip whitespace from the beginning of lines that report an error. Indentation should only enabled for non-error text. 17 | 18 | if (self.indentationEnabled) { 19 | return [@"" stringByPaddingToLength:(self.nestingLevel * 2) 20 | withString:@" " 21 | startingAtIndex:0]; 22 | } else { 23 | return @""; 24 | } 25 | } 26 | 27 | - (void)withIndentationEnabled:(void(^)(void))block { 28 | [self withIndentationEnabled:YES block:block]; 29 | } 30 | 31 | - (void)withIndentationEnabled:(BOOL)indentationEnabled block:(void(^)(void))block { 32 | BOOL originalValue = self.indentationEnabled; 33 | 34 | self.indentationEnabled = indentationEnabled; 35 | @try { 36 | block(); 37 | } @finally { 38 | self.indentationEnabled = originalValue; 39 | } 40 | } 41 | 42 | - (void)printIndentation { 43 | [self printString:self.indentation]; 44 | } 45 | 46 | - (void)printTestSuiteHeader:(XCTestRun *)testRun { 47 | [self printIndentation]; 48 | [self printLineWithFormat:@"= %@", testRun.test.name]; 49 | } 50 | 51 | - (void)printTestSuiteFooter:(XCTestRun *)testRun { 52 | [self printIndentation]; 53 | [self printLine]; 54 | 55 | if (self.nestingLevel == 0) { 56 | [self printConciseSummaryOfTestRun:testRun]; 57 | } 58 | } 59 | 60 | - (void)printConciseSummaryOfTestRun:(XCTestRun *)testRun { 61 | NSUInteger numberOfTests = testRun.testCaseCount; 62 | NSUInteger numberOfFailures = testRun.totalFailureCount; 63 | NSUInteger numberOfExceptions = testRun.unexpectedExceptionCount; 64 | NSUInteger numberOfSkippedTests = testRun.spt_skippedTestCaseCount; 65 | NSUInteger numberOfPendingTests = testRun.spt_pendingTestCaseCount; 66 | 67 | NSString * runInfo = [[self class] conciseRunInfoWithNumberOfTests:numberOfTests 68 | numberOfSkippedTests:numberOfSkippedTests 69 | numberOfFailures:numberOfFailures 70 | numberOfExceptions:numberOfExceptions 71 | numberOfPendingTests:numberOfPendingTests]; 72 | 73 | [self printIndentation]; 74 | [self printLine:runInfo]; 75 | } 76 | 77 | - (void)printTestCaseHeader:(XCTestRun *)testRun { 78 | [self printIndentation]; 79 | [self printLineWithFormat:@"%@", testRun.test.name]; 80 | } 81 | 82 | - (void)printTestCaseFooter:(XCTestRun *)testRun { 83 | [self printIndentation]; 84 | [self printLine]; 85 | } 86 | 87 | + (NSString *)pluralizeString:(NSString *)singularString 88 | pluralString:(NSString *)pluralString 89 | count:(NSInteger)count { 90 | return (count == 1 || count == -1) ? singularString : pluralString; 91 | } 92 | 93 | + (NSString *)conciseRunInfoWithNumberOfTests:(NSUInteger)numberOfTests 94 | numberOfSkippedTests:(NSUInteger)numberOfSkippedTests 95 | numberOfFailures:(NSUInteger)numberOfFailures 96 | numberOfExceptions:(NSUInteger)numberOfExceptions 97 | numberOfPendingTests:(NSUInteger)numberOfPendingTests { 98 | NSString * testLabel = [[self class] pluralizeString:@"test" 99 | pluralString:@"tests" 100 | count:numberOfTests]; 101 | 102 | NSString * failureLabel = [[self class] pluralizeString:@"failure" 103 | pluralString:@"failures" 104 | count:numberOfFailures]; 105 | 106 | NSString * exceptionLabel = [[self class] pluralizeString:@"exception" 107 | pluralString:@"exceptions" 108 | count:numberOfExceptions]; 109 | 110 | return [NSString stringWithFormat:@"%lu %@; %lu skipped; %lu %@; %lu %@; %lu pending", 111 | (unsigned long)numberOfTests, 112 | testLabel, 113 | (unsigned long)numberOfSkippedTests, 114 | (unsigned long)numberOfFailures, 115 | failureLabel, 116 | (unsigned long)numberOfExceptions, 117 | exceptionLabel, 118 | (unsigned long)numberOfPendingTests]; 119 | } 120 | 121 | #pragma mark - XCTestObserver 122 | 123 | - (void)startObserving { 124 | [super startObserving]; 125 | 126 | self.nestingLevel = 0; 127 | } 128 | 129 | - (void)testSuiteDidStart:(XCTestRun *)testRun { 130 | [self withIndentationEnabled:^{ 131 | 132 | [self printTestSuiteHeader:testRun]; 133 | self.nestingLevel ++; 134 | 135 | [super testSuiteDidStart:testRun]; 136 | [self printLine]; 137 | 138 | }]; 139 | } 140 | 141 | - (void)testSuiteDidStop:(XCTestRun *)testRun { 142 | [self withIndentationEnabled:^{ 143 | 144 | [super testSuiteDidStop:testRun]; 145 | 146 | self.nestingLevel --; 147 | [self printTestSuiteFooter:testRun]; 148 | 149 | }]; 150 | } 151 | 152 | - (void)testCaseDidStart:(XCTestRun *)testRun { 153 | [self withIndentationEnabled:^{ 154 | 155 | [self printTestCaseHeader:testRun]; 156 | self.nestingLevel ++; 157 | 158 | [super testCaseDidStart:testRun]; 159 | 160 | }]; 161 | } 162 | 163 | - (void)testCaseDidStop:(XCTestRun *)testRun { 164 | [self withIndentationEnabled:^{ 165 | 166 | [super testCaseDidStop:testRun]; 167 | 168 | self.nestingLevel --; 169 | [self printTestCaseFooter:testRun]; 170 | 171 | }]; 172 | } 173 | 174 | - (void)testLogWithFormat:(NSString *)format arguments:(va_list)arguments { 175 | NSString * indentation = self.indentation; 176 | 177 | NSMutableString * indentedFormat = [[NSMutableString alloc] initWithString:format]; 178 | [indentedFormat insertString:indentation atIndex:0]; 179 | 180 | NSRange replacementRange = NSMakeRange(0, [indentedFormat length]); 181 | if ([indentedFormat hasSuffix:@"\n"]) { 182 | replacementRange.length -= [@"\n" length]; 183 | } 184 | 185 | [indentedFormat replaceOccurrencesOfString:@"\n" 186 | withString:[@"\n" stringByAppendingString:indentation] 187 | options:0 188 | range:replacementRange]; 189 | 190 | [super testLogWithFormat:indentedFormat 191 | arguments:arguments]; 192 | } 193 | 194 | @end 195 | --------------------------------------------------------------------------------