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.
Files changed (316) hide show
  1. checksums.yaml +8 -8
  2. data/.gitignore +20 -0
  3. data/.travis.yml +7 -0
  4. data/CHANGELOG +20 -0
  5. data/Demo/Demo/ASHAppDelegate.h +15 -0
  6. data/Demo/Demo/ASHAppDelegate.m +18 -0
  7. data/Demo/Demo/ASHViewController.h +13 -0
  8. data/Demo/Demo/ASHViewController.m +30 -0
  9. data/Demo/Demo/Base.lproj/Main.storyboard +30 -0
  10. data/Demo/Demo/Demo-Info.plist +40 -0
  11. data/Demo/Demo/Demo-Prefix.pch +16 -0
  12. data/Demo/Demo/Images.xcassets/AppIcon.appiconset/Contents.json +23 -0
  13. data/Demo/Demo/Images.xcassets/LaunchImage.launchimage/Contents.json +23 -0
  14. data/Demo/Demo/en.lproj/InfoPlist.strings +2 -0
  15. data/Demo/Demo/main.m +18 -0
  16. data/Demo/Demo.xcodeproj/project.pbxproj +517 -0
  17. data/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  18. data/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/Demo.xccheckout +41 -0
  19. data/Demo/Demo.xcodeproj/project.xcworkspace/xcuserdata/ash.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  20. data/Demo/Demo.xcodeproj/xcshareddata/xcschemes/Demo.xcscheme +96 -0
  21. data/Demo/Demo.xcodeproj/xcuserdata/ash.xcuserdatad/xcschemes/xcschememanagement.plist +27 -0
  22. data/Demo/Demo.xcodeproj/xcuserdata/orta.xcuserdatad/xcschemes/xcschememanagement.plist +27 -0
  23. data/Demo/Demo.xcworkspace/contents.xcworkspacedata +1 -0
  24. data/Demo/Demo.xcworkspace/xcshareddata/Demo.xccheckout +41 -0
  25. data/Demo/Demo.xcworkspace/xcuserdata/ash.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  26. data/Demo/Demo.xcworkspace/xcuserdata/orta.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  27. data/Demo/DemoTests/DemoTests-Info.plist +22 -0
  28. data/Demo/DemoTests/DemoTests.m +52 -0
  29. data/Demo/DemoTests/ReferenceImages/ASHViewControllerSpec/a_view_controller_with_a_loaded_view_should_have_a_valid_snapshot@2x.png +0 -0
  30. data/Demo/DemoTests/ReferenceImages/ASHViewControllerSpec/views_should_be_green@2x.png +0 -0
  31. data/Demo/DemoTests/ReferenceImages/ASHViewControllerSpec/views_should_be_red@2x.png +0 -0
  32. data/Demo/DemoTests/en.lproj/InfoPlist.strings +2 -0
  33. data/Demo/Makefile +15 -0
  34. data/Demo/Podfile +16 -0
  35. data/Demo/Podfile.lock +21 -0
  36. data/Demo/Pods/BuildHeaders/Expecta/EXPBackwardCompatibility.h +42 -0
  37. data/Demo/Pods/BuildHeaders/Expecta/EXPBlockDefinedMatcher.h +25 -0
  38. data/Demo/Pods/BuildHeaders/Expecta/EXPDefines.h +17 -0
  39. data/Demo/Pods/BuildHeaders/Expecta/EXPDoubleTuple.h +13 -0
  40. data/Demo/Pods/BuildHeaders/Expecta/EXPExpect.h +45 -0
  41. data/Demo/Pods/BuildHeaders/Expecta/EXPFloatTuple.h +13 -0
  42. data/Demo/Pods/BuildHeaders/Expecta/EXPMatcher.h +20 -0
  43. data/Demo/Pods/BuildHeaders/Expecta/EXPMatcherHelpers.h +4 -0
  44. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beCloseTo.h +7 -0
  45. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beFalsy.h +3 -0
  46. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beGreaterThan.h +6 -0
  47. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beGreaterThanOrEqualTo.h +6 -0
  48. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beIdenticalTo.h +10 -0
  49. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beInTheRangeOf.h +6 -0
  50. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beInstanceOf.h +7 -0
  51. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beKindOf.h +5 -0
  52. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beLessThan.h +6 -0
  53. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beLessThanOrEqualTo.h +6 -0
  54. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beNil.h +5 -0
  55. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beSubclassOf.h +5 -0
  56. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beSupersetOf.h +4 -0
  57. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beTruthy.h +3 -0
  58. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+beginWith.h +5 -0
  59. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+conformTo.h +3 -0
  60. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+contain.h +5 -0
  61. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+endWith.h +3 -0
  62. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+equal.h +5 -0
  63. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+haveCountOf.h +10 -0
  64. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+notify.h +4 -0
  65. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+raise.h +4 -0
  66. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+raiseWithReason.h +3 -0
  67. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers+respondTo.h +3 -0
  68. data/Demo/Pods/BuildHeaders/Expecta/EXPMatchers.h +24 -0
  69. data/Demo/Pods/BuildHeaders/Expecta/EXPUnsupportedObject.h +11 -0
  70. data/Demo/Pods/BuildHeaders/Expecta/Expecta.h +27 -0
  71. data/Demo/Pods/BuildHeaders/Expecta/ExpectaSupport.h +64 -0
  72. data/Demo/Pods/BuildHeaders/Expecta/NSObject+Expecta.h +14 -0
  73. data/Demo/Pods/BuildHeaders/Expecta/NSValue+Expecta.h +8 -0
  74. data/Demo/Pods/BuildHeaders/Expecta+Snapshots/EXPMatchers+FBSnapshotTest.h +21 -0
  75. data/Demo/Pods/BuildHeaders/FBSnapshotTestCase/FBSnapshotTestCase.h +87 -0
  76. data/Demo/Pods/BuildHeaders/FBSnapshotTestCase/FBSnapshotTestController.h +147 -0
  77. data/Demo/Pods/BuildHeaders/FBSnapshotTestCase/UIImage+Compare.h +37 -0
  78. data/Demo/Pods/BuildHeaders/FBSnapshotTestCase/UIImage+Diff.h +37 -0
  79. data/Demo/Pods/BuildHeaders/Specta/SPTExample.h +14 -0
  80. data/Demo/Pods/BuildHeaders/Specta/SPTExampleGroup.h +40 -0
  81. data/Demo/Pods/BuildHeaders/Specta/SPTNestedReporter.h +5 -0
  82. data/Demo/Pods/BuildHeaders/Specta/SPTReporter.h +33 -0
  83. data/Demo/Pods/BuildHeaders/Specta/SPTSharedExampleGroups.h +17 -0
  84. data/Demo/Pods/BuildHeaders/Specta/SPTSpec.h +21 -0
  85. data/Demo/Pods/BuildHeaders/Specta/SPTXCTestCase.h +27 -0
  86. data/Demo/Pods/BuildHeaders/Specta/SPTXCTestReporter.h +9 -0
  87. data/Demo/Pods/BuildHeaders/Specta/Specta.h +70 -0
  88. data/Demo/Pods/BuildHeaders/Specta/SpectaSupport.h +46 -0
  89. data/Demo/Pods/BuildHeaders/Specta/SpectaTypes.h +3 -0
  90. data/Demo/Pods/BuildHeaders/Specta/SpectaUtility.h +14 -0
  91. data/Demo/Pods/BuildHeaders/Specta/XCTestCase+Specta.h +4 -0
  92. data/Demo/Pods/BuildHeaders/Specta/XCTestLog+Specta.h +7 -0
  93. data/Demo/Pods/BuildHeaders/Specta/XCTestRun+Specta.h +8 -0
  94. data/Demo/Pods/Expecta/LICENSE +19 -0
  95. data/Demo/Pods/Expecta/README.md +308 -0
  96. data/Demo/Pods/Expecta/src/EXPBackwardCompatibility.h +42 -0
  97. data/Demo/Pods/Expecta/src/EXPBackwardCompatibility.m +17 -0
  98. data/Demo/Pods/Expecta/src/EXPBlockDefinedMatcher.h +25 -0
  99. data/Demo/Pods/Expecta/src/EXPBlockDefinedMatcher.m +60 -0
  100. data/Demo/Pods/Expecta/src/EXPDefines.h +17 -0
  101. data/Demo/Pods/Expecta/src/EXPDoubleTuple.h +13 -0
  102. data/Demo/Pods/Expecta/src/EXPDoubleTuple.m +42 -0
  103. data/Demo/Pods/Expecta/src/EXPExpect.h +45 -0
  104. data/Demo/Pods/Expecta/src/EXPExpect.m +214 -0
  105. data/Demo/Pods/Expecta/src/EXPFloatTuple.h +13 -0
  106. data/Demo/Pods/Expecta/src/EXPFloatTuple.m +42 -0
  107. data/Demo/Pods/Expecta/src/EXPMatcher.h +20 -0
  108. data/Demo/Pods/Expecta/src/EXPUnsupportedObject.h +11 -0
  109. data/Demo/Pods/Expecta/src/EXPUnsupportedObject.m +20 -0
  110. data/Demo/Pods/Expecta/src/Expecta.h +27 -0
  111. data/Demo/Pods/Expecta/src/Expecta.m +15 -0
  112. data/Demo/Pods/Expecta/src/ExpectaSupport.h +64 -0
  113. data/Demo/Pods/Expecta/src/ExpectaSupport.m +187 -0
  114. data/Demo/Pods/Expecta/src/NSObject+Expecta.h +14 -0
  115. data/Demo/Pods/Expecta/src/NSValue+Expecta.h +8 -0
  116. data/Demo/Pods/Expecta/src/NSValue+Expecta.m +21 -0
  117. data/Demo/Pods/Expecta/src/matchers/EXPMatcherHelpers.h +4 -0
  118. data/Demo/Pods/Expecta/src/matchers/EXPMatcherHelpers.m +9 -0
  119. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beCloseTo.h +7 -0
  120. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beCloseTo.m +49 -0
  121. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beFalsy.h +3 -0
  122. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beFalsy.m +24 -0
  123. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beGreaterThan.h +6 -0
  124. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beGreaterThan.m +20 -0
  125. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beGreaterThanOrEqualTo.h +6 -0
  126. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beGreaterThanOrEqualTo.m +20 -0
  127. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beIdenticalTo.h +10 -0
  128. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beIdenticalTo.m +24 -0
  129. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beInTheRangeOf.h +6 -0
  130. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beInTheRangeOf.m +30 -0
  131. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beInstanceOf.h +7 -0
  132. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beInstanceOf.m +27 -0
  133. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beKindOf.h +5 -0
  134. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beKindOf.m +27 -0
  135. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beLessThan.h +6 -0
  136. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beLessThan.m +20 -0
  137. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beLessThanOrEqualTo.h +6 -0
  138. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beLessThanOrEqualTo.m +20 -0
  139. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beNil.h +5 -0
  140. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beNil.m +16 -0
  141. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beSubclassOf.h +5 -0
  142. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beSubclassOf.m +27 -0
  143. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beSupersetOf.h +4 -0
  144. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beSupersetOf.m +57 -0
  145. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beTruthy.h +3 -0
  146. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beTruthy.m +24 -0
  147. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beginWith.h +5 -0
  148. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+beginWith.m +49 -0
  149. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+conformTo.h +3 -0
  150. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+conformTo.m +33 -0
  151. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+contain.h +5 -0
  152. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+contain.m +38 -0
  153. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+endWith.h +3 -0
  154. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+endWith.m +49 -0
  155. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+equal.h +5 -0
  156. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+equal.m +24 -0
  157. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+haveCountOf.h +10 -0
  158. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+haveCountOf.m +36 -0
  159. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+notify.h +4 -0
  160. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+notify.m +63 -0
  161. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+raise.h +4 -0
  162. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+raise.m +30 -0
  163. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+raiseWithReason.h +3 -0
  164. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+raiseWithReason.m +35 -0
  165. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+respondTo.h +3 -0
  166. data/Demo/Pods/Expecta/src/matchers/EXPMatchers+respondTo.m +28 -0
  167. data/Demo/Pods/Expecta/src/matchers/EXPMatchers.h +24 -0
  168. data/Demo/Pods/Expecta+Snapshots/EXPMatchers+FBSnapshotTest.h +21 -0
  169. data/Demo/Pods/Expecta+Snapshots/EXPMatchers+FBSnapshotTest.m +308 -0
  170. data/Demo/Pods/Expecta+Snapshots/LICENSE.md +22 -0
  171. data/Demo/Pods/Expecta+Snapshots/README.md +85 -0
  172. data/Demo/Pods/FBSnapshotTestCase/FBSnapshotTestCase.h +87 -0
  173. data/Demo/Pods/FBSnapshotTestCase/FBSnapshotTestCase.m +82 -0
  174. data/Demo/Pods/FBSnapshotTestCase/FBSnapshotTestController.h +147 -0
  175. data/Demo/Pods/FBSnapshotTestCase/FBSnapshotTestController.m +376 -0
  176. data/Demo/Pods/FBSnapshotTestCase/LICENSE +29 -0
  177. data/Demo/Pods/FBSnapshotTestCase/README.md +83 -0
  178. data/Demo/Pods/FBSnapshotTestCase/UIImage+Compare.h +37 -0
  179. data/Demo/Pods/FBSnapshotTestCase/UIImage+Compare.m +87 -0
  180. data/Demo/Pods/FBSnapshotTestCase/UIImage+Diff.h +37 -0
  181. data/Demo/Pods/FBSnapshotTestCase/UIImage+Diff.m +56 -0
  182. data/Demo/Pods/Headers/Expecta/EXPBackwardCompatibility.h +42 -0
  183. data/Demo/Pods/Headers/Expecta/EXPBlockDefinedMatcher.h +25 -0
  184. data/Demo/Pods/Headers/Expecta/EXPDefines.h +17 -0
  185. data/Demo/Pods/Headers/Expecta/EXPDoubleTuple.h +13 -0
  186. data/Demo/Pods/Headers/Expecta/EXPExpect.h +45 -0
  187. data/Demo/Pods/Headers/Expecta/EXPFloatTuple.h +13 -0
  188. data/Demo/Pods/Headers/Expecta/EXPMatcher.h +20 -0
  189. data/Demo/Pods/Headers/Expecta/EXPMatcherHelpers.h +4 -0
  190. data/Demo/Pods/Headers/Expecta/EXPMatchers+beCloseTo.h +7 -0
  191. data/Demo/Pods/Headers/Expecta/EXPMatchers+beFalsy.h +3 -0
  192. data/Demo/Pods/Headers/Expecta/EXPMatchers+beGreaterThan.h +6 -0
  193. data/Demo/Pods/Headers/Expecta/EXPMatchers+beGreaterThanOrEqualTo.h +6 -0
  194. data/Demo/Pods/Headers/Expecta/EXPMatchers+beIdenticalTo.h +10 -0
  195. data/Demo/Pods/Headers/Expecta/EXPMatchers+beInTheRangeOf.h +6 -0
  196. data/Demo/Pods/Headers/Expecta/EXPMatchers+beInstanceOf.h +7 -0
  197. data/Demo/Pods/Headers/Expecta/EXPMatchers+beKindOf.h +5 -0
  198. data/Demo/Pods/Headers/Expecta/EXPMatchers+beLessThan.h +6 -0
  199. data/Demo/Pods/Headers/Expecta/EXPMatchers+beLessThanOrEqualTo.h +6 -0
  200. data/Demo/Pods/Headers/Expecta/EXPMatchers+beNil.h +5 -0
  201. data/Demo/Pods/Headers/Expecta/EXPMatchers+beSubclassOf.h +5 -0
  202. data/Demo/Pods/Headers/Expecta/EXPMatchers+beSupersetOf.h +4 -0
  203. data/Demo/Pods/Headers/Expecta/EXPMatchers+beTruthy.h +3 -0
  204. data/Demo/Pods/Headers/Expecta/EXPMatchers+beginWith.h +5 -0
  205. data/Demo/Pods/Headers/Expecta/EXPMatchers+conformTo.h +3 -0
  206. data/Demo/Pods/Headers/Expecta/EXPMatchers+contain.h +5 -0
  207. data/Demo/Pods/Headers/Expecta/EXPMatchers+endWith.h +3 -0
  208. data/Demo/Pods/Headers/Expecta/EXPMatchers+equal.h +5 -0
  209. data/Demo/Pods/Headers/Expecta/EXPMatchers+haveCountOf.h +10 -0
  210. data/Demo/Pods/Headers/Expecta/EXPMatchers+notify.h +4 -0
  211. data/Demo/Pods/Headers/Expecta/EXPMatchers+raise.h +4 -0
  212. data/Demo/Pods/Headers/Expecta/EXPMatchers+raiseWithReason.h +3 -0
  213. data/Demo/Pods/Headers/Expecta/EXPMatchers+respondTo.h +3 -0
  214. data/Demo/Pods/Headers/Expecta/EXPMatchers.h +24 -0
  215. data/Demo/Pods/Headers/Expecta/EXPUnsupportedObject.h +11 -0
  216. data/Demo/Pods/Headers/Expecta/Expecta.h +27 -0
  217. data/Demo/Pods/Headers/Expecta/ExpectaSupport.h +64 -0
  218. data/Demo/Pods/Headers/Expecta/NSObject+Expecta.h +14 -0
  219. data/Demo/Pods/Headers/Expecta/NSValue+Expecta.h +8 -0
  220. data/Demo/Pods/Headers/Expecta+Snapshots/EXPMatchers+FBSnapshotTest.h +21 -0
  221. data/Demo/Pods/Headers/FBSnapshotTestCase/FBSnapshotTestCase.h +87 -0
  222. data/Demo/Pods/Headers/FBSnapshotTestCase/FBSnapshotTestController.h +147 -0
  223. data/Demo/Pods/Headers/FBSnapshotTestCase/UIImage+Compare.h +37 -0
  224. data/Demo/Pods/Headers/FBSnapshotTestCase/UIImage+Diff.h +37 -0
  225. data/Demo/Pods/Headers/Specta/SPTExample.h +14 -0
  226. data/Demo/Pods/Headers/Specta/SPTExampleGroup.h +40 -0
  227. data/Demo/Pods/Headers/Specta/SPTNestedReporter.h +5 -0
  228. data/Demo/Pods/Headers/Specta/SPTReporter.h +33 -0
  229. data/Demo/Pods/Headers/Specta/SPTSharedExampleGroups.h +17 -0
  230. data/Demo/Pods/Headers/Specta/SPTSpec.h +21 -0
  231. data/Demo/Pods/Headers/Specta/SPTXCTestCase.h +27 -0
  232. data/Demo/Pods/Headers/Specta/SPTXCTestReporter.h +9 -0
  233. data/Demo/Pods/Headers/Specta/Specta.h +70 -0
  234. data/Demo/Pods/Headers/Specta/SpectaSupport.h +46 -0
  235. data/Demo/Pods/Headers/Specta/SpectaTypes.h +3 -0
  236. data/Demo/Pods/Headers/Specta/SpectaUtility.h +14 -0
  237. data/Demo/Pods/Headers/Specta/XCTestCase+Specta.h +4 -0
  238. data/Demo/Pods/Headers/Specta/XCTestLog+Specta.h +7 -0
  239. data/Demo/Pods/Headers/Specta/XCTestRun+Specta.h +8 -0
  240. data/Demo/Pods/Manifest.lock +21 -0
  241. data/Demo/Pods/Pods-DemoTests-EXPMatchers+FBSnapshotTest-Private.xcconfig +6 -0
  242. data/Demo/Pods/Pods-DemoTests-EXPMatchers+FBSnapshotTest-dummy.m +5 -0
  243. data/Demo/Pods/Pods-DemoTests-EXPMatchers+FBSnapshotTest-prefix.pch +5 -0
  244. data/Demo/Pods/Pods-DemoTests-EXPMatchers+FBSnapshotTest.xcconfig +2 -0
  245. data/Demo/Pods/Pods-DemoTests-Expecta+Snapshots-Private.xcconfig +6 -0
  246. data/Demo/Pods/Pods-DemoTests-Expecta+Snapshots-dummy.m +5 -0
  247. data/Demo/Pods/Pods-DemoTests-Expecta+Snapshots-prefix.pch +5 -0
  248. data/Demo/Pods/Pods-DemoTests-Expecta+Snapshots.xcconfig +2 -0
  249. data/Demo/Pods/Pods-DemoTests-Expecta-Private.xcconfig +5 -0
  250. data/Demo/Pods/Pods-DemoTests-Expecta-dummy.m +5 -0
  251. data/Demo/Pods/Pods-DemoTests-Expecta-prefix.pch +5 -0
  252. data/Demo/Pods/Pods-DemoTests-Expecta.xcconfig +1 -0
  253. data/Demo/Pods/Pods-DemoTests-FBSnapshotTestCase-Private.xcconfig +6 -0
  254. data/Demo/Pods/Pods-DemoTests-FBSnapshotTestCase-dummy.m +5 -0
  255. data/Demo/Pods/Pods-DemoTests-FBSnapshotTestCase-prefix.pch +6 -0
  256. data/Demo/Pods/Pods-DemoTests-FBSnapshotTestCase.xcconfig +2 -0
  257. data/Demo/Pods/Pods-DemoTests-Specta-Private.xcconfig +6 -0
  258. data/Demo/Pods/Pods-DemoTests-Specta-dummy.m +5 -0
  259. data/Demo/Pods/Pods-DemoTests-Specta-prefix.pch +5 -0
  260. data/Demo/Pods/Pods-DemoTests-Specta.xcconfig +2 -0
  261. data/Demo/Pods/Pods-DemoTests-acknowledgements.markdown +109 -0
  262. data/Demo/Pods/Pods-DemoTests-acknowledgements.plist +151 -0
  263. data/Demo/Pods/Pods-DemoTests-dummy.m +5 -0
  264. data/Demo/Pods/Pods-DemoTests-environment.h +32 -0
  265. data/Demo/Pods/Pods-DemoTests-resources.sh +68 -0
  266. data/Demo/Pods/Pods-DemoTests.xcconfig +6 -0
  267. data/Demo/Pods/Pods.xcodeproj/project.pbxproj +1390 -0
  268. data/Demo/Pods/Pods.xcodeproj/xcuserdata/ash.xcuserdatad/xcschemes/Pods-DemoTests-Expecta+Snapshots.xcscheme +59 -0
  269. data/Demo/Pods/Pods.xcodeproj/xcuserdata/ash.xcuserdatad/xcschemes/Pods-DemoTests-Expecta.xcscheme +59 -0
  270. data/Demo/Pods/Pods.xcodeproj/xcuserdata/ash.xcuserdatad/xcschemes/Pods-DemoTests-FBSnapshotTestCase.xcscheme +59 -0
  271. data/Demo/Pods/Pods.xcodeproj/xcuserdata/ash.xcuserdatad/xcschemes/Pods-DemoTests-Specta.xcscheme +59 -0
  272. data/Demo/Pods/Pods.xcodeproj/xcuserdata/ash.xcuserdatad/xcschemes/Pods-DemoTests.xcscheme +59 -0
  273. data/Demo/Pods/Pods.xcodeproj/xcuserdata/ash.xcuserdatad/xcschemes/xcschememanagement.plist +62 -0
  274. data/Demo/Pods/Specta/LICENSE +20 -0
  275. data/Demo/Pods/Specta/README.md +146 -0
  276. data/Demo/Pods/Specta/src/SPTExample.h +14 -0
  277. data/Demo/Pods/Specta/src/SPTExample.m +16 -0
  278. data/Demo/Pods/Specta/src/SPTExampleGroup.h +40 -0
  279. data/Demo/Pods/Specta/src/SPTExampleGroup.m +326 -0
  280. data/Demo/Pods/Specta/src/SPTNestedReporter.h +5 -0
  281. data/Demo/Pods/Specta/src/SPTNestedReporter.m +194 -0
  282. data/Demo/Pods/Specta/src/SPTReporter.h +33 -0
  283. data/Demo/Pods/Specta/src/SPTReporter.m +134 -0
  284. data/Demo/Pods/Specta/src/SPTSharedExampleGroups.h +17 -0
  285. data/Demo/Pods/Specta/src/SPTSharedExampleGroups.m +62 -0
  286. data/Demo/Pods/Specta/src/SPTSpec.h +21 -0
  287. data/Demo/Pods/Specta/src/SPTSpec.m +31 -0
  288. data/Demo/Pods/Specta/src/SPTXCTestCase.h +27 -0
  289. data/Demo/Pods/Specta/src/SPTXCTestCase.m +151 -0
  290. data/Demo/Pods/Specta/src/SPTXCTestReporter.h +9 -0
  291. data/Demo/Pods/Specta/src/SPTXCTestReporter.m +11 -0
  292. data/Demo/Pods/Specta/src/Specta.h +70 -0
  293. data/Demo/Pods/Specta/src/Specta.m +144 -0
  294. data/Demo/Pods/Specta/src/SpectaSupport.h +46 -0
  295. data/Demo/Pods/Specta/src/SpectaTypes.h +3 -0
  296. data/Demo/Pods/Specta/src/SpectaUtility.h +14 -0
  297. data/Demo/Pods/Specta/src/SpectaUtility.m +65 -0
  298. data/Demo/Pods/Specta/src/XCTestCase+Specta.h +4 -0
  299. data/Demo/Pods/Specta/src/XCTestCase+Specta.m +26 -0
  300. data/Demo/Pods/Specta/src/XCTestLog+Specta.h +7 -0
  301. data/Demo/Pods/Specta/src/XCTestLog+Specta.m +49 -0
  302. data/Demo/Pods/Specta/src/XCTestRun+Specta.h +8 -0
  303. data/Demo/Pods/Specta/src/XCTestRun+Specta.m +44 -0
  304. data/Gemfile +5 -0
  305. data/LICENSE +21 -0
  306. data/README.md +146 -0
  307. data/Rakefile +7 -0
  308. data/second_curtain.gemspec +20 -0
  309. data/spec/sample_output.txt +79 -0
  310. data/spec/second_shutter/kaleidoscope_command_spec.rb +25 -0
  311. data/spec/second_shutter/parser_spec.rb +39 -0
  312. data/spec/second_shutter/test_suite_spec.rb +32 -0
  313. data/spec/second_shutter/upload_manager_spec.rb +60 -0
  314. data/spec/second_shutter/upload_spec.rb +34 -0
  315. data/spec/second_shutter/xcode_test_case_spec.rb +22 -0
  316. metadata +315 -1
