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,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,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
@@ -0,0 +1,14 @@
1
+ #import <Foundation/Foundation.h>
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
@@ -0,0 +1,8 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ @interface NSValue (Expecta)
4
+
5
+ - (const char *)_EXP_objCType;
6
+ - (void)set_EXP_objCType:(const char *)_EXP_objCType;
7
+
8
+ @end
@@ -0,0 +1,21 @@
1
+ //
2
+ // EXPMatchers+FBSnapshotTest.h
3
+ // Artsy
4
+ //
5
+ // Created by Daniel Doubrovkine on 1/14/14.
6
+ // Copyright (c) 2014 Artsy Inc. All rights reserved.
7
+ //
8
+
9
+ #import <Expecta/Expecta.h>
10
+
11
+ @interface EXPExpectFBSnapshotTest : NSObject
12
+ @end
13
+
14
+ /// Set the default folder for image tests to run in
15
+ extern void setGlobalReferenceImageDir(char *reference);
16
+
17
+ EXPMatcherInterface(haveValidSnapshot, (void));
18
+ EXPMatcherInterface(recordSnapshot, (void));
19
+
20
+ EXPMatcherInterface(haveValidSnapshotNamed, (NSString *snapshot));
21
+ EXPMatcherInterface(recordSnapshotNamed, (NSString *snapshot));
@@ -0,0 +1,87 @@
1
+ /*
2
+ * Copyright (c) 2013, Facebook, Inc.
3
+ * All rights reserved.
4
+ *
5
+ * This source code is licensed under the BSD-style license found in the
6
+ * LICENSE file in the root directory of this source tree. An additional grant
7
+ * of patent rights can be found in the PATENTS file in the same directory.
8
+ *
9
+ */
10
+
11
+ #import <QuartzCore/QuartzCore.h>
12
+
13
+ #import <UIKit/UIKit.h>
14
+
15
+ #import <XCTest/XCTest.h>
16
+
17
+ #ifndef FB_REFERENCE_IMAGE_DIR
18
+ #define FB_REFERENCE_IMAGE_DIR "\"$(SOURCE_ROOT)/$(PROJECT_NAME)Tests/ReferenceImages\""
19
+ #endif
20
+
21
+ /**
22
+ Similar to our much-loved XCTAssert() macros. Use this to perform your test. No need to write an explanation, though.
23
+ @param view The view to snapshot
24
+ @param identifier An optional identifier, used is there are multiple snapshot tests in a given -test method.
25
+ */
26
+ #define FBSnapshotVerifyView(view__, identifier__) \
27
+ { \
28
+ NSError *error__ = nil; \
29
+ NSString *referenceImagesDirectory__ = [NSString stringWithFormat:@"%s", FB_REFERENCE_IMAGE_DIR]; \
30
+ BOOL comparisonSuccess__ = [self compareSnapshotOfView:(view__) referenceImagesDirectory:referenceImagesDirectory__ identifier:(identifier__) error:&error__]; \
31
+ XCTAssertTrue(comparisonSuccess__, @"Snapshot comparison failed: %@", error__); \
32
+ }
33
+
34
+ /**
35
+ Similar to our much-loved XCTAssert() macros. Use this to perform your test. No need to write an explanation, though.
36
+ @param layer The layer to snapshot
37
+ @param identifier An optional identifier, used is there are multiple snapshot tests in a given -test method.
38
+ */
39
+ #define FBSnapshotVerifyLayer(layer__, identifier__) \
40
+ { \
41
+ NSError *error__ = nil; \
42
+ NSString *referenceImagesDirectory__ = [NSString stringWithFormat:@"%s", FB_REFERENCE_IMAGE_DIR]; \
43
+ BOOL comparisonSuccess__ = [self compareSnapshotOfLayer:(layer__) referenceImagesDirectory:referenceImagesDirectory__ identifier:(identifier__) error:&error__]; \
44
+ XCTAssertTrue(comparisonSuccess__, @"Snapshot comparison failed: %@", error__); \
45
+ }
46
+
47
+ /**
48
+ The base class of view snapshotting tests. If you have small UI component, it's often easier to configure it in a test
49
+ and compare an image of the view to a reference image that write lots of complex layout-code tests.
50
+
51
+ In order to flip the tests in your subclass to record the reference images set `recordMode` to YES before calling
52
+ -[super setUp].
53
+ */
54
+ @interface FBSnapshotTestCase : XCTestCase
55
+
56
+ /**
57
+ When YES, the test macros will save reference images, rather than performing an actual test.
58
+ */
59
+ @property (readwrite, nonatomic, assign) BOOL recordMode;
60
+
61
+ /**
62
+ Performs the comparisong or records a snapshot of the layer if recordMode is YES.
63
+ @param layer The Layer to snapshot
64
+ @param referenceImagesDirectory The directory in which reference images are stored.
65
+ @param identifier An optional identifier, used is there are muliptle snapshot tests in a given -test method.
66
+ @param error An error to log in an XCTAssert() macro if the method fails (missing reference image, images differ, etc).
67
+ @returns YES if the comparison (or saving of the reference image) succeeded.
68
+ */
69
+ - (BOOL)compareSnapshotOfLayer:(CALayer *)layer
70
+ referenceImagesDirectory:(NSString *)referenceImagesDirectory
71
+ identifier:(NSString *)identifier
72
+ error:(NSError **)errorPtr;
73
+
74
+ /**
75
+ Performs the comparisong or records a snapshot of the view if recordMode is YES.
76
+ @param view The view to snapshot
77
+ @param referenceImagesDirectory The directory in which reference images are stored.
78
+ @param identifier An optional identifier, used is there are muliptle snapshot tests in a given -test method.
79
+ @param error An error to log in an XCTAssert() macro if the method fails (missing reference image, images differ, etc).
80
+ @returns YES if the comparison (or saving of the reference image) succeeded.
81
+ */
82
+ - (BOOL)compareSnapshotOfView:(UIView *)view
83
+ referenceImagesDirectory:(NSString *)referenceImagesDirectory
84
+ identifier:(NSString *)identifier
85
+ error:(NSError **)errorPtr;
86
+
87
+ @end
@@ -0,0 +1,147 @@
1
+ /*
2
+ * Copyright (c) 2013, Facebook, Inc.
3
+ * All rights reserved.
4
+ *
5
+ * This source code is licensed under the BSD-style license found in the
6
+ * LICENSE file in the root directory of this source tree. An additional grant
7
+ * of patent rights can be found in the PATENTS file in the same directory.
8
+ *
9
+ */
10
+
11
+ #import <Foundation/Foundation.h>
12
+ #import <UIKit/UIKit.h>
13
+
14
+ typedef NS_ENUM(NSInteger, FBSnapshotTestControllerErrorCode) {
15
+ FBSnapshotTestControllerErrorCodeUnknown,
16
+ FBSnapshotTestControllerErrorCodeNeedsRecord,
17
+ FBSnapshotTestControllerErrorCodePNGCreationFailed,
18
+ FBSnapshotTestControllerErrorCodeImagesDifferentSizes,
19
+ FBSnapshotTestControllerErrorCodeImagesDifferent,
20
+ };
21
+ /**
22
+ Errors returned by the methods of FBSnapshotTestController use this domain.
23
+ */
24
+ extern NSString *const FBSnapshotTestControllerErrorDomain;
25
+
26
+ /**
27
+ Errors returned by the methods of FBSnapshotTestController sometimes contain this key in the `userInfo` dictionary.
28
+ */
29
+ extern NSString *const FBReferenceImageFilePathKey;
30
+
31
+ /**
32
+ Provides the heavy-lifting for FBSnapshotTestCase. It loads and saves images, along with performing the actual pixel-
33
+ by-pixel comparison of images.
34
+ Instances are initialized with the test class, and directories to read and write to.
35
+ */
36
+ @interface FBSnapshotTestController : NSObject
37
+
38
+ /**
39
+ Record snapshots.
40
+ **/
41
+ @property(readwrite, nonatomic, assign) BOOL recordMode;
42
+
43
+ /**
44
+ Designated initializer.
45
+ Before this methods returns the controller enumerates over the test methods in `testClass` and loads the images
46
+ for those tests.
47
+ @param testClass The subclass of FBSnapshotTestCase that is using this controller.
48
+ @param referenceImagesDirectory The directory where the reference images are stored.
49
+ @returns An instance of FBSnapshotTestController.
50
+ */
51
+ - (id)initWithTestClass:(Class)testClass;
52
+
53
+
54
+ /**
55
+ Performs the comparison of the layer.
56
+ @param layer The Layer to snapshot.
57
+ @param referenceImagesDirectory The directory in which reference images are stored.
58
+ @param identifier An optional identifier, used is there are muliptle snapshot tests in a given -test method.
59
+ @param error An error to log in an XCTAssert() macro if the method fails (missing reference image, images differ, etc).
60
+ @returns YES if the comparison (or saving of the reference image) succeeded.
61
+ */
62
+ - (BOOL)compareSnapshotOfLayer:(CALayer *)layer
63
+ selector:(SEL)selector
64
+ identifier:(NSString *)identifier
65
+ error:(NSError **)errorPtr;
66
+
67
+ /**
68
+ Performs the comparison of the view.
69
+ @param view The view to snapshot.
70
+ @param referenceImagesDirectory The directory in which reference images are stored.
71
+ @param identifier An optional identifier, used is there are muliptle snapshot tests in a given -test method.
72
+ @param error An error to log in an XCTAssert() macro if the method fails (missing reference image, images differ, etc).
73
+ @returns YES if the comparison (or saving of the reference image) succeeded.
74
+ */
75
+ - (BOOL)compareSnapshotOfView:(UIView *)view
76
+ selector:(SEL)selector
77
+ identifier:(NSString *)identifier
78
+ error:(NSError **)errorPtr;
79
+
80
+ /**
81
+ Performs the comparison of a view or layer.
82
+ @param view The view or layer to snapshot.
83
+ @param referenceImagesDirectory The directory in which reference images are stored.
84
+ @param identifier An optional identifier, used is there are muliptle snapshot tests in a given -test method.
85
+ @param error An error to log in an XCTAssert() macro if the method fails (missing reference image, images differ, etc).
86
+ @returns YES if the comparison (or saving of the reference image) succeeded.
87
+ */
88
+ - (BOOL)compareSnapshotOfViewOrLayer:(id)viewOrLayer
89
+ selector:(SEL)selector
90
+ identifier:(NSString *)identifier
91
+ error:(NSError **)errorPtr;
92
+
93
+
94
+ /**
95
+ The directory in which referfence images are stored.
96
+ */
97
+ @property (readwrite, nonatomic, copy) NSString *referenceImagesDirectory;
98
+
99
+ /**
100
+ Loads a reference image.
101
+ @param selector The test method being run.
102
+ @param identifier The optional identifier, used when multiple images are tested in a single -test method.
103
+ @param error An error, if this methods returns nil, the error will be something useful.
104
+ @returns An image.
105
+ */
106
+ - (UIImage *)referenceImageForSelector:(SEL)selector
107
+ identifier:(NSString *)identifier
108
+ error:(NSError **)error;
109
+
110
+ /**
111
+ Saves a reference image.
112
+ @param selector The test method being run.
113
+ @param identifier The optional identifier, used when multiple images are tested in a single -test method.
114
+ @param error An error, if this methods returns NO, the error will be something useful.
115
+ @returns An image.
116
+ */
117
+ - (BOOL)saveReferenceImage:(UIImage *)image
118
+ selector:(SEL)selector
119
+ identifier:(NSString *)identifier
120
+ error:(NSError **)errorPtr;
121
+
122
+ /**
123
+ Performs a pixel-by-pixel comparison of the two images.
124
+ @param referenceImage The reference (correct) image.
125
+ @param image The image to test against the reference.
126
+ @param error An error that indicates why the comparison failed if it does.
127
+ @param YES if the comparison succeeded and the images are the same.
128
+ */
129
+ - (BOOL)compareReferenceImage:(UIImage *)referenceImage
130
+ toImage:(UIImage *)image
131
+ error:(NSError **)errorPtr;
132
+
133
+ /**
134
+ Saves the reference image and the test image to `failedOutputDirectory`.
135
+ @param referenceImage The reference (correct) image.
136
+ @param testImage The image to test against the reference.
137
+ @param selector The test method being run.
138
+ @param identifier The optional identifier, used when multiple images are tested in a single -test method.
139
+ @param error An error that indicates why the comparison failed if it does.
140
+ @param YES if the save succeeded.
141
+ */
142
+ - (BOOL)saveFailedReferenceImage:(UIImage *)referenceImage
143
+ testImage:(UIImage *)testImage
144
+ selector:(SEL)selector
145
+ identifier:(NSString *)identifier
146
+ error:(NSError **)errorPtr;
147
+ @end
@@ -0,0 +1,37 @@
1
+ //
2
+ // Created by Gabriel Handford on 3/1/09.
3
+ // Copyright 2009-2013. All rights reserved.
4
+ // Created by John Boiles on 10/20/11.
5
+ // Copyright (c) 2011. All rights reserved
6
+ // Modified by Felix Schulze on 2/11/13.
7
+ // Copyright 2013. All rights reserved.
8
+ //
9
+ // Permission is hereby granted, free of charge, to any person
10
+ // obtaining a copy of this software and associated documentation
11
+ // files (the "Software"), to deal in the Software without
12
+ // restriction, including without limitation the rights to use,
13
+ // copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ // copies of the Software, and to permit persons to whom the
15
+ // Software is furnished to do so, subject to the following
16
+ // conditions:
17
+ //
18
+ // The above copyright notice and this permission notice shall be
19
+ // included in all copies or substantial portions of the Software.
20
+ //
21
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22
+ // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
23
+ // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24
+ // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
25
+ // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
26
+ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27
+ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
28
+ // OTHER DEALINGS IN THE SOFTWARE.
29
+ //
30
+
31
+ #import <UIKit/UIKit.h>
32
+
33
+ @interface UIImage (Compare)
34
+
35
+ - (BOOL)compareWithImage:(UIImage *)image;
36
+
37
+ @end
@@ -0,0 +1,37 @@
1
+ //
2
+ // Created by Gabriel Handford on 3/1/09.
3
+ // Copyright 2009-2013. All rights reserved.
4
+ // Created by John Boiles on 10/20/11.
5
+ // Copyright (c) 2011. All rights reserved
6
+ // Modified by Felix Schulze on 2/11/13.
7
+ // Copyright 2013. All rights reserved.
8
+ //
9
+ // Permission is hereby granted, free of charge, to any person
10
+ // obtaining a copy of this software and associated documentation
11
+ // files (the "Software"), to deal in the Software without
12
+ // restriction, including without limitation the rights to use,
13
+ // copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ // copies of the Software, and to permit persons to whom the
15
+ // Software is furnished to do so, subject to the following
16
+ // conditions:
17
+ //
18
+ // The above copyright notice and this permission notice shall be
19
+ // included in all copies or substantial portions of the Software.
20
+ //
21
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22
+ // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
23
+ // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24
+ // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
25
+ // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
26
+ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27
+ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
28
+ // OTHER DEALINGS IN THE SOFTWARE.
29
+ //
30
+
31
+ #import <UIKit/UIKit.h>
32
+
33
+ @interface UIImage (Diff)
34
+
35
+ - (UIImage *)diffWithImage:(UIImage *)image;
36
+
37
+ @end
@@ -0,0 +1,14 @@
1
+ #import <Foundation/Foundation.h>
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
+
@@ -0,0 +1,40 @@
1
+ #import <Foundation/Foundation.h>
2
+ #import <XCTest/XCTest.h>
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
@@ -0,0 +1,5 @@
1
+ #import "SPTReporter.h"
2
+
3
+ @interface SPTNestedReporter : SPTReporter
4
+
5
+ @end
@@ -0,0 +1,33 @@
1
+ #import <XCTest/XCTest.h>
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
@@ -0,0 +1,17 @@
1
+ #import <Foundation/Foundation.h>
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
+
@@ -0,0 +1,21 @@
1
+ #import <Foundation/Foundation.h>
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
@@ -0,0 +1,27 @@
1
+ #import <XCTest/XCTest.h>
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
@@ -0,0 +1,9 @@
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