second_curtain 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.gitignore +20 -0
- data/.travis.yml +7 -0
- data/CHANGELOG +20 -0
- data/Demo/Demo/ASHAppDelegate.h +15 -0
- data/Demo/Demo/ASHAppDelegate.m +18 -0
- data/Demo/Demo/ASHViewController.h +13 -0
- data/Demo/Demo/ASHViewController.m +30 -0
- data/Demo/Demo/Base.lproj/Main.storyboard +30 -0
- data/Demo/Demo/Demo-Info.plist +40 -0
- data/Demo/Demo/Demo-Prefix.pch +16 -0
- data/Demo/Demo/Images.xcassets/AppIcon.appiconset/Contents.json +23 -0
- data/Demo/Demo/Images.xcassets/LaunchImage.launchimage/Contents.json +23 -0
- data/Demo/Demo/en.lproj/InfoPlist.strings +2 -0
- data/Demo/Demo/main.m +18 -0
- data/Demo/Demo.xcodeproj/project.pbxproj +517 -0
- data/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- data/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/Demo.xccheckout +41 -0
- data/Demo/Demo.xcodeproj/project.xcworkspace/xcuserdata/ash.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/Demo/Demo.xcodeproj/xcshareddata/xcschemes/Demo.xcscheme +96 -0
- data/Demo/Demo.xcodeproj/xcuserdata/ash.xcuserdatad/xcschemes/xcschememanagement.plist +27 -0
- data/Demo/Demo.xcodeproj/xcuserdata/orta.xcuserdatad/xcschemes/xcschememanagement.plist +27 -0
- data/Demo/Demo.xcworkspace/contents.xcworkspacedata +1 -0
- data/Demo/Demo.xcworkspace/xcshareddata/Demo.xccheckout +41 -0
- data/Demo/Demo.xcworkspace/xcuserdata/ash.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/Demo/Demo.xcworkspace/xcuserdata/orta.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/Demo/DemoTests/DemoTests-Info.plist +22 -0
- data/Demo/DemoTests/DemoTests.m +52 -0
- data/Demo/DemoTests/ReferenceImages/ASHViewControllerSpec/a_view_controller_with_a_loaded_view_should_have_a_valid_snapshot@2x.png +0 -0
- data/Demo/DemoTests/ReferenceImages/ASHViewControllerSpec/views_should_be_green@2x.png +0 -0
- data/Demo/DemoTests/ReferenceImages/ASHViewControllerSpec/views_should_be_red@2x.png +0 -0
- data/Demo/DemoTests/en.lproj/InfoPlist.strings +2 -0
- data/Demo/Makefile +15 -0
- data/Demo/Podfile +16 -0
- data/Demo/Podfile.lock +21 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPBackwardCompatibility.h +42 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPBlockDefinedMatcher.h +25 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPDefines.h +17 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPDoubleTuple.h +13 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPExpect.h +45 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPFloatTuple.h +13 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatcher.h +20 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatcherHelpers.h +4 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beCloseTo.h +7 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beFalsy.h +3 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beGreaterThan.h +6 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beGreaterThanOrEqualTo.h +6 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beIdenticalTo.h +10 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beInTheRangeOf.h +6 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beInstanceOf.h +7 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beKindOf.h +5 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beLessThan.h +6 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beLessThanOrEqualTo.h +6 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beNil.h +5 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beSubclassOf.h +5 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beSupersetOf.h +4 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beTruthy.h +3 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beginWith.h +5 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+conformTo.h +3 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+contain.h +5 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+endWith.h +3 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+equal.h +5 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+haveCountOf.h +10 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+notify.h +4 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+raise.h +4 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+raiseWithReason.h +3 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+respondTo.h +3 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers.h +24 -0
- data/Demo/Pods/BuildHeaders/Expecta/EXPUnsupportedObject.h +11 -0
- data/Demo/Pods/BuildHeaders/Expecta/Expecta.h +27 -0
- data/Demo/Pods/BuildHeaders/Expecta/ExpectaSupport.h +64 -0
- data/Demo/Pods/BuildHeaders/Expecta/NSObject+Expecta.h +14 -0
- data/Demo/Pods/BuildHeaders/Expecta/NSValue+Expecta.h +8 -0
- data/Demo/Pods/BuildHeaders/Expecta+Snapshots/EXPMatchers+FBSnapshotTest.h +21 -0
- data/Demo/Pods/BuildHeaders/FBSnapshotTestCase/FBSnapshotTestCase.h +87 -0
- data/Demo/Pods/BuildHeaders/FBSnapshotTestCase/FBSnapshotTestController.h +147 -0
- data/Demo/Pods/BuildHeaders/FBSnapshotTestCase/UIImage+Compare.h +37 -0
- data/Demo/Pods/BuildHeaders/FBSnapshotTestCase/UIImage+Diff.h +37 -0
- data/Demo/Pods/BuildHeaders/Specta/SPTExample.h +14 -0
- data/Demo/Pods/BuildHeaders/Specta/SPTExampleGroup.h +40 -0
- data/Demo/Pods/BuildHeaders/Specta/SPTNestedReporter.h +5 -0
- data/Demo/Pods/BuildHeaders/Specta/SPTReporter.h +33 -0
- data/Demo/Pods/BuildHeaders/Specta/SPTSharedExampleGroups.h +17 -0
- data/Demo/Pods/BuildHeaders/Specta/SPTSpec.h +21 -0
- data/Demo/Pods/BuildHeaders/Specta/SPTXCTestCase.h +27 -0
- data/Demo/Pods/BuildHeaders/Specta/SPTXCTestReporter.h +9 -0
- data/Demo/Pods/BuildHeaders/Specta/Specta.h +70 -0
- data/Demo/Pods/BuildHeaders/Specta/SpectaSupport.h +46 -0
- data/Demo/Pods/BuildHeaders/Specta/SpectaTypes.h +3 -0
- data/Demo/Pods/BuildHeaders/Specta/SpectaUtility.h +14 -0
- data/Demo/Pods/BuildHeaders/Specta/XCTestCase+Specta.h +4 -0
- data/Demo/Pods/BuildHeaders/Specta/XCTestLog+Specta.h +7 -0
- data/Demo/Pods/BuildHeaders/Specta/XCTestRun+Specta.h +8 -0
- data/Demo/Pods/Expecta/LICENSE +19 -0
- data/Demo/Pods/Expecta/README.md +308 -0
- data/Demo/Pods/Expecta/src/EXPBackwardCompatibility.h +42 -0
- data/Demo/Pods/Expecta/src/EXPBackwardCompatibility.m +17 -0
- data/Demo/Pods/Expecta/src/EXPBlockDefinedMatcher.h +25 -0
- data/Demo/Pods/Expecta/src/EXPBlockDefinedMatcher.m +60 -0
- data/Demo/Pods/Expecta/src/EXPDefines.h +17 -0
- data/Demo/Pods/Expecta/src/EXPDoubleTuple.h +13 -0
- data/Demo/Pods/Expecta/src/EXPDoubleTuple.m +42 -0
- data/Demo/Pods/Expecta/src/EXPExpect.h +45 -0
- data/Demo/Pods/Expecta/src/EXPExpect.m +214 -0
- data/Demo/Pods/Expecta/src/EXPFloatTuple.h +13 -0
- data/Demo/Pods/Expecta/src/EXPFloatTuple.m +42 -0
- data/Demo/Pods/Expecta/src/EXPMatcher.h +20 -0
- data/Demo/Pods/Expecta/src/EXPUnsupportedObject.h +11 -0
- data/Demo/Pods/Expecta/src/EXPUnsupportedObject.m +20 -0
- data/Demo/Pods/Expecta/src/Expecta.h +27 -0
- data/Demo/Pods/Expecta/src/Expecta.m +15 -0
- data/Demo/Pods/Expecta/src/ExpectaSupport.h +64 -0
- data/Demo/Pods/Expecta/src/ExpectaSupport.m +187 -0
- data/Demo/Pods/Expecta/src/NSObject+Expecta.h +14 -0
- data/Demo/Pods/Expecta/src/NSValue+Expecta.h +8 -0
- data/Demo/Pods/Expecta/src/NSValue+Expecta.m +21 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatcherHelpers.h +4 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatcherHelpers.m +9 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beCloseTo.h +7 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beCloseTo.m +49 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beFalsy.h +3 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beFalsy.m +24 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beGreaterThan.h +6 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beGreaterThan.m +20 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beGreaterThanOrEqualTo.h +6 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beGreaterThanOrEqualTo.m +20 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beIdenticalTo.h +10 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beIdenticalTo.m +24 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beInTheRangeOf.h +6 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beInTheRangeOf.m +30 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beInstanceOf.h +7 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beInstanceOf.m +27 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beKindOf.h +5 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beKindOf.m +27 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beLessThan.h +6 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beLessThan.m +20 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beLessThanOrEqualTo.h +6 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beLessThanOrEqualTo.m +20 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beNil.h +5 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beNil.m +16 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beSubclassOf.h +5 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beSubclassOf.m +27 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beSupersetOf.h +4 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beSupersetOf.m +57 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beTruthy.h +3 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beTruthy.m +24 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beginWith.h +5 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beginWith.m +49 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+conformTo.h +3 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+conformTo.m +33 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+contain.h +5 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+contain.m +38 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+endWith.h +3 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+endWith.m +49 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+equal.h +5 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+equal.m +24 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+haveCountOf.h +10 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+haveCountOf.m +36 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+notify.h +4 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+notify.m +63 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+raise.h +4 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+raise.m +30 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+raiseWithReason.h +3 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+raiseWithReason.m +35 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+respondTo.h +3 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers+respondTo.m +28 -0
- data/Demo/Pods/Expecta/src/matchers/EXPMatchers.h +24 -0
- data/Demo/Pods/Expecta+Snapshots/EXPMatchers+FBSnapshotTest.h +21 -0
- data/Demo/Pods/Expecta+Snapshots/EXPMatchers+FBSnapshotTest.m +308 -0
- data/Demo/Pods/Expecta+Snapshots/LICENSE.md +22 -0
- data/Demo/Pods/Expecta+Snapshots/README.md +85 -0
- data/Demo/Pods/FBSnapshotTestCase/FBSnapshotTestCase.h +87 -0
- data/Demo/Pods/FBSnapshotTestCase/FBSnapshotTestCase.m +82 -0
- data/Demo/Pods/FBSnapshotTestCase/FBSnapshotTestController.h +147 -0
- data/Demo/Pods/FBSnapshotTestCase/FBSnapshotTestController.m +376 -0
- data/Demo/Pods/FBSnapshotTestCase/LICENSE +29 -0
- data/Demo/Pods/FBSnapshotTestCase/README.md +83 -0
- data/Demo/Pods/FBSnapshotTestCase/UIImage+Compare.h +37 -0
- data/Demo/Pods/FBSnapshotTestCase/UIImage+Compare.m +87 -0
- data/Demo/Pods/FBSnapshotTestCase/UIImage+Diff.h +37 -0
- data/Demo/Pods/FBSnapshotTestCase/UIImage+Diff.m +56 -0
- data/Demo/Pods/Headers/Expecta/EXPBackwardCompatibility.h +42 -0
- data/Demo/Pods/Headers/Expecta/EXPBlockDefinedMatcher.h +25 -0
- data/Demo/Pods/Headers/Expecta/EXPDefines.h +17 -0
- data/Demo/Pods/Headers/Expecta/EXPDoubleTuple.h +13 -0
- data/Demo/Pods/Headers/Expecta/EXPExpect.h +45 -0
- data/Demo/Pods/Headers/Expecta/EXPFloatTuple.h +13 -0
- data/Demo/Pods/Headers/Expecta/EXPMatcher.h +20 -0
- data/Demo/Pods/Headers/Expecta/EXPMatcherHelpers.h +4 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+beCloseTo.h +7 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+beFalsy.h +3 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+beGreaterThan.h +6 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+beGreaterThanOrEqualTo.h +6 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+beIdenticalTo.h +10 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+beInTheRangeOf.h +6 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+beInstanceOf.h +7 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+beKindOf.h +5 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+beLessThan.h +6 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+beLessThanOrEqualTo.h +6 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+beNil.h +5 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+beSubclassOf.h +5 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+beSupersetOf.h +4 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+beTruthy.h +3 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+beginWith.h +5 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+conformTo.h +3 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+contain.h +5 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+endWith.h +3 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+equal.h +5 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+haveCountOf.h +10 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+notify.h +4 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+raise.h +4 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+raiseWithReason.h +3 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers+respondTo.h +3 -0
- data/Demo/Pods/Headers/Expecta/EXPMatchers.h +24 -0
- data/Demo/Pods/Headers/Expecta/EXPUnsupportedObject.h +11 -0
- data/Demo/Pods/Headers/Expecta/Expecta.h +27 -0
- data/Demo/Pods/Headers/Expecta/ExpectaSupport.h +64 -0
- data/Demo/Pods/Headers/Expecta/NSObject+Expecta.h +14 -0
- data/Demo/Pods/Headers/Expecta/NSValue+Expecta.h +8 -0
- data/Demo/Pods/Headers/Expecta+Snapshots/EXPMatchers+FBSnapshotTest.h +21 -0
- data/Demo/Pods/Headers/FBSnapshotTestCase/FBSnapshotTestCase.h +87 -0
- data/Demo/Pods/Headers/FBSnapshotTestCase/FBSnapshotTestController.h +147 -0
- data/Demo/Pods/Headers/FBSnapshotTestCase/UIImage+Compare.h +37 -0
- data/Demo/Pods/Headers/FBSnapshotTestCase/UIImage+Diff.h +37 -0
- data/Demo/Pods/Headers/Specta/SPTExample.h +14 -0
- data/Demo/Pods/Headers/Specta/SPTExampleGroup.h +40 -0
- data/Demo/Pods/Headers/Specta/SPTNestedReporter.h +5 -0
- data/Demo/Pods/Headers/Specta/SPTReporter.h +33 -0
- data/Demo/Pods/Headers/Specta/SPTSharedExampleGroups.h +17 -0
- data/Demo/Pods/Headers/Specta/SPTSpec.h +21 -0
- data/Demo/Pods/Headers/Specta/SPTXCTestCase.h +27 -0
- data/Demo/Pods/Headers/Specta/SPTXCTestReporter.h +9 -0
- data/Demo/Pods/Headers/Specta/Specta.h +70 -0
- data/Demo/Pods/Headers/Specta/SpectaSupport.h +46 -0
- data/Demo/Pods/Headers/Specta/SpectaTypes.h +3 -0
- data/Demo/Pods/Headers/Specta/SpectaUtility.h +14 -0
- data/Demo/Pods/Headers/Specta/XCTestCase+Specta.h +4 -0
- data/Demo/Pods/Headers/Specta/XCTestLog+Specta.h +7 -0
- data/Demo/Pods/Headers/Specta/XCTestRun+Specta.h +8 -0
- data/Demo/Pods/Manifest.lock +21 -0
- data/Demo/Pods/Pods-DemoTests-EXPMatchers+FBSnapshotTest-Private.xcconfig +6 -0
- data/Demo/Pods/Pods-DemoTests-EXPMatchers+FBSnapshotTest-dummy.m +5 -0
- data/Demo/Pods/Pods-DemoTests-EXPMatchers+FBSnapshotTest-prefix.pch +5 -0
- data/Demo/Pods/Pods-DemoTests-EXPMatchers+FBSnapshotTest.xcconfig +2 -0
- data/Demo/Pods/Pods-DemoTests-Expecta+Snapshots-Private.xcconfig +6 -0
- data/Demo/Pods/Pods-DemoTests-Expecta+Snapshots-dummy.m +5 -0
- data/Demo/Pods/Pods-DemoTests-Expecta+Snapshots-prefix.pch +5 -0
- data/Demo/Pods/Pods-DemoTests-Expecta+Snapshots.xcconfig +2 -0
- data/Demo/Pods/Pods-DemoTests-Expecta-Private.xcconfig +5 -0
- data/Demo/Pods/Pods-DemoTests-Expecta-dummy.m +5 -0
- data/Demo/Pods/Pods-DemoTests-Expecta-prefix.pch +5 -0
- data/Demo/Pods/Pods-DemoTests-Expecta.xcconfig +1 -0
- data/Demo/Pods/Pods-DemoTests-FBSnapshotTestCase-Private.xcconfig +6 -0
- data/Demo/Pods/Pods-DemoTests-FBSnapshotTestCase-dummy.m +5 -0
- data/Demo/Pods/Pods-DemoTests-FBSnapshotTestCase-prefix.pch +6 -0
- data/Demo/Pods/Pods-DemoTests-FBSnapshotTestCase.xcconfig +2 -0
- data/Demo/Pods/Pods-DemoTests-Specta-Private.xcconfig +6 -0
- data/Demo/Pods/Pods-DemoTests-Specta-dummy.m +5 -0
- data/Demo/Pods/Pods-DemoTests-Specta-prefix.pch +5 -0
- data/Demo/Pods/Pods-DemoTests-Specta.xcconfig +2 -0
- data/Demo/Pods/Pods-DemoTests-acknowledgements.markdown +109 -0
- data/Demo/Pods/Pods-DemoTests-acknowledgements.plist +151 -0
- data/Demo/Pods/Pods-DemoTests-dummy.m +5 -0
- data/Demo/Pods/Pods-DemoTests-environment.h +32 -0
- data/Demo/Pods/Pods-DemoTests-resources.sh +68 -0
- data/Demo/Pods/Pods-DemoTests.xcconfig +6 -0
- data/Demo/Pods/Pods.xcodeproj/project.pbxproj +1390 -0
- data/Demo/Pods/Pods.xcodeproj/xcuserdata/ash.xcuserdatad/xcschemes/Pods-DemoTests-Expecta+Snapshots.xcscheme +59 -0
- data/Demo/Pods/Pods.xcodeproj/xcuserdata/ash.xcuserdatad/xcschemes/Pods-DemoTests-Expecta.xcscheme +59 -0
- data/Demo/Pods/Pods.xcodeproj/xcuserdata/ash.xcuserdatad/xcschemes/Pods-DemoTests-FBSnapshotTestCase.xcscheme +59 -0
- data/Demo/Pods/Pods.xcodeproj/xcuserdata/ash.xcuserdatad/xcschemes/Pods-DemoTests-Specta.xcscheme +59 -0
- data/Demo/Pods/Pods.xcodeproj/xcuserdata/ash.xcuserdatad/xcschemes/Pods-DemoTests.xcscheme +59 -0
- data/Demo/Pods/Pods.xcodeproj/xcuserdata/ash.xcuserdatad/xcschemes/xcschememanagement.plist +62 -0
- data/Demo/Pods/Specta/LICENSE +20 -0
- data/Demo/Pods/Specta/README.md +146 -0
- data/Demo/Pods/Specta/src/SPTExample.h +14 -0
- data/Demo/Pods/Specta/src/SPTExample.m +16 -0
- data/Demo/Pods/Specta/src/SPTExampleGroup.h +40 -0
- data/Demo/Pods/Specta/src/SPTExampleGroup.m +326 -0
- data/Demo/Pods/Specta/src/SPTNestedReporter.h +5 -0
- data/Demo/Pods/Specta/src/SPTNestedReporter.m +194 -0
- data/Demo/Pods/Specta/src/SPTReporter.h +33 -0
- data/Demo/Pods/Specta/src/SPTReporter.m +134 -0
- data/Demo/Pods/Specta/src/SPTSharedExampleGroups.h +17 -0
- data/Demo/Pods/Specta/src/SPTSharedExampleGroups.m +62 -0
- data/Demo/Pods/Specta/src/SPTSpec.h +21 -0
- data/Demo/Pods/Specta/src/SPTSpec.m +31 -0
- data/Demo/Pods/Specta/src/SPTXCTestCase.h +27 -0
- data/Demo/Pods/Specta/src/SPTXCTestCase.m +151 -0
- data/Demo/Pods/Specta/src/SPTXCTestReporter.h +9 -0
- data/Demo/Pods/Specta/src/SPTXCTestReporter.m +11 -0
- data/Demo/Pods/Specta/src/Specta.h +70 -0
- data/Demo/Pods/Specta/src/Specta.m +144 -0
- data/Demo/Pods/Specta/src/SpectaSupport.h +46 -0
- data/Demo/Pods/Specta/src/SpectaTypes.h +3 -0
- data/Demo/Pods/Specta/src/SpectaUtility.h +14 -0
- data/Demo/Pods/Specta/src/SpectaUtility.m +65 -0
- data/Demo/Pods/Specta/src/XCTestCase+Specta.h +4 -0
- data/Demo/Pods/Specta/src/XCTestCase+Specta.m +26 -0
- data/Demo/Pods/Specta/src/XCTestLog+Specta.h +7 -0
- data/Demo/Pods/Specta/src/XCTestLog+Specta.m +49 -0
- data/Demo/Pods/Specta/src/XCTestRun+Specta.h +8 -0
- data/Demo/Pods/Specta/src/XCTestRun+Specta.m +44 -0
- data/Gemfile +5 -0
- data/LICENSE +21 -0
- data/README.md +146 -0
- data/Rakefile +7 -0
- data/second_curtain.gemspec +20 -0
- data/spec/sample_output.txt +79 -0
- data/spec/second_shutter/kaleidoscope_command_spec.rb +25 -0
- data/spec/second_shutter/parser_spec.rb +39 -0
- data/spec/second_shutter/test_suite_spec.rb +32 -0
- data/spec/second_shutter/upload_manager_spec.rb +60 -0
- data/spec/second_shutter/upload_spec.rb +34 -0
- data/spec/second_shutter/xcode_test_case_spec.rb +22 -0
- metadata +315 -1
@@ -0,0 +1,42 @@
|
|
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
|
@@ -0,0 +1,45 @@
|
|
1
|
+
#import <Foundation/Foundation.h>
|
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<EXPMatcher>)matcher;
|
35
|
+
- (void)applyMatcher:(id<EXPMatcher>)matcher to:(NSObject **)actual;
|
36
|
+
|
37
|
+
@end
|
38
|
+
|
39
|
+
@interface EXPDynamicPredicateMatcher : NSObject <EXPMatcher> {
|
40
|
+
EXPExpect *_expectation;
|
41
|
+
SEL _selector;
|
42
|
+
}
|
43
|
+
- (id)initWithExpectation:(EXPExpect *)expectation selector:(SEL)selector;
|
44
|
+
- (void (^)(void))dispatch;
|
45
|
+
@end
|
@@ -0,0 +1,214 @@
|
|
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 <libkern/OSAtomic.h>
|
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<EXPMatcher>)matcher
|
98
|
+
{
|
99
|
+
id actual = [self actual];
|
100
|
+
[self applyMatcher:matcher to:&actual];
|
101
|
+
}
|
102
|
+
|
103
|
+
- (void)applyMatcher:(id<EXPMatcher>)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
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#import <Foundation/Foundation.h>
|
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
|
@@ -0,0 +1,42 @@
|
|
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
|
@@ -0,0 +1,20 @@
|
|
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 <Foundation/Foundation.h>
|
10
|
+
|
11
|
+
@protocol EXPMatcher <NSObject>
|
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
|
@@ -0,0 +1,20 @@
|
|
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
|
@@ -0,0 +1,27 @@
|
|
1
|
+
#import <Foundation/Foundation.h>
|
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
|
@@ -0,0 +1,15 @@
|
|
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
|
@@ -0,0 +1,64 @@
|
|
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
|