@@ -0,0 +1,70 @@
1
+ #import <Foundation/Foundation.h>
2
+ #import <XCTest/XCTest.h>
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))
@@ -0,0 +1,46 @@
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
+ })
@@ -0,0 +1,3 @@
1
+ typedef void (^SPTVoidBlock)();
2
+ typedef void (^SPTAsyncBlock)(void (^)());
3
+ typedef void (^SPTDictionaryBlock)(NSDictionary *dictionary);
@@ -0,0 +1,14 @@
1
+ #import <Foundation/Foundation.h>
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);
@@ -0,0 +1,4 @@
1
+ #import <XCTest/XCTest.h>
2
+
3
+ @interface XCTestCase (Specta)
4
+ @end
@@ -0,0 +1,7 @@
1
+ #import <XCTest/XCTest.h>
2
+
3
+ @interface XCTestLog (Specta)
4
+
5
+ - (void)spt_pauseObservationInBlock:(void (^)(void))block;
6
+
7
+ @end
@@ -0,0 +1,8 @@
1
+ #import <XCTest/XCTest.h>
2
+
3
+ @interface XCTestRun (Specta)
4
+
5
+ - (NSUInteger)spt_pendingTestCaseCount;
6
+ - (NSUInteger)spt_skippedTestCaseCount;
7
+
8
+ @end
@@ -0,0 +1,19 @@
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.
@@ -0,0 +1,308 @@
1
+ #Expecta
2
+
3
+ [![Build Status](http://img.shields.io/travis/specta/expecta/master.svg?style=flat)](https://travis-ci.org/specta/expecta)
4
+ [![Pod Version](http://img.shields.io/cocoapods/v/Expecta.svg?style=flat)](http://cocoadocs.org/docsets/Expecta/)
5
+ [![Pod Platform](http://img.shields.io/cocoapods/p/Expecta.svg?style=flat)](http://cocoadocs.org/docsets/Expecta/)
6
+ [![Pod License](http://img.shields.io/cocoapods/l/Expecta.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0.html)
7
+
8
+ A Matcher Framework for Objective-C/Cocoa
9
+
10
+ ## NOTICE
11
+
12
+ Expecta 0.3.x removes support for Garbage Collected targets, as support for these has been removed from Xcode 5.1 and greater. If you need Garbage Collection support, please continue to use Expecta 0.2.4. The minimum deployment targets have also been raised to iOS 5.x and OS X 10.7 or greater.
13
+
14
+ Expecta 0.2.x and later has a new syntax that is slightly different from Expecta 0.1.x. For example `expect(x).toEqual(y)` should now be written as `expect(x).to.equal(y)`. You can do `#define EXP_OLD_SYNTAX` before importing `Expecta.h` to enable backward-compatiblity mode, but keep in mind that the old syntax is deprecated.
15
+
16
+ ## INTRODUCTION
17
+
18
+ The main advantage of using Expecta over other matcher frameworks is that you do not have to specify the data types. Also, the syntax of Expecta matchers is much more readable and does not suffer from parenthesitis.
19
+
20
+ **OCHamcrest**
21
+
22
+ ```objective-c
23
+ assertThat(@"foo", is(equalTo(@"foo")));
24
+ assertThatUnsignedInteger(foo, isNot(equalToUnsignedInteger(1)));
25
+ assertThatBool([bar isBar], is(equalToBool(YES)));
26
+ assertThatDouble(baz, is(equalToDouble(3.14159)));
27
+ ```
28
+
29
+ vs. **Expecta**
30
+
31
+ ```objective-c
32
+ expect(@"foo").to.equal(@"foo"); // `to` is a syntatic sugar and can be safely omitted.
33
+ expect(foo).notTo.equal(1);
34
+ expect([bar isBar]).to.equal(YES);
35
+ expect(baz).to.equal(3.14159);
36
+ ```
37
+
38
+ ## SETUP
39
+
40
+ Use [CocoaPods](https://github.com/CocoaPods/CocoaPods)
41
+
42
+ ```ruby
43
+ target :MyApp do
44
+ #your app dependencies
45
+ end
46
+
47
+ target :MyAppTests do
48
+ pod 'Expecta', '~> 0.2.4' # expecta matchers
49
+ #pod 'Specta', '~> 0.1.11' #specta bdd framework
50
+ end
51
+ ```
52
+
53
+ or
54
+
55
+ 1. Clone from Github.
56
+ 2. Run `rake` in project root to build.
57
+ 3. Copy and add all header files in `products` folder to the Spec/Test target in your Xcode project.
58
+ 4. For **OS X projects**, copy and add `libExpecta-macosx.a` in `products` folder to the Spec/Test target in your Xcode project.
59
+ For **iOS projects**, copy and add `libExpecta-ios-universal.a` in `products` folder to the Spec/Test target in your Xcode project.
60
+ 5. Add `-ObjC` to the "Other Linker Flags" build setting for the Spec/Test target in your Xcode project.
61
+ 6. Add the following to your test code.
62
+
63
+ ```objective-c
64
+ // #define EXP_OLD_SYNTAX // enable backward-compatibility
65
+ #define EXP_SHORTHAND
66
+ #import "Expecta.h"
67
+ ```
68
+
69
+ If `EXP_SHORTHAND` is not defined, expectations must be written with `EXP_expect` instead of `expect`.
70
+
71
+ Expecta is framework-agnostic. It works well with XCTest, OCUnit (SenTestingKit) and OCUnit-compatible test frameworks such as [Specta](http://github.com/petejkim/specta/), [GHUnit](http://github.com/gabriel/gh-unit/) and [GTMUnit](http://code.google.com/p/google-toolbox-for-mac/). Expecta also supports [Cedar](http://pivotal.github.com/cedar/).
72
+
73
+ ## BUILT-IN MATCHERS
74
+
75
+ >`expect(x).to.equal(y);` compares objects or primitives x and y and passes if they are identical (==) or equivalent (isEqual:).
76
+ >
77
+ >`expect(x).to.beIdenticalTo(y);` compares objects x and y and passes if they are identical and have the same memory address.
78
+ >
79
+ >`expect(x).to.beNil();` passes if x is nil.
80
+ >
81
+ >`expect(x).to.beTruthy();` passes if x evaluates to true (non-zero).
82
+ >
83
+ >`expect(x).to.beFalsy();` passes if x evaluates to false (zero).
84
+ >
85
+ >`expect(x).to.contain(y);` passes if an instance of NSArray or NSString x contains y.
86
+ >
87
+ >`expect(x).to.beSupersetOf(y);` passes if an instance of NSArray, NSSet, NSDictionary or NSOrderedSet x contains all elements of y.
88
+ >
89
+ >`expect(x).to.haveCountOf(y);` passes if an instance of NSArray, NSSet, NSDictionary or NSString x has a count or length of y.
90
+ >
91
+ >`expect(x).to.beEmpty();` passes if an instance of NSArray, NSSet, NSDictionary or NSString x has a count or length of 0.
92
+ >
93
+ >`expect(x).to.beInstanceOf([Foo class]);` passes if x is an instance of a class Foo.
94
+ >
95
+ >`expect(x).to.beKindOf([Foo class]);` passes if x is an instance of a class Foo or if x is an instance of any class that inherits from the class Foo.
96
+ >
97
+ >`expect([Foo class]).to.beSubclassOf([Bar class]);` passes if the class Foo is a subclass of the class Bar or if it is identical to the class Bar. Use beKindOf() for class clusters.
98
+ >
99
+ >`expect(x).to.beLessThan(y);` passes if `x` is less than `y`.
100
+ >
101
+ >`expect(x).to.beLessThanOrEqualTo(y);` passes if `x` is less than or equal to `y`.
102
+ >
103
+ >`expect(x).to.beGreaterThan(y);` passes if `x` is greater than `y`.
104
+ >
105
+ >`expect(x).to.beGreaterThanOrEqualTo(y);` passes if `x` is greater than or equal to `y`.
106
+ >
107
+ >`expect(x).to.beInTheRangeOf(y,z);` passes if `x` is in the range of `y` and `z`.
108
+ >
109
+ >`expect(x).to.beCloseTo(y);` passes if `x` is close to `y`.
110
+ >
111
+ >`expect(x).to.beCloseToWithin(y, z);` passes if `x` is close to `y` within `z`.
112
+ >
113
+ >`expect(^{ /* code */ }).to.raise(@"ExceptionName");` passes if a given block of code raises an exception named `ExceptionName`.
114
+ >
115
+ >`expect(^{ /* code */ }).to.raiseAny();` passes if a given block of code raises any exception.
116
+ >
117
+ >`expect(x).to.conformTo(y);` passes if `x` conforms to the protocol `y`.
118
+ >
119
+ >`expect(x).to.respondTo(y);` passes if `x` responds to the selector `y`.
120
+ >
121
+ >`expect(^{ /* code */ }).to.notify(@"NotificationName");` passes if a given block of code generates an NSNotification named `NotificationName`.
122
+ >
123
+ >`expect(^{ /* code */ }).to.notify(notification);` passes if a given block of code generates an NSNotification equal to the passed `notification`.
124
+ >
125
+ >`expect(x).to.beginWith(y);` passes if an instance of NSString, NSArray, or NSOrderedSet `x` begins with `y`. Also aliased by `startWith`
126
+ >
127
+ >`expect(x).to.endWith(y);` passes if an instance of NSString, NSArray, or NSOrderedSet `x` ends with `y`.
128
+
129
+ **Please contribute more matchers.**
130
+
131
+ ## INVERTING MATCHERS
132
+
133
+ Every matcher's criteria can be inverted by prepending `.notTo` or `.toNot`:
134
+
135
+ >`expect(x).notTo.equal(y);` compares objects or primitives x and y and passes if they are *not* equivalent.
136
+
137
+ ## ASYNCHRONOUS TESTING
138
+
139
+ Every matcher can be made to perform asynchronous testing by prepending `.will`, `.willNot` or `after(...)`:
140
+
141
+ >`expect(x).will.beNil();` passes if x becomes nil before the default timeout.
142
+ >
143
+ >`expect(x).willNot.beNil();` passes if x becomes non-nil before the default timeout.
144
+ >
145
+ >`expect(x).after(3).to.beNil();` passes if x becoms nil after 3.0 seconds.
146
+ >
147
+ >`expect(x).after(2.5).notTo.equal(42);` passes if x doesn't equal 42 after 2.5 seconds.
148
+
149
+ Default timeout is 1.0 second and it's used for all matchers if not specified otherwise. This setting can be changed by calling `[Expecta setAsynchronousTestTimeout:x]`, where x is the desired timeout.
150
+
151
+ ```objective-c
152
+ describe(@"Foo", ^{
153
+ beforeAll(^{
154
+ // All asynchronous matching using `will` and `willNot`
155
+ // will have a timeout of 2.0 seconds
156
+ [Expecta setAsynchronousTestTimeout:2];
157
+ });
158
+
159
+ it(@"will not be nil", ^{
160
+ // Test case where default timeout is used
161
+ expect(foo).willNot.beNil();
162
+ });
163
+
164
+ it(@"should equal 42 after 3 seconds", ^{
165
+ // Signle case where timeout differs from the default
166
+ expect(foo).after(3).to.equal(42);
167
+ });
168
+ });
169
+ ```
170
+
171
+ ## WRITING NEW MATCHERS
172
+
173
+ Writing a new matcher is easy with special macros provided by Expecta. Take a look at how `.beKindOf()` matcher is defined:
174
+
175
+ `EXPMatchers+beKindOf.h`
176
+
177
+ ```objective-c
178
+ #import "Expecta.h"
179
+
180
+ EXPMatcherInterface(beKindOf, (Class expected));
181
+ // 1st argument is the name of the matcher function
182
+ // 2nd argument is the list of arguments that may be passed in the function
183
+ // call.
184
+ // Multiple arguments are fine. (e.g. (int foo, float bar))
185
+
186
+ #define beAKindOf beKindOf
187
+ ```
188
+
189
+ `EXPMatchers+beKindOf.m`
190
+
191
+ ```objective-c
192
+ #import "EXPMatchers+beKindOf.h"
193
+
194
+ EXPMatcherImplementationBegin(beKindOf, (Class expected)) {
195
+ BOOL actualIsNil = (actual == nil);
196
+ BOOL expectedIsNil = (expected == nil);
197
+
198
+ prerequisite(^BOOL {
199
+ return !(actualIsNil || expectedIsNil);
200
+ // Return `NO` if matcher should fail whether or not the result is inverted
201
+ // using `.Not`.
202
+ });
203
+
204
+ match(^BOOL {
205
+ return [actual isKindOfClass:expected];
206
+ // Return `YES` if the matcher should pass, `NO` if it should not.
207
+ // The actual value/object is passed as `actual`.
208
+ // Please note that primitive values will be wrapped in NSNumber/NSValue.
209
+ });
210
+
211
+ failureMessageForTo(^NSString * {
212
+ if (actualIsNil)
213
+ return @"the actual value is nil/null";
214
+ if (expectedIsNil)
215
+ return @"the expected value is nil/null";
216
+ return [NSString
217
+ stringWithFormat:@"expected: a kind of %@, "
218
+ "got: an instance of %@, which is not a kind of %@",
219
+ [expected class], [actual class], [expected class]];
220
+ // Return the message to be displayed when the match function returns `YES`.
221
+ });
222
+
223
+ failureMessageForNotTo(^NSString * {
224
+ if (actualIsNil)
225
+ return @"the actual value is nil/null";
226
+ if (expectedIsNil)
227
+ return @"the expected value is nil/null";
228
+ return [NSString
229
+ stringWithFormat:@"expected: not a kind of %@, "
230
+ "got: an instance of %@, which is a kind of %@",
231
+ [expected class], [actual class], [expected class]];
232
+ // Return the message to be displayed when the match function returns `NO`.
233
+ });
234
+ }
235
+ EXPMatcherImplementationEnd
236
+ ```
237
+
238
+ ## DYNAMIC PREDICATE MATCHERS
239
+
240
+ It is possible to add predicate matchers by simply defining the matcher interface, with the matcher implementation being handled at runtime by delegating to the predicate method on your object.
241
+
242
+ For instance, if you have the following class:
243
+
244
+ ```objc
245
+ @interface LightSwitch : NSObject
246
+ @property (nonatomic, assign, getter=isTurnedOn) BOOL turnedOn;
247
+ @end
248
+
249
+ @implementation LightSwitch
250
+ @synthesize turnedOn;
251
+ @end
252
+ ```
253
+
254
+ The normal way to write an assertion that the switch is turned on would be:
255
+
256
+ ```objc
257
+ expect([lightSwitch isTurnedOn]).to.beTruthy();
258
+ ```
259
+
260
+ However, if we define a custom predicate matcher:
261
+
262
+ ```objc
263
+ EXPMatcherInterface(isTurnedOn, (void));
264
+ ```
265
+
266
+ (Note: we haven't defined the matcher implementation, just it's interface)
267
+
268
+ You can now write your assertion as follows:
269
+
270
+ ```objc
271
+ expect(lightSwitch).isTurnedOn();
272
+ ```
273
+
274
+ ## CONTRIBUTION
275
+
276
+ You can find the public Tracker project [here](https://www.pivotaltracker.com/projects/323267).
277
+
278
+ ### CONTRIBUTION GUIDELINES
279
+
280
+ * Please use only spaces and indent 2 spaces at a time.
281
+ * Please prefix instance variable names with a single underscore (`_`).
282
+ * Please prefix custom classes and functions defined in the global scope with `EXP`.
283
+
284
+ ## CREDITS
285
+
286
+ Expecta is brought to you by [Peter Jihoon Kim](http://github.com/petejkim) and the [Specta team](https://github.com/specta?tab=members).
287
+
288
+ ### CONTRIBUTORS
289
+
290
+ * [Alan Rogers](https://github.com/alanjrogers)
291
+ * [Andrew Kitchen](https://github.com/akitchen)
292
+ * [Blake Watters](https://github.com/blakewatters)
293
+ * [Christopher Pickslay](https://github.com/twobitlabs)
294
+ * [Chris Devereux](https://github.com/chrisdevereux)
295
+ * [David Hart](https://github.com/TrahDivad)
296
+ * [Jacob Gorban](https://github.com/apparentsoft)
297
+ * [Jon Cooper](https://github.com/joncooper)
298
+ * [Justin Spahr-Summers](https://github.com/jspahrsummers)
299
+ * [Kurtis Seebaldt](https://github.com/kseebaldt)
300
+ * [Luke Redpath](https://github.com/lukeredpath)
301
+ * [Nicholas Hutchinson](https://github.com/nickhutchinson)
302
+ * [Rob Rix](https://github.com/robrix)
303
+ * [Samuel Giddins](https://github.com/segiddins)
304
+ * [Zack Waugh](https://github.com/zachwaugh)
305
+
306
+ ## LICENSE
307
+
308
+ Expecta is licensed under the [MIT License](http://github.com/petejkim/expecta/raw/master/LICENSE).
@@ -0,0 +1,42 @@
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
@@ -0,0 +1,17 @@
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
@@ -0,0 +1,25 @@
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 <Foundation/Foundation.h>
10
+ #import "EXPMatcher.h"
11
+ #import "EXPDefines.h"
12
+
13
+ @interface EXPBlockDefinedMatcher : NSObject <EXPMatcher> {
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
@@ -0,0 +1,60 @@
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
@@ -0,0 +1,17 @@
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
@@ -0,0 +1,13 @@
1
+ #import <Foundation/Foundation.h>
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