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,26 @@
1
+ #import "XCTestCase+Specta.h"
2
+ #import "SPTXCTestCase.h"
3
+ #import "SPTExample.h"
4
+ #import <objc/runtime.h>
5
+
6
+ @interface XCTestCase (xct_allSubclasses)
7
+
8
+ - (NSArray *)xct_allSubclasses;
9
+
10
+ @end
11
+
12
+ @implementation XCTestCase (Specta)
13
+
14
+ + (void)load {
15
+ Method xct_allSubclasses = class_getClassMethod(self, @selector(xct_allSubclasses));
16
+ Method xct_allSubclasses_swizzle = class_getClassMethod(self, @selector(xct_allSubclasses_swizzle));
17
+ method_exchangeImplementations(xct_allSubclasses, xct_allSubclasses_swizzle);
18
+ }
19
+
20
+ + (NSArray *)xct_allSubclasses_swizzle {
21
+ NSMutableArray *subclasses = [[self xct_allSubclasses_swizzle] mutableCopy]; // call original
22
+ [subclasses removeObject:[SPTXCTestCase class]];
23
+ return subclasses;
24
+ }
25
+
26
+ @end
@@ -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,49 @@
1
+ #import "XCTestLog+Specta.h"
2
+ #import "SPTReporter.h"
3
+ #import <objc/runtime.h>
4
+
5
+ static void spt_swizzleInstanceMethod(Class class, SEL originalSelector, SEL swizzledSelector) {
6
+ Method originalMethod = class_getInstanceMethod(class, originalSelector);
7
+ Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);
8
+
9
+ method_exchangeImplementations(originalMethod, swizzledMethod);
10
+ }
11
+
12
+ @implementation XCTestLog (Specta)
13
+
14
+ + (void)load {
15
+ spt_swizzleInstanceMethod(self, @selector(startObserving), @selector(XCTestLog_startObserving));
16
+ spt_swizzleInstanceMethod(self, @selector(stopObserving), @selector(XCTestLog_stopObserving));
17
+ }
18
+
19
+ - (BOOL)spt_shouldProxyToSPTReporter {
20
+ // Instances of XCTestLog (but not subclasses) simply forward to -[SPTReporter sharedReporter]
21
+ return [self isMemberOfClass:[XCTestLog class]];
22
+ }
23
+
24
+ - (void)spt_pauseObservationInBlock:(void (^)(void))block {
25
+ [self XCTestLog_stopObserving];
26
+ block();
27
+ [self XCTestLog_startObserving];
28
+ }
29
+
30
+ #pragma mark - XCTestObserver
31
+
32
+ - (void)XCTestLog_startObserving {
33
+ if ([self spt_shouldProxyToSPTReporter]) {
34
+ [[SPTReporter sharedReporter] startObserving];
35
+ } else {
36
+ [self XCTestLog_startObserving];
37
+ }
38
+ }
39
+
40
+ - (void)XCTestLog_stopObserving {
41
+ if ([self spt_shouldProxyToSPTReporter]) {
42
+ [[SPTReporter sharedReporter] stopObserving];
43
+ } else {
44
+ [self XCTestLog_stopObserving];
45
+ usleep(100000);
46
+ }
47
+ }
48
+
49
+ @end
@@ -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,44 @@
1
+ #import "XCTestRun+Specta.h"
2
+ #import "SPTXCTestCase.h"
3
+
4
+ @implementation XCTestRun (Specta)
5
+
6
+ #pragma mark - Pending Test Cases
7
+
8
+ - (NSUInteger)spt_pendingTestCaseCount {
9
+ NSUInteger pendingTestCaseCount = 0;
10
+
11
+ if ([self isKindOfClass:[XCTestSuiteRun class]]) {
12
+ for (XCTestRun * testRun in [(XCTestSuiteRun *)self testRuns]) {
13
+ pendingTestCaseCount += [testRun spt_pendingTestCaseCount];
14
+ }
15
+ } else if ([[self test] isKindOfClass:[SPTXCTestCase class]]) {
16
+ SPTXCTestCase * testCase = (SPTXCTestCase *)[self test];
17
+ if (testCase != nil && [testCase spt_isPending]) {
18
+ pendingTestCaseCount++;
19
+ }
20
+ }
21
+
22
+ return pendingTestCaseCount;
23
+ }
24
+
25
+ #pragma mark - Skipped Test Cases
26
+
27
+ - (NSUInteger)spt_skippedTestCaseCount {
28
+ NSUInteger skippedTestCaseCount = 0;
29
+
30
+ if ([self isKindOfClass:[XCTestSuiteRun class]]) {
31
+ for (XCTestRun * testRun in [(XCTestSuiteRun *)self testRuns]) {
32
+ skippedTestCaseCount += [testRun spt_skippedTestCaseCount];
33
+ }
34
+ } else if ([[self test] isKindOfClass:[SPTXCTestCase class]]) {
35
+ SPTXCTestCase * testCase = (SPTXCTestCase *)[self test];
36
+ if (testCase.spt_skipped) {
37
+ skippedTestCaseCount++;
38
+ }
39
+ }
40
+
41
+ return skippedTestCaseCount;
42
+ }
43
+
44
+ @end
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'second_curtain', :path => './'
4
+ gem 'rspec'
5
+ gem 'rspec-mocks'
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 Ash Furrow
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,146 @@
1
+ Second Curtain
2
+ =============================
3
+
4
+ [![Build Status](https://travis-ci.org/AshFurrow/second_curtain.svg?branch=master)](https://travis-ci.org/AshFurrow/second_curtain)
5
+
6
+ If you're using the cool [FBSnapshotTestCase](https://github.com/facebook/ios-snapshot-test-case) to test your iOS view logic, awesome! Even better if you have continuous integration, like on [Travis](https://travis-ci.org), to automate running those tests!
7
+
8
+ Purpose
9
+ ----------------
10
+
11
+ Isn't it frustrating that you can't *see* the results of your tests? At best, you'll get this kind of error output:
12
+
13
+ ``` sh
14
+ ASHViewControllerSpec
15
+ a_view_controller_with_a_loaded_view_should_have_a_valid_snapshot, expected a matching snapshot in a_view_controller_with_a_loaded_view_should_have_a_valid_snapshot
16
+ /Users/travis/build/AshFurrow/upload-ios-snapshot-test-case/Demo/DemoTests/DemoTests.m:31
17
+
18
+ it(@"should have a valid snapshot", ^{
19
+ expect(viewController).to.haveValidSnapshot();
20
+ });
21
+
22
+ Executed 1 test, with 1 failure (1 unexpected) in 0.952 (0.954) seconds
23
+ ** TEST FAILED **
24
+ ```
25
+
26
+ Wouldn't it be awesome if we could upload the failing test snapshots somewhere, so we can see exactly what's wrong? That's what we aim to do here.
27
+
28
+ Usage
29
+ ----------------
30
+
31
+ Usage is pretty simple. Have an S3 bucket that is world-readable (that is, include the following bucket policy).
32
+
33
+ ``` json
34
+ {
35
+ "Version": "2008-10-17",
36
+ "Statement": [
37
+ {
38
+ "Sid": "AllowPublicRead",
39
+ "Effect": "Allow",
40
+ "Principal": {
41
+ "AWS": "*"
42
+ },
43
+ "Action": "s3:GetObject",
44
+ "Resource": "arn:aws:s3:::bucket-name/*"
45
+ }
46
+ ]
47
+ }
48
+ ```
49
+
50
+ (Replace "bucket-name" with your bucket name.)
51
+
52
+ It's also a good idea not to use a general-purpose S3 user for your CI, so create a new one with the following policy that will let them list buckets, but only read from or write to the bucket you're using.
53
+
54
+ ``` json
55
+ {
56
+ "Version": "2012-10-17",
57
+ "Statement": [
58
+ {
59
+ "Effect": "Allow",
60
+ "Action": ["s3:ListAllMyBuckets"],
61
+ "Resource": "arn:aws:s3:::*"
62
+ },
63
+ {
64
+ "Effect": "Allow",
65
+ "Action": [
66
+ "s3:*"
67
+ ],
68
+ "Resource": "arn:aws:s3:::bucket-name"
69
+ },
70
+ {
71
+ "Effect": "Allow",
72
+ "Action": [
73
+ "s3:*"
74
+ ],
75
+ "Resource": "arn:aws:s3:::bucket-name/*"
76
+ }
77
+ ]
78
+ }
79
+ ```
80
+
81
+ OK, so the hard part is mostly done. Now that we have a place to upload our images, let's configure our build.
82
+
83
+ I use a Makefile to build and run tests on my iOS project, so my `.travis.yml` file looks something like this:
84
+
85
+ ``` ruby
86
+ language: objective-c
87
+ cache: bundler
88
+
89
+ env:
90
+ - UPLOAD_IOS_SNAPSHOT_BUCKET_NAME=bucket-name
91
+ - UPLOAD_IOS_SNAPSHOT_BUCKET_PREFIX=an/optional/prefix
92
+ - AWS_ACCESS_KEY_ID=ACCESS_KEY
93
+ - AWS_SECRET_ACCESS_KEY=SECRET_KEY
94
+
95
+ before_install:
96
+ - bundle install
97
+
98
+ before_script:
99
+ - export LANG=en_US.UTF-8
100
+ - make ci
101
+
102
+ script:
103
+ - make test
104
+ ```
105
+
106
+ (You can take a look at how to [encrypt information in your config file](http://docs.travis-ci.com/user/encryption-keys/), but this has limitations due to how ecrypted variables are accessed via PRs on forks.)
107
+
108
+ My Makefile looks like this:
109
+
110
+ ``` sh
111
+ WORKSPACE = Demo/Demo.xcworkspace
112
+ SCHEME = Demo
113
+
114
+ all: ci
115
+
116
+ build:
117
+ set -o pipefail && xcodebuild -workspace $(WORKSPACE) -scheme $(SCHEME) -sdk iphonesimulator build | xcpretty -c
118
+
119
+ clean:
120
+ xcodebuild -workspace $(WORKSPACE) -scheme $(SCHEME) clean
121
+
122
+ test:
123
+ set -o pipefail && xcodebuild -workspace $(WORKSPACE) -scheme $(SCHEME) -configuration Debug test -sdk iphonesimulator | second_curtain | xcpretty -c --test
124
+
125
+ ci: build
126
+ ```
127
+
128
+ Notice that we're piping the output from `xcodebuild` into `second_curtain`.
129
+
130
+ Note also that we're using [`xcpretty`](http://github.com/supermarin/xcpretty), as you should, too. The `xcpretty` invocation must come *after* the `second_curtain` invocation, since Second Curtain relies on parsing the output from `xcodebuild` directly.
131
+
132
+ And finally, our Gemfile:
133
+
134
+ ```
135
+ source 'https://rubygems.org'
136
+
137
+ gem 'cocoapods'
138
+ gem 'xcpretty'
139
+ gem 'second_curtain', '~> 0.2'
140
+ ```
141
+
142
+ And when any snapshot tests fail, they'll be uploaded to S3 and an [HTML page](https://eigen-ci.s3.amazonaws.com/snapshots/2014-08-04--15-47/index.html) will be generated with links to the images so you can download them. Huzzah!
143
+
144
+ ![Sample diff](http://static.ashfurrow.com/github/second_curtain.png)
145
+
146
+ Note that when the S3 directory is created, it needs to be *unique*. You can provide a custom folder name with the `UPLOAD_IOS_SNAPSHOT_FOLDER_NAME` environment variable. If one is not provided, Second Curtain will fall back to `TRAVIS_JOB_ID`, and then onto one generated by the current date and time.
data/Rakefile ADDED
@@ -0,0 +1,7 @@
1
+ require 'rspec/core/rake_task'
2
+
3
+ task :spec do
4
+ sh 'rspec spec --color'
5
+ end
6
+
7
+ task :default => :spec
@@ -0,0 +1,20 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'second_curtain'
3
+ s.version = '0.2.3'
4
+ s.licenses = ['MIT']
5
+ s.summary = "Upload failing iOS snapshot tests cases to S3."
6
+ s.description =
7
+ %q{
8
+ If you're using the cool FBSnapshotTestCase to test your iOS view logic, awesome! Even better if you have continuous integration, like on Travis, to automate running those tests!
9
+
10
+ Wouldn't it be awesome if we could upload the failing test snapshots somewhere, so we can see exactly what's wrong? That's what this project is going to do. Once it's finished.
11
+ }
12
+ s.authors = ["Ash Furrow", "Orta Therox"]
13
+ s.homepage = 'https://github.com/AshFurrow/second_curtain'
14
+ s.email = 'ash@ashfurrow.com'
15
+ s.files = `git ls-files`.split($/)
16
+ s.require_paths = ["lib"]
17
+ s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ s.add_runtime_dependency 'aws-sdk-v1', '~> 1.52'
19
+ s.add_runtime_dependency 'mustache', '~> 0.99'
20
+ end
@@ -0,0 +1,79 @@
1
+ Build settings from command line:
2
+ SDKROOT = iphonesimulator7.1
3
+
4
+ === BUILD TARGET Demo OF PROJECT Demo WITH CONFIGURATION Debug ===
5
+
6
+ Check dependencies
7
+
8
+ === BUILD TARGET Pods-DemoTests-Specta OF PROJECT Pods WITH CONFIGURATION Debug ===
9
+ Check dependencies
10
+
11
+ === BUILD TARGET Pods-DemoTests-FBSnapshotTestCase OF PROJECT Pods WITH CONFIGURATION Debug ===
12
+
13
+ Check dependencies
14
+
15
+ === BUILD TARGET Pods-DemoTests-Expecta OF PROJECT Pods WITH CONFIGURATION Debug ===
16
+ Check dependencies
17
+
18
+ === BUILD TARGET Pods-DemoTests-Expecta+Snapshots OF PROJECT Pods WITH CONFIGURATION Debug ===
19
+
20
+ Check dependencies
21
+
22
+ === BUILD TARGET Pods-DemoTests OF PROJECT Pods WITH CONFIGURATION Debug ===
23
+
24
+ Check dependencies
25
+
26
+ === BUILD TARGET DemoTests OF PROJECT Demo WITH CONFIGURATION Debug ===
27
+
28
+ Check dependencies
29
+
30
+ PhaseScriptExecution Check\ Pods\ Manifest.lock /Users/ash/Library/Developer/Xcode/DerivedData/Demo-bqdkrcbicwkofebylhdfmdrzkaob/Build/Intermediates/Demo.build/Debug-iphonesimulator/DemoTests.build/Script-7906C3A75BB2404EBA623D41.sh
31
+ cd "/Users/ash/Dropbox (Personal)/bin/second_shutter/Demo"
32
+ /bin/sh -c /Users/ash/Library/Developer/Xcode/DerivedData/Demo-bqdkrcbicwkofebylhdfmdrzkaob/Build/Intermediates/Demo.build/Debug-iphonesimulator/DemoTests.build/Script-7906C3A75BB2404EBA623D41.sh
33
+
34
+ PhaseScriptExecution Copy\ Pods\ Resources /Users/ash/Library/Developer/Xcode/DerivedData/Demo-bqdkrcbicwkofebylhdfmdrzkaob/Build/Intermediates/Demo.build/Debug-iphonesimulator/DemoTests.build/Script-6120F487C62647F9B0EF7F31.sh
35
+ cd "/Users/ash/Dropbox (Personal)/bin/second_shutter/Demo"
36
+ /bin/sh -c /Users/ash/Library/Developer/Xcode/DerivedData/Demo-bqdkrcbicwkofebylhdfmdrzkaob/Build/Intermediates/Demo.build/Debug-iphonesimulator/DemoTests.build/Script-6120F487C62647F9B0EF7F31.sh
37
+ building file list ... done
38
+
39
+ sent 29 bytes received 20 bytes 98.00 bytes/sec
40
+ total size is 0 speedup is 0.00
41
+ /* com.apple.actool.compilation-results */
42
+ /Users/ash/Library/Developer/Xcode/DerivedData/Demo-bqdkrcbicwkofebylhdfmdrzkaob/Build/Products/Debug-iphonesimulator/DemoTests.xctest/Assets.car
43
+
44
+
45
+ = All tests
46
+ Test Suite 'All tests' started at 2014-08-02 15:27:53 +0000
47
+
48
+ = DemoTests.xctest
49
+ Test Suite 'DemoTests.xctest' started at 2014-08-02 15:27:53 +0000
50
+
51
+ = ASHViewControllerSpec
52
+ Test Suite 'ASHViewControllerSpec' started at 2014-08-02 15:27:53 +0000
53
+
54
+ -[ASHViewControllerSpec a_view_controller_with_a_loaded_view_should_have_a_valid_snapshot]
55
+ Test Case '-[ASHViewControllerSpec a_view_controller_with_a_loaded_view_should_have_a_valid_snapshot]' started.
56
+ 2014-08-02 17:27:53.706 Demo[32451:60b] If you have Kaleidoscope installed you can run this command to see an image diff:
57
+ ksdiff "/Users/ash/Library/Application Support/iPhone Simulator/7.1/Applications/8C5F6EC1-9B2A-4418-A978-9733D338C27E/tmp/ASHViewControllerSpec/reference_a_view_controller_with_a_loaded_view_should_have_a_valid_snapshot@2x.png" "/Users/ash/Library/Application Support/iPhone Simulator/7.1/Applications/8C5F6EC1-9B2A-4418-A978-9733D338C27E/tmp/ASHViewControllerSpec/failed_a_view_controller_with_a_loaded_view_should_have_a_valid_snapshot@2x.png"
58
+ 2014-08-02 17:27:53.708 Demo[32451:60b] /Users/ash/Dropbox (Personal)/bin/second_shutter/Demo/DemoTests/DemoTests.m:31 expected a matching snapshot in a_view_controller_with_a_loaded_view_should_have_a_valid_snapshot
59
+ NSLocalizedDescription: Images different
60
+ /Users/ash/Dropbox (Personal)/bin/second_shutter/Demo/DemoTests/DemoTests.m:31: error: -[ASHViewControllerSpec a_view_controller_with_a_loaded_view_should_have_a_valid_snapshot] : expected a matching snapshot in a_view_controller_with_a_loaded_view_should_have_a_valid_snapshot
61
+ NSLocalizedDescription: Images different
62
+ Test Case '-[ASHViewControllerSpec a_view_controller_with_a_loaded_view_should_have_a_valid_snapshot]' failed (0.421 seconds).
63
+
64
+ Test Suite 'ASHViewControllerSpec' finished at 2014-08-02 15:27:53 +0000.
65
+ Executed 1 test, with 1 failure (1 unexpected) in 0.421 (0.421) seconds
66
+
67
+ = FBSnapshotTestCase
68
+ Test Suite 'FBSnapshotTestCase' started at 2014-08-02 15:27:53 +0000
69
+
70
+ Test Suite 'FBSnapshotTestCase' finished at 2014-08-02 15:27:53 +0000.
71
+ Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
72
+
73
+ Test Suite 'DemoTests.xctest' finished at 2014-08-02 15:27:53 +0000.
74
+ Executed 1 test, with 1 failure (1 unexpected) in 0.421 (0.421) seconds
75
+
76
+ Test Suite 'All tests' finished at 2014-08-02 15:27:53 +0000.
77
+ Executed 1 test, with 1 failure (1 unexpected) in 0.421 (0.423) seconds
78
+
79
+ 1 test; 0 skipped; 1 failure; 1 exception; 0 pending
@@ -0,0 +1,25 @@
1
+ require './lib/second_curtain/kaleidoscope_command'
2
+
3
+ describe KaleidoscopeCommand do
4
+ it "should return a valid command from a valid line" do
5
+ line = 'ksdiff "/first/path.png" "/second/path.png"'
6
+ command = KaleidoscopeCommand.command_from_line line
7
+ expect(command).not_to be_nil
8
+ expect(command.before_path).to eq("/first/path.png")
9
+ expect(command.after_path).to eq("/second/path.png")
10
+ expect(command.fails).to be_falsey
11
+ end
12
+
13
+ it "should return nil from an invalid line" do
14
+ line = 'this shouldn\'t work'
15
+ command = KaleidoscopeCommand.command_from_line line
16
+ expect(command).to be_nil
17
+ end
18
+
19
+ it "should initialize correctly" do
20
+ command = KaleidoscopeCommand.new('before', 'after')
21
+ expect(command.before_path).to eq("before")
22
+ expect(command.after_path).to eq("after")
23
+ expect(command.fails).to be_falsey
24
+ end
25
+ end
@@ -0,0 +1,39 @@
1
+ require './lib/second_curtain/parser.rb'
2
+
3
+ describe Parser do
4
+ before(:each) do
5
+ @parser = Parser.new()
6
+ end
7
+
8
+ describe "when initialized" do
9
+ it "has a nil latest_test_suite" do
10
+ expect(@parser.latest_test_suite).to be_nil
11
+ end
12
+
13
+ it "has no failing commands" do
14
+ expect(@parser.has_failing_commands).to be_falsey
15
+ expect(@parser.failing_commands).to eq([])
16
+ end
17
+
18
+ it "returns valid failing commands" do
19
+ command = double("command", :fails => true)
20
+ test_case = double("test case", :commands => [command])
21
+ test_suite = double("test suite", :test_cases => [test_case])
22
+
23
+ @parser.instance_variable_set(:@test_suites, [test_suite])
24
+
25
+ expect(@parser.failing_commands).to eq([command])
26
+ end
27
+ end
28
+
29
+ it "correctly parses valid input" do
30
+ data = File.read("./spec/sample_output.txt")
31
+ data.split("\n").each do |line|
32
+ @parser.parse_line(line)
33
+ end
34
+
35
+ expect(@parser.has_failing_commands).to be_truthy
36
+ expect(@parser.failing_commands.count).to eq(1)
37
+ expect(@parser.failing_commands.first.before_path).to eq("/Users/ash/Library/Application Support/iPhone Simulator/7.1/Applications/8C5F6EC1-9B2A-4418-A978-9733D338C27E/tmp/ASHViewControllerSpec/reference_a_view_controller_with_a_loaded_view_should_have_a_valid_snapshot@2x.png")
38
+ end
39
+ end
@@ -0,0 +1,32 @@
1
+ require './lib/second_curtain/test_suite'
2
+
3
+ describe TestSuite do
4
+ it "should create a valid test suite from a valid line" do
5
+ line = "Test Suite 'ARAnimatedTickViewSpec' started at 2014-08-02 12:10:48 +0000."
6
+ test_suite = TestSuite.suite_from_line(line)
7
+ expect(test_suite).not_to be_nil
8
+ expect(test_suite.name).to eq("ARAnimatedTickViewSpec")
9
+ end
10
+
11
+ it "should generate a valid test case from a valid line" do
12
+ line = "Something that shouldn't work"
13
+ test_suite = TestSuite.suite_from_line(line)
14
+ expect(test_suite).to be_nil
15
+ end
16
+
17
+ it "should be initialized correctly" do
18
+ name = "Some Suite"
19
+ test_suite = TestSuite.new(name)
20
+ expect(test_suite.name).to eq(name)
21
+ expect(test_suite.test_cases).not_to be_nil
22
+ end
23
+
24
+ it "correctly returns the final test case" do
25
+ test_suite = TestSuite.new("Some Suite")
26
+
27
+ test_case = double()
28
+ test_suite.test_cases = [test_case]
29
+
30
+ expect(test_suite.latest_test_case).to eq(test_case)
31
+ end
32
+ end
@@ -0,0 +1,60 @@
1
+ require './lib/second_curtain/upload_manager'
2
+ require './lib/second_curtain/upload'
3
+
4
+ describe UploadManager do
5
+ it "should have instance variables set correctly upon initialization" do
6
+ bucket = double()
7
+ path_prefix = "test/"
8
+ upload_manager = UploadManager.new(bucket, path_prefix)
9
+
10
+ expect(upload_manager.instance_variable_get(:@uploads)).to eq([])
11
+ expect(upload_manager.instance_variable_get(:@path_prefix)).to eq(path_prefix)
12
+ expect(upload_manager.instance_variable_get(:@bucket)).to eq(bucket)
13
+ end
14
+
15
+ it "propertly enqueues new uploads" do
16
+ bucket = double()
17
+ path_prefix = "test/"
18
+ upload_manager = UploadManager.new(bucket, path_prefix)
19
+ uploads = upload_manager.instance_variable_get(:@uploads)
20
+ expect(uploads.count).to eq(0)
21
+
22
+ upload_manager.enqueue_upload('expected', 'actual')
23
+ uploads = upload_manager.instance_variable_get(:@uploads)
24
+ expect(uploads.count).to eq(1)
25
+
26
+ upload = uploads[0]
27
+ expect(upload.expected_path).to eq('expected')
28
+ expect(upload.actual_path).to eq('actual')
29
+ end
30
+
31
+ it "returns nil when uploading nothing" do
32
+ bucket = double()
33
+ path_prefix = "test/"
34
+ upload_manager = UploadManager.new(bucket, path_prefix)
35
+
36
+ expect(upload_manager.upload("test/")).to eq(nil)
37
+ end
38
+
39
+ it "properly uploads" do
40
+ double = double()
41
+ expect(double).to receive(:write)
42
+ expect(double).to receive(:public_url).and_return("http://example.com")
43
+
44
+ bucket = double()
45
+ expect(bucket).to receive(:objects).and_return({
46
+ "test/folder/index.html" => double
47
+ })
48
+
49
+ path_prefix = "test/"
50
+ upload_manager = UploadManager.new(bucket, path_prefix)
51
+
52
+ upload = double()
53
+ expect(upload).to receive(:upload)
54
+
55
+ upload_manager.instance_variable_set(:@uploads, [upload])
56
+
57
+ result = upload_manager.upload("folder")
58
+ expect(result).to eq("http://example.com")
59
+ end
60
+ end
@@ -0,0 +1,34 @@
1
+ require './lib/second_curtain/upload'
2
+ require 'uri'
3
+
4
+ describe Upload do
5
+ it "should have instance variables set correctly upon initialization" do
6
+ upload = Upload.new('expected', 'actual')
7
+ expect(upload.expected_path).to eq('expected')
8
+ expect(upload.actual_path).to eq('actual')
9
+ end
10
+
11
+ it "should upload properly" do
12
+ path = "test/folder"
13
+ expected_double = double()
14
+ actual_double = double()
15
+ bucket = double()
16
+
17
+ doubles = {
18
+ "test/folder/expected.png" => expected_double,
19
+ "test/folder/actual.png" => actual_double
20
+ }
21
+ expect(bucket).to receive(:objects).twice.and_return(doubles)
22
+
23
+ expect(expected_double).to receive(:write).with(anything)
24
+ expect(expected_double).to receive(:public_url).and_return("http://exmaple.com/1.png")
25
+ expect(actual_double).to receive(:write).with(anything)
26
+ expect(actual_double).to receive(:public_url).and_return("http://exmaple.com/2.png")
27
+
28
+ upload = Upload.new('/path/to/expected.png', '/path/to/actual.png')
29
+ upload.upload(bucket, path)
30
+
31
+ expect(upload.uploaded_expected_url).to eq("http://exmaple.com/1.png")
32
+ expect(upload.uploaded_actual_url).to eq("http://exmaple.com/2.png")
33
+ end
34
+ end
@@ -0,0 +1,22 @@
1
+ require './lib/second_curtain/xcode_test_case'
2
+
3
+ describe XcodeTestCase do
4
+ it "should generate a valid test case from a valid line" do
5
+ line = "Test Case '-[ARAnimatedTickViewSpec initWithSelection_inits_with_selected]' started."
6
+ test_case = XcodeTestCase.test_case_from_line(line)
7
+ expect(test_case).not_to be_nil
8
+ expect(test_case.name).to eq("InitWithSelection inits with selected")
9
+ end
10
+
11
+ it "should return nil from an invalid line" do
12
+ line = "Something that should't work"
13
+ test_case = XcodeTestCase.test_case_from_line(line)
14
+ expect(test_case).to be_nil
15
+ end
16
+
17
+ it "should initialize properly" do
18
+ name = "Some test"
19
+ test_case = XcodeTestCase.new(name)
20
+ expect(test_case.name).to eq(name)
21
+ end
22
+ end