remq 0.0.1a → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (789) hide show
  1. data/Rakefile +8 -0
  2. data/Readme.md +31 -17
  3. data/lib/remq/version.rb +1 -1
  4. data/lib/remq.rb +130 -28
  5. data/remq.gemspec +2 -4
  6. data/spec/remq_spec.rb +68 -42
  7. data/vendor/bundle/bin/autospec +23 -0
  8. data/vendor/bundle/bin/htmldiff +25 -0
  9. data/vendor/bundle/bin/ldiff +25 -0
  10. data/vendor/bundle/bin/rake +23 -0
  11. data/vendor/bundle/bin/rspec +23 -0
  12. data/vendor/bundle/cache/diff-lcs-1.1.3.gem +0 -0
  13. data/vendor/bundle/cache/hiredis-0.4.5.gem +0 -0
  14. data/vendor/bundle/cache/multi_json-1.6.1.gem +0 -0
  15. data/vendor/bundle/cache/rake-10.0.3.gem +0 -0
  16. data/vendor/bundle/cache/redis-3.0.2.gem +0 -0
  17. data/vendor/bundle/cache/rspec-2.12.0.gem +0 -0
  18. data/vendor/bundle/cache/rspec-core-2.12.2.gem +0 -0
  19. data/vendor/bundle/cache/rspec-expectations-2.12.1.gem +0 -0
  20. data/vendor/bundle/cache/rspec-mocks-2.12.2.gem +0 -0
  21. data/vendor/bundle/gems/diff-lcs-1.1.3/History.rdoc +54 -0
  22. data/vendor/bundle/gems/diff-lcs-1.1.3/License.rdoc +38 -0
  23. data/vendor/bundle/gems/diff-lcs-1.1.3/Manifest.txt +27 -0
  24. data/vendor/bundle/gems/diff-lcs-1.1.3/README.rdoc +72 -0
  25. data/vendor/bundle/gems/diff-lcs-1.1.3/Rakefile +26 -0
  26. data/vendor/bundle/gems/diff-lcs-1.1.3/bin/htmldiff +32 -0
  27. data/vendor/bundle/gems/diff-lcs-1.1.3/bin/ldiff +6 -0
  28. data/vendor/bundle/gems/diff-lcs-1.1.3/diff-lcs.gemspec +51 -0
  29. data/vendor/bundle/gems/diff-lcs-1.1.3/docs/COPYING.txt +340 -0
  30. data/vendor/bundle/gems/diff-lcs-1.1.3/docs/artistic.html +289 -0
  31. data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/array.rb +21 -0
  32. data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/block.rb +51 -0
  33. data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/callbacks.rb +322 -0
  34. data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/change.rb +169 -0
  35. data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/htmldiff.rb +151 -0
  36. data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/hunk.rb +242 -0
  37. data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/ldiff.rb +210 -0
  38. data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/string.rb +19 -0
  39. data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs.rb +1105 -0
  40. data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff-lcs.rb +5 -0
  41. data/vendor/bundle/gems/diff-lcs-1.1.3/spec/diff_spec.rb +35 -0
  42. data/vendor/bundle/gems/diff-lcs-1.1.3/spec/lcs_spec.rb +36 -0
  43. data/vendor/bundle/gems/diff-lcs-1.1.3/spec/patch_spec.rb +390 -0
  44. data/vendor/bundle/gems/diff-lcs-1.1.3/spec/sdiff_spec.rb +204 -0
  45. data/vendor/bundle/gems/diff-lcs-1.1.3/spec/spec_helper.rb +284 -0
  46. data/vendor/bundle/gems/diff-lcs-1.1.3/spec/traverse_balanced_spec.rb +286 -0
  47. data/vendor/bundle/gems/diff-lcs-1.1.3/spec/traverse_sequences_spec.rb +83 -0
  48. data/vendor/bundle/gems/hiredis-0.4.5/COPYING +28 -0
  49. data/vendor/bundle/gems/hiredis-0.4.5/Rakefile +45 -0
  50. data/vendor/bundle/gems/hiredis-0.4.5/ext/hiredis_ext/Makefile +213 -0
  51. data/vendor/bundle/gems/hiredis-0.4.5/ext/hiredis_ext/connection.c +472 -0
  52. data/vendor/bundle/gems/hiredis-0.4.5/ext/hiredis_ext/connection.o +0 -0
  53. data/vendor/bundle/gems/hiredis-0.4.5/ext/hiredis_ext/extconf.rb +17 -0
  54. data/vendor/bundle/gems/hiredis-0.4.5/ext/hiredis_ext/hiredis_ext.bundle +0 -0
  55. data/vendor/bundle/gems/hiredis-0.4.5/ext/hiredis_ext/hiredis_ext.c +13 -0
  56. data/vendor/bundle/gems/hiredis-0.4.5/ext/hiredis_ext/hiredis_ext.h +37 -0
  57. data/vendor/bundle/gems/hiredis-0.4.5/ext/hiredis_ext/hiredis_ext.o +0 -0
  58. data/vendor/bundle/gems/hiredis-0.4.5/ext/hiredis_ext/reader.c +114 -0
  59. data/vendor/bundle/gems/hiredis-0.4.5/ext/hiredis_ext/reader.o +0 -0
  60. data/vendor/bundle/gems/hiredis-0.4.5/lib/hiredis/connection.rb +10 -0
  61. data/vendor/bundle/gems/hiredis-0.4.5/lib/hiredis/errors.rb +5 -0
  62. data/vendor/bundle/gems/hiredis-0.4.5/lib/hiredis/ext/connection.rb +29 -0
  63. data/vendor/bundle/gems/hiredis-0.4.5/lib/hiredis/ext/hiredis_ext.bundle +0 -0
  64. data/vendor/bundle/gems/hiredis-0.4.5/lib/hiredis/ext/reader.rb +2 -0
  65. data/vendor/bundle/gems/hiredis-0.4.5/lib/hiredis/reader.rb +10 -0
  66. data/vendor/bundle/gems/hiredis-0.4.5/lib/hiredis/ruby/connection.rb +298 -0
  67. data/vendor/bundle/gems/hiredis-0.4.5/lib/hiredis/ruby/reader.rb +183 -0
  68. data/vendor/bundle/gems/hiredis-0.4.5/lib/hiredis/version.rb +3 -0
  69. data/vendor/bundle/gems/hiredis-0.4.5/lib/hiredis.rb +2 -0
  70. data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/COPYING +29 -0
  71. data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/Makefile +148 -0
  72. data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/async.c +604 -0
  73. data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/async.h +125 -0
  74. data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/async.o +0 -0
  75. data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/dict.c +338 -0
  76. data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/dict.h +126 -0
  77. data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/fmacros.h +16 -0
  78. data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/hiredis.c +1283 -0
  79. data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/hiredis.h +204 -0
  80. data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/hiredis.o +0 -0
  81. data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/libhiredis.a +0 -0
  82. data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/net.c +279 -0
  83. data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/net.h +47 -0
  84. data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/net.o +0 -0
  85. data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/sds.c +605 -0
  86. data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/sds.h +88 -0
  87. data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/sds.o +0 -0
  88. data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/test.c +653 -0
  89. data/vendor/bundle/gems/multi_json-1.6.1/CHANGELOG.md +121 -0
  90. data/vendor/bundle/gems/multi_json-1.6.1/CONTRIBUTING.md +46 -0
  91. data/vendor/bundle/gems/multi_json-1.6.1/Gemfile +31 -0
  92. data/vendor/bundle/gems/multi_json-1.6.1/LICENSE.md +20 -0
  93. data/vendor/bundle/gems/multi_json-1.6.1/README.md +105 -0
  94. data/vendor/bundle/gems/multi_json-1.6.1/Rakefile +12 -0
  95. data/vendor/bundle/gems/multi_json-1.6.1/lib/multi_json/adapters/gson.rb +20 -0
  96. data/vendor/bundle/gems/multi_json-1.6.1/lib/multi_json/adapters/json_common.rb +35 -0
  97. data/vendor/bundle/gems/multi_json-1.6.1/lib/multi_json/adapters/json_gem.rb +12 -0
  98. data/vendor/bundle/gems/multi_json-1.6.1/lib/multi_json/adapters/json_pure.rb +12 -0
  99. data/vendor/bundle/gems/multi_json-1.6.1/lib/multi_json/adapters/nsjsonserialization.rb +35 -0
  100. data/vendor/bundle/gems/multi_json-1.6.1/lib/multi_json/adapters/oj.rb +29 -0
  101. data/vendor/bundle/gems/multi_json-1.6.1/lib/multi_json/adapters/ok_json.rb +58 -0
  102. data/vendor/bundle/gems/multi_json-1.6.1/lib/multi_json/adapters/yajl.rb +20 -0
  103. data/vendor/bundle/gems/multi_json-1.6.1/lib/multi_json/vendor/okjson.rb +602 -0
  104. data/vendor/bundle/gems/multi_json-1.6.1/lib/multi_json/version.rb +3 -0
  105. data/vendor/bundle/gems/multi_json-1.6.1/lib/multi_json.rb +137 -0
  106. data/vendor/bundle/gems/multi_json-1.6.1/multi_json.gemspec +22 -0
  107. data/vendor/bundle/gems/multi_json-1.6.1/spec/adapter_shared_example.rb +162 -0
  108. data/vendor/bundle/gems/multi_json-1.6.1/spec/helper.rb +45 -0
  109. data/vendor/bundle/gems/multi_json-1.6.1/spec/json_common_shared_example.rb +36 -0
  110. data/vendor/bundle/gems/multi_json-1.6.1/spec/multi_json_spec.rb +151 -0
  111. data/vendor/bundle/gems/rake-10.0.3/CHANGES +526 -0
  112. data/vendor/bundle/gems/rake-10.0.3/MIT-LICENSE +21 -0
  113. data/vendor/bundle/gems/rake-10.0.3/README.rdoc +187 -0
  114. data/vendor/bundle/gems/rake-10.0.3/Rakefile +374 -0
  115. data/vendor/bundle/gems/rake-10.0.3/TODO +21 -0
  116. data/vendor/bundle/gems/rake-10.0.3/bin/rake +33 -0
  117. data/vendor/bundle/gems/rake-10.0.3/doc/command_line_usage.rdoc +152 -0
  118. data/vendor/bundle/gems/rake-10.0.3/doc/example/Rakefile1 +38 -0
  119. data/vendor/bundle/gems/rake-10.0.3/doc/example/Rakefile2 +35 -0
  120. data/vendor/bundle/gems/rake-10.0.3/doc/example/a.c +6 -0
  121. data/vendor/bundle/gems/rake-10.0.3/doc/example/b.c +6 -0
  122. data/vendor/bundle/gems/rake-10.0.3/doc/example/main.c +11 -0
  123. data/vendor/bundle/gems/rake-10.0.3/doc/glossary.rdoc +51 -0
  124. data/vendor/bundle/gems/rake-10.0.3/doc/jamis.rb +591 -0
  125. data/vendor/bundle/gems/rake-10.0.3/doc/proto_rake.rdoc +127 -0
  126. data/vendor/bundle/gems/rake-10.0.3/doc/rake.1.gz +0 -0
  127. data/vendor/bundle/gems/rake-10.0.3/doc/rakefile.rdoc +557 -0
  128. data/vendor/bundle/gems/rake-10.0.3/doc/rational.rdoc +151 -0
  129. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.4.14.rdoc +23 -0
  130. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.4.15.rdoc +35 -0
  131. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.5.0.rdoc +53 -0
  132. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.5.3.rdoc +78 -0
  133. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.5.4.rdoc +46 -0
  134. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.6.0.rdoc +141 -0
  135. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.7.0.rdoc +119 -0
  136. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.7.1.rdoc +59 -0
  137. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.7.2.rdoc +121 -0
  138. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.7.3.rdoc +47 -0
  139. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.8.0.rdoc +114 -0
  140. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.8.2.rdoc +165 -0
  141. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.8.3.rdoc +112 -0
  142. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.8.4.rdoc +147 -0
  143. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.8.5.rdoc +53 -0
  144. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.8.6.rdoc +55 -0
  145. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.8.7.rdoc +55 -0
  146. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.9.0.rdoc +112 -0
  147. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.9.1.rdoc +52 -0
  148. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
  149. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.9.2.rdoc +49 -0
  150. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.9.3.rdoc +102 -0
  151. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.9.4.rdoc +110 -0
  152. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.9.5.rdoc +114 -0
  153. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.9.6.rdoc +127 -0
  154. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-10.0.0.rdoc +178 -0
  155. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-10.0.1.rdoc +187 -0
  156. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-10.0.2.rdoc +191 -0
  157. data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-10.0.3.rdoc +191 -0
  158. data/vendor/bundle/gems/rake-10.0.3/install.rb +90 -0
  159. data/vendor/bundle/gems/rake-10.0.3/lib/rake/alt_system.rb +109 -0
  160. data/vendor/bundle/gems/rake-10.0.3/lib/rake/application.rb +669 -0
  161. data/vendor/bundle/gems/rake-10.0.3/lib/rake/backtrace.rb +18 -0
  162. data/vendor/bundle/gems/rake-10.0.3/lib/rake/clean.rb +32 -0
  163. data/vendor/bundle/gems/rake-10.0.3/lib/rake/cloneable.rb +16 -0
  164. data/vendor/bundle/gems/rake-10.0.3/lib/rake/contrib/compositepublisher.rb +21 -0
  165. data/vendor/bundle/gems/rake-10.0.3/lib/rake/contrib/ftptools.rb +151 -0
  166. data/vendor/bundle/gems/rake-10.0.3/lib/rake/contrib/publisher.rb +73 -0
  167. data/vendor/bundle/gems/rake-10.0.3/lib/rake/contrib/rubyforgepublisher.rb +16 -0
  168. data/vendor/bundle/gems/rake-10.0.3/lib/rake/contrib/sshpublisher.rb +50 -0
  169. data/vendor/bundle/gems/rake-10.0.3/lib/rake/contrib/sys.rb +1 -0
  170. data/vendor/bundle/gems/rake-10.0.3/lib/rake/default_loader.rb +10 -0
  171. data/vendor/bundle/gems/rake-10.0.3/lib/rake/dsl_definition.rb +156 -0
  172. data/vendor/bundle/gems/rake-10.0.3/lib/rake/early_time.rb +18 -0
  173. data/vendor/bundle/gems/rake-10.0.3/lib/rake/ext/core.rb +27 -0
  174. data/vendor/bundle/gems/rake-10.0.3/lib/rake/ext/module.rb +0 -0
  175. data/vendor/bundle/gems/rake-10.0.3/lib/rake/ext/string.rb +168 -0
  176. data/vendor/bundle/gems/rake-10.0.3/lib/rake/ext/time.rb +15 -0
  177. data/vendor/bundle/gems/rake-10.0.3/lib/rake/file_creation_task.rb +24 -0
  178. data/vendor/bundle/gems/rake-10.0.3/lib/rake/file_list.rb +410 -0
  179. data/vendor/bundle/gems/rake-10.0.3/lib/rake/file_task.rb +47 -0
  180. data/vendor/bundle/gems/rake-10.0.3/lib/rake/file_utils.rb +114 -0
  181. data/vendor/bundle/gems/rake-10.0.3/lib/rake/file_utils_ext.rb +146 -0
  182. data/vendor/bundle/gems/rake-10.0.3/lib/rake/gempackagetask.rb +1 -0
  183. data/vendor/bundle/gems/rake-10.0.3/lib/rake/invocation_chain.rb +51 -0
  184. data/vendor/bundle/gems/rake-10.0.3/lib/rake/invocation_exception_mixin.rb +16 -0
  185. data/vendor/bundle/gems/rake-10.0.3/lib/rake/loaders/makefile.rb +40 -0
  186. data/vendor/bundle/gems/rake-10.0.3/lib/rake/multi_task.rb +13 -0
  187. data/vendor/bundle/gems/rake-10.0.3/lib/rake/name_space.rb +25 -0
  188. data/vendor/bundle/gems/rake-10.0.3/lib/rake/packagetask.rb +185 -0
  189. data/vendor/bundle/gems/rake-10.0.3/lib/rake/pathmap.rb +1 -0
  190. data/vendor/bundle/gems/rake-10.0.3/lib/rake/phony.rb +15 -0
  191. data/vendor/bundle/gems/rake-10.0.3/lib/rake/private_reader.rb +20 -0
  192. data/vendor/bundle/gems/rake-10.0.3/lib/rake/promise.rb +99 -0
  193. data/vendor/bundle/gems/rake-10.0.3/lib/rake/pseudo_status.rb +24 -0
  194. data/vendor/bundle/gems/rake-10.0.3/lib/rake/rake_module.rb +37 -0
  195. data/vendor/bundle/gems/rake-10.0.3/lib/rake/rake_test_loader.rb +22 -0
  196. data/vendor/bundle/gems/rake-10.0.3/lib/rake/rdoctask.rb +1 -0
  197. data/vendor/bundle/gems/rake-10.0.3/lib/rake/ruby182_test_unit_fix.rb +25 -0
  198. data/vendor/bundle/gems/rake-10.0.3/lib/rake/rule_recursion_overflow_error.rb +20 -0
  199. data/vendor/bundle/gems/rake-10.0.3/lib/rake/runtest.rb +22 -0
  200. data/vendor/bundle/gems/rake-10.0.3/lib/rake/task.rb +350 -0
  201. data/vendor/bundle/gems/rake-10.0.3/lib/rake/task_argument_error.rb +7 -0
  202. data/vendor/bundle/gems/rake-10.0.3/lib/rake/task_arguments.rb +78 -0
  203. data/vendor/bundle/gems/rake-10.0.3/lib/rake/task_manager.rb +296 -0
  204. data/vendor/bundle/gems/rake-10.0.3/lib/rake/tasklib.rb +22 -0
  205. data/vendor/bundle/gems/rake-10.0.3/lib/rake/testtask.rb +198 -0
  206. data/vendor/bundle/gems/rake-10.0.3/lib/rake/thread_history_display.rb +48 -0
  207. data/vendor/bundle/gems/rake-10.0.3/lib/rake/thread_pool.rb +155 -0
  208. data/vendor/bundle/gems/rake-10.0.3/lib/rake/trace_output.rb +19 -0
  209. data/vendor/bundle/gems/rake-10.0.3/lib/rake/version.rb +13 -0
  210. data/vendor/bundle/gems/rake-10.0.3/lib/rake/win32.rb +55 -0
  211. data/vendor/bundle/gems/rake-10.0.3/lib/rake.rb +71 -0
  212. data/vendor/bundle/gems/rake-10.0.3/test/file_creation.rb +34 -0
  213. data/vendor/bundle/gems/rake-10.0.3/test/helper.rb +562 -0
  214. data/vendor/bundle/gems/rake-10.0.3/test/test_private_reader.rb +42 -0
  215. data/vendor/bundle/gems/rake-10.0.3/test/test_rake.rb +40 -0
  216. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_application.rb +515 -0
  217. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_application_options.rb +443 -0
  218. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_backtrace.rb +89 -0
  219. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_clean.rb +14 -0
  220. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_definitions.rb +80 -0
  221. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_directory_task.rb +57 -0
  222. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_dsl.rb +40 -0
  223. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_early_time.rb +31 -0
  224. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_extension.rb +59 -0
  225. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_file_creation_task.rb +56 -0
  226. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_file_list.rb +628 -0
  227. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_file_list_path_map.rb +8 -0
  228. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_file_task.rb +122 -0
  229. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_file_utils.rb +305 -0
  230. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_ftp_file.rb +59 -0
  231. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_functional.rb +496 -0
  232. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_invocation_chain.rb +52 -0
  233. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_makefile_loader.rb +44 -0
  234. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_multi_task.rb +59 -0
  235. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_name_space.rb +43 -0
  236. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_package_task.rb +79 -0
  237. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_path_map.rb +157 -0
  238. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_path_map_explode.rb +34 -0
  239. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_path_map_partial.rb +18 -0
  240. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_pseudo_status.rb +21 -0
  241. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_rake_test_loader.rb +21 -0
  242. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_reduce_compat.rb +30 -0
  243. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_require.rb +40 -0
  244. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_rules.rb +327 -0
  245. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_task.rb +316 -0
  246. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_task_argument_parsing.rb +103 -0
  247. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_task_arguments.rb +88 -0
  248. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_task_lib.rb +9 -0
  249. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_task_manager.rb +157 -0
  250. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_task_manager_argument_resolution.rb +19 -0
  251. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_task_with_arguments.rb +171 -0
  252. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_test_task.rb +120 -0
  253. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_thread_pool.rb +123 -0
  254. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_top_level_functions.rb +71 -0
  255. data/vendor/bundle/gems/rake-10.0.3/test/test_rake_win32.rb +72 -0
  256. data/vendor/bundle/gems/rake-10.0.3/test/test_thread_history_display.rb +91 -0
  257. data/vendor/bundle/gems/rake-10.0.3/test/test_trace_output.rb +43 -0
  258. data/vendor/bundle/gems/redis-3.0.2/CHANGELOG.md +238 -0
  259. data/vendor/bundle/gems/redis-3.0.2/LICENSE +20 -0
  260. data/vendor/bundle/gems/redis-3.0.2/README.md +232 -0
  261. data/vendor/bundle/gems/redis-3.0.2/Rakefile +392 -0
  262. data/vendor/bundle/gems/redis-3.0.2/benchmarking/logging.rb +62 -0
  263. data/vendor/bundle/gems/redis-3.0.2/benchmarking/pipeline.rb +51 -0
  264. data/vendor/bundle/gems/redis-3.0.2/benchmarking/speed.rb +21 -0
  265. data/vendor/bundle/gems/redis-3.0.2/benchmarking/suite.rb +24 -0
  266. data/vendor/bundle/gems/redis-3.0.2/benchmarking/worker.rb +71 -0
  267. data/vendor/bundle/gems/redis-3.0.2/examples/basic.rb +15 -0
  268. data/vendor/bundle/gems/redis-3.0.2/examples/dist_redis.rb +43 -0
  269. data/vendor/bundle/gems/redis-3.0.2/examples/incr-decr.rb +17 -0
  270. data/vendor/bundle/gems/redis-3.0.2/examples/list.rb +26 -0
  271. data/vendor/bundle/gems/redis-3.0.2/examples/pubsub.rb +37 -0
  272. data/vendor/bundle/gems/redis-3.0.2/examples/sets.rb +36 -0
  273. data/vendor/bundle/gems/redis-3.0.2/examples/unicorn/config.ru +3 -0
  274. data/vendor/bundle/gems/redis-3.0.2/examples/unicorn/unicorn.rb +20 -0
  275. data/vendor/bundle/gems/redis-3.0.2/lib/redis/client.rb +401 -0
  276. data/vendor/bundle/gems/redis-3.0.2/lib/redis/connection/command_helper.rb +44 -0
  277. data/vendor/bundle/gems/redis-3.0.2/lib/redis/connection/hiredis.rb +63 -0
  278. data/vendor/bundle/gems/redis-3.0.2/lib/redis/connection/registry.rb +12 -0
  279. data/vendor/bundle/gems/redis-3.0.2/lib/redis/connection/ruby.rb +285 -0
  280. data/vendor/bundle/gems/redis-3.0.2/lib/redis/connection/synchrony.rb +124 -0
  281. data/vendor/bundle/gems/redis-3.0.2/lib/redis/connection.rb +9 -0
  282. data/vendor/bundle/gems/redis-3.0.2/lib/redis/distributed.rb +816 -0
  283. data/vendor/bundle/gems/redis-3.0.2/lib/redis/errors.rb +40 -0
  284. data/vendor/bundle/gems/redis-3.0.2/lib/redis/hash_ring.rb +131 -0
  285. data/vendor/bundle/gems/redis-3.0.2/lib/redis/pipeline.rb +130 -0
  286. data/vendor/bundle/gems/redis-3.0.2/lib/redis/subscribe.rb +79 -0
  287. data/vendor/bundle/gems/redis-3.0.2/lib/redis/version.rb +3 -0
  288. data/vendor/bundle/gems/redis-3.0.2/lib/redis.rb +2233 -0
  289. data/vendor/bundle/gems/redis-3.0.2/redis.gemspec +41 -0
  290. data/vendor/bundle/gems/redis-3.0.2/test/blocking_commands_test.rb +42 -0
  291. data/vendor/bundle/gems/redis-3.0.2/test/command_map_test.rb +30 -0
  292. data/vendor/bundle/gems/redis-3.0.2/test/commands_on_hashes_test.rb +21 -0
  293. data/vendor/bundle/gems/redis-3.0.2/test/commands_on_lists_test.rb +20 -0
  294. data/vendor/bundle/gems/redis-3.0.2/test/commands_on_sets_test.rb +77 -0
  295. data/vendor/bundle/gems/redis-3.0.2/test/commands_on_sorted_sets_test.rb +109 -0
  296. data/vendor/bundle/gems/redis-3.0.2/test/commands_on_strings_test.rb +83 -0
  297. data/vendor/bundle/gems/redis-3.0.2/test/commands_on_value_types_test.rb +99 -0
  298. data/vendor/bundle/gems/redis-3.0.2/test/connection_handling_test.rb +189 -0
  299. data/vendor/bundle/gems/redis-3.0.2/test/distributed_blocking_commands_test.rb +46 -0
  300. data/vendor/bundle/gems/redis-3.0.2/test/distributed_commands_on_hashes_test.rb +10 -0
  301. data/vendor/bundle/gems/redis-3.0.2/test/distributed_commands_on_lists_test.rb +22 -0
  302. data/vendor/bundle/gems/redis-3.0.2/test/distributed_commands_on_sets_test.rb +83 -0
  303. data/vendor/bundle/gems/redis-3.0.2/test/distributed_commands_on_sorted_sets_test.rb +18 -0
  304. data/vendor/bundle/gems/redis-3.0.2/test/distributed_commands_on_strings_test.rb +48 -0
  305. data/vendor/bundle/gems/redis-3.0.2/test/distributed_commands_on_value_types_test.rb +87 -0
  306. data/vendor/bundle/gems/redis-3.0.2/test/distributed_commands_requiring_clustering_test.rb +148 -0
  307. data/vendor/bundle/gems/redis-3.0.2/test/distributed_connection_handling_test.rb +23 -0
  308. data/vendor/bundle/gems/redis-3.0.2/test/distributed_internals_test.rb +41 -0
  309. data/vendor/bundle/gems/redis-3.0.2/test/distributed_key_tags_test.rb +52 -0
  310. data/vendor/bundle/gems/redis-3.0.2/test/distributed_persistence_control_commands_test.rb +26 -0
  311. data/vendor/bundle/gems/redis-3.0.2/test/distributed_publish_subscribe_test.rb +92 -0
  312. data/vendor/bundle/gems/redis-3.0.2/test/distributed_remote_server_control_commands_test.rb +66 -0
  313. data/vendor/bundle/gems/redis-3.0.2/test/distributed_scripting_test.rb +102 -0
  314. data/vendor/bundle/gems/redis-3.0.2/test/distributed_sorting_test.rb +20 -0
  315. data/vendor/bundle/gems/redis-3.0.2/test/distributed_test.rb +58 -0
  316. data/vendor/bundle/gems/redis-3.0.2/test/distributed_transactions_test.rb +32 -0
  317. data/vendor/bundle/gems/redis-3.0.2/test/encoding_test.rb +18 -0
  318. data/vendor/bundle/gems/redis-3.0.2/test/error_replies_test.rb +59 -0
  319. data/vendor/bundle/gems/redis-3.0.2/test/helper.rb +194 -0
  320. data/vendor/bundle/gems/redis-3.0.2/test/helper_test.rb +22 -0
  321. data/vendor/bundle/gems/redis-3.0.2/test/internals_test.rb +301 -0
  322. data/vendor/bundle/gems/redis-3.0.2/test/lint/blocking_commands.rb +124 -0
  323. data/vendor/bundle/gems/redis-3.0.2/test/lint/hashes.rb +162 -0
  324. data/vendor/bundle/gems/redis-3.0.2/test/lint/lists.rb +143 -0
  325. data/vendor/bundle/gems/redis-3.0.2/test/lint/sets.rb +96 -0
  326. data/vendor/bundle/gems/redis-3.0.2/test/lint/sorted_sets.rb +238 -0
  327. data/vendor/bundle/gems/redis-3.0.2/test/lint/strings.rb +157 -0
  328. data/vendor/bundle/gems/redis-3.0.2/test/lint/value_types.rb +106 -0
  329. data/vendor/bundle/gems/redis-3.0.2/test/persistence_control_commands_test.rb +26 -0
  330. data/vendor/bundle/gems/redis-3.0.2/test/pipelining_commands_test.rb +195 -0
  331. data/vendor/bundle/gems/redis-3.0.2/test/publish_subscribe_test.rb +153 -0
  332. data/vendor/bundle/gems/redis-3.0.2/test/remote_server_control_commands_test.rb +117 -0
  333. data/vendor/bundle/gems/redis-3.0.2/test/scripting_test.rb +78 -0
  334. data/vendor/bundle/gems/redis-3.0.2/test/sorting_test.rb +45 -0
  335. data/vendor/bundle/gems/redis-3.0.2/test/support/connection/hiredis.rb +1 -0
  336. data/vendor/bundle/gems/redis-3.0.2/test/support/connection/ruby.rb +1 -0
  337. data/vendor/bundle/gems/redis-3.0.2/test/support/connection/synchrony.rb +17 -0
  338. data/vendor/bundle/gems/redis-3.0.2/test/support/redis_mock.rb +110 -0
  339. data/vendor/bundle/gems/redis-3.0.2/test/support/wire/synchrony.rb +24 -0
  340. data/vendor/bundle/gems/redis-3.0.2/test/support/wire/thread.rb +5 -0
  341. data/vendor/bundle/gems/redis-3.0.2/test/synchrony_driver.rb +88 -0
  342. data/vendor/bundle/gems/redis-3.0.2/test/test.conf +9 -0
  343. data/vendor/bundle/gems/redis-3.0.2/test/thread_safety_test.rb +32 -0
  344. data/vendor/bundle/gems/redis-3.0.2/test/transactions_test.rb +260 -0
  345. data/vendor/bundle/gems/redis-3.0.2/test/unknown_commands_test.rb +14 -0
  346. data/vendor/bundle/gems/redis-3.0.2/test/url_param_test.rb +132 -0
  347. data/vendor/bundle/gems/rspec-2.12.0/License.txt +24 -0
  348. data/vendor/bundle/gems/rspec-2.12.0/README.md +47 -0
  349. data/vendor/bundle/gems/rspec-2.12.0/lib/rspec/version.rb +5 -0
  350. data/vendor/bundle/gems/rspec-2.12.0/lib/rspec.rb +4 -0
  351. data/vendor/bundle/gems/rspec-core-2.12.2/Changelog.md +655 -0
  352. data/vendor/bundle/gems/rspec-core-2.12.2/License.txt +24 -0
  353. data/vendor/bundle/gems/rspec-core-2.12.2/README.md +257 -0
  354. data/vendor/bundle/gems/rspec-core-2.12.2/exe/autospec +13 -0
  355. data/vendor/bundle/gems/rspec-core-2.12.2/exe/rspec +25 -0
  356. data/vendor/bundle/gems/rspec-core-2.12.2/features/Autotest.md +38 -0
  357. data/vendor/bundle/gems/rspec-core-2.12.2/features/README.md +17 -0
  358. data/vendor/bundle/gems/rspec-core-2.12.2/features/Upgrade.md +364 -0
  359. data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/README.md +28 -0
  360. data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/example_name_option.feature +101 -0
  361. data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/exit_status.feature +82 -0
  362. data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/format_option.feature +81 -0
  363. data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/init.feature +18 -0
  364. data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/line_number_appended_to_path.feature +140 -0
  365. data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/line_number_option.feature +58 -0
  366. data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/order.feature +29 -0
  367. data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/pattern_option.feature +31 -0
  368. data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/rake_task.feature +122 -0
  369. data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/ruby.feature +22 -0
  370. data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/tag.feature +91 -0
  371. data/vendor/bundle/gems/rspec-core-2.12.2/features/configuration/alias_example_to.feature +48 -0
  372. data/vendor/bundle/gems/rspec-core-2.12.2/features/configuration/custom_settings.feature +84 -0
  373. data/vendor/bundle/gems/rspec-core-2.12.2/features/configuration/default_path.feature +38 -0
  374. data/vendor/bundle/gems/rspec-core-2.12.2/features/configuration/fail_fast.feature +77 -0
  375. data/vendor/bundle/gems/rspec-core-2.12.2/features/configuration/read_options_from_file.feature +87 -0
  376. data/vendor/bundle/gems/rspec-core-2.12.2/features/example_groups/basic_structure.feature +55 -0
  377. data/vendor/bundle/gems/rspec-core-2.12.2/features/example_groups/shared_context.feature +74 -0
  378. data/vendor/bundle/gems/rspec-core-2.12.2/features/example_groups/shared_examples.feature +222 -0
  379. data/vendor/bundle/gems/rspec-core-2.12.2/features/expectation_framework_integration/configure_expectation_framework.feature +102 -0
  380. data/vendor/bundle/gems/rspec-core-2.12.2/features/filtering/exclusion_filters.feature +139 -0
  381. data/vendor/bundle/gems/rspec-core-2.12.2/features/filtering/if_and_unless.feature +168 -0
  382. data/vendor/bundle/gems/rspec-core-2.12.2/features/filtering/inclusion_filters.feature +105 -0
  383. data/vendor/bundle/gems/rspec-core-2.12.2/features/filtering/run_all_when_everything_filtered.feature +46 -0
  384. data/vendor/bundle/gems/rspec-core-2.12.2/features/formatters/custom_formatter.feature +36 -0
  385. data/vendor/bundle/gems/rspec-core-2.12.2/features/formatters/json_formatter.feature +30 -0
  386. data/vendor/bundle/gems/rspec-core-2.12.2/features/formatters/text_formatter.feature +46 -0
  387. data/vendor/bundle/gems/rspec-core-2.12.2/features/helper_methods/arbitrary_methods.feature +40 -0
  388. data/vendor/bundle/gems/rspec-core-2.12.2/features/helper_methods/let.feature +50 -0
  389. data/vendor/bundle/gems/rspec-core-2.12.2/features/helper_methods/modules.feature +149 -0
  390. data/vendor/bundle/gems/rspec-core-2.12.2/features/hooks/around_hooks.feature +343 -0
  391. data/vendor/bundle/gems/rspec-core-2.12.2/features/hooks/before_and_after_hooks.feature +427 -0
  392. data/vendor/bundle/gems/rspec-core-2.12.2/features/hooks/filtering.feature +234 -0
  393. data/vendor/bundle/gems/rspec-core-2.12.2/features/metadata/current_example.feature +17 -0
  394. data/vendor/bundle/gems/rspec-core-2.12.2/features/metadata/described_class.feature +17 -0
  395. data/vendor/bundle/gems/rspec-core-2.12.2/features/metadata/user_defined.feature +113 -0
  396. data/vendor/bundle/gems/rspec-core-2.12.2/features/mock_framework_integration/use_any_framework.feature +106 -0
  397. data/vendor/bundle/gems/rspec-core-2.12.2/features/mock_framework_integration/use_flexmock.feature +96 -0
  398. data/vendor/bundle/gems/rspec-core-2.12.2/features/mock_framework_integration/use_mocha.feature +97 -0
  399. data/vendor/bundle/gems/rspec-core-2.12.2/features/mock_framework_integration/use_rr.feature +98 -0
  400. data/vendor/bundle/gems/rspec-core-2.12.2/features/mock_framework_integration/use_rspec.feature +97 -0
  401. data/vendor/bundle/gems/rspec-core-2.12.2/features/pending/pending_examples.feature +229 -0
  402. data/vendor/bundle/gems/rspec-core-2.12.2/features/spec_files/arbitrary_file_suffix.feature +13 -0
  403. data/vendor/bundle/gems/rspec-core-2.12.2/features/step_definitions/additional_cli_steps.rb +32 -0
  404. data/vendor/bundle/gems/rspec-core-2.12.2/features/subject/attribute_of_subject.feature +124 -0
  405. data/vendor/bundle/gems/rspec-core-2.12.2/features/subject/explicit_subject.feature +82 -0
  406. data/vendor/bundle/gems/rspec-core-2.12.2/features/subject/implicit_receiver.feature +29 -0
  407. data/vendor/bundle/gems/rspec-core-2.12.2/features/subject/implicit_subject.feature +63 -0
  408. data/vendor/bundle/gems/rspec-core-2.12.2/features/support/env.rb +12 -0
  409. data/vendor/bundle/gems/rspec-core-2.12.2/lib/autotest/discover.rb +1 -0
  410. data/vendor/bundle/gems/rspec-core-2.12.2/lib/autotest/rspec2.rb +73 -0
  411. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/autorun.rb +2 -0
  412. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/backward_compatibility.rb +65 -0
  413. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/command_line.rb +36 -0
  414. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/configuration.rb +1057 -0
  415. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/configuration_options.rb +144 -0
  416. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/deprecation.rb +36 -0
  417. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/drb_command_line.rb +26 -0
  418. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/drb_options.rb +87 -0
  419. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/dsl.rb +26 -0
  420. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/example.rb +331 -0
  421. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/example_group.rb +476 -0
  422. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/extensions/instance_eval_with_args.rb +44 -0
  423. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/extensions/kernel.rb +9 -0
  424. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/extensions/module_eval_with_args.rb +38 -0
  425. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/extensions/ordered.rb +27 -0
  426. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/filter_manager.rb +203 -0
  427. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/formatters/base_formatter.rb +237 -0
  428. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/formatters/base_text_formatter.rb +225 -0
  429. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/formatters/documentation_formatter.rb +67 -0
  430. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/formatters/helpers.rb +103 -0
  431. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/formatters/html_formatter.rb +154 -0
  432. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/formatters/html_printer.rb +407 -0
  433. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/formatters/json_formatter.rb +73 -0
  434. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/formatters/progress_formatter.rb +32 -0
  435. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/formatters/snippet_extractor.rb +92 -0
  436. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/formatters/text_mate_formatter.rb +34 -0
  437. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/formatters.rb +55 -0
  438. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/hooks.rb +495 -0
  439. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/let.rb +110 -0
  440. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/load_path.rb +3 -0
  441. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/metadata.rb +293 -0
  442. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/metadata_hash_builder.rb +97 -0
  443. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/mocking/with_absolutely_nothing.rb +11 -0
  444. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/mocking/with_flexmock.rb +27 -0
  445. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/mocking/with_mocha.rb +52 -0
  446. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/mocking/with_rr.rb +27 -0
  447. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/mocking/with_rspec.rb +27 -0
  448. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/option_parser.rb +202 -0
  449. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/pending.rb +101 -0
  450. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/project_initializer.rb +86 -0
  451. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/rake_task.rb +202 -0
  452. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/reporter.rb +102 -0
  453. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/ruby_project.rb +44 -0
  454. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/runner.rb +87 -0
  455. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/shared_context.rb +49 -0
  456. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/shared_example_group.rb +144 -0
  457. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/subject.rb +223 -0
  458. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/version.rb +7 -0
  459. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/world.rb +128 -0
  460. data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core.rb +147 -0
  461. data/vendor/bundle/gems/rspec-core-2.12.2/spec/autotest/discover_spec.rb +19 -0
  462. data/vendor/bundle/gems/rspec-core-2.12.2/spec/autotest/failed_results_re_spec.rb +45 -0
  463. data/vendor/bundle/gems/rspec-core-2.12.2/spec/autotest/rspec_spec.rb +128 -0
  464. data/vendor/bundle/gems/rspec-core-2.12.2/spec/command_line/order_spec.rb +204 -0
  465. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/command_line_spec.rb +108 -0
  466. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/command_line_spec_output.txt +0 -0
  467. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/configuration_options_spec.rb +384 -0
  468. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/configuration_spec.rb +1371 -0
  469. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/deprecations_spec.rb +75 -0
  470. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/drb_command_line_spec.rb +102 -0
  471. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/drb_options_spec.rb +180 -0
  472. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/dsl_spec.rb +25 -0
  473. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/example_group_spec.rb +1144 -0
  474. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/example_spec.rb +402 -0
  475. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/filter_manager_spec.rb +246 -0
  476. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/base_formatter_spec.rb +108 -0
  477. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/base_text_formatter_spec.rb +367 -0
  478. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/documentation_formatter_spec.rb +88 -0
  479. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/helpers_spec.rb +78 -0
  480. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/html_formatted-1.8.7-jruby.html +410 -0
  481. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/html_formatted-1.8.7-rbx.html +462 -0
  482. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/html_formatted-1.8.7.html +409 -0
  483. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/html_formatted-1.9.2-jruby.html +410 -0
  484. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/html_formatted-1.9.2.html +416 -0
  485. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/html_formatted-1.9.3-jruby.html +410 -0
  486. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/html_formatted-1.9.3-rbx.html +462 -0
  487. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/html_formatted-1.9.3.html +416 -0
  488. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/html_formatter_spec.rb +90 -0
  489. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/json_formatter_spec.rb +110 -0
  490. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/progress_formatter_spec.rb +30 -0
  491. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/snippet_extractor_spec.rb +26 -0
  492. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/text_mate_formatted-1.8.7-jruby.html +410 -0
  493. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/text_mate_formatted-1.8.7-rbx.html +462 -0
  494. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/text_mate_formatted-1.8.7.html +409 -0
  495. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/text_mate_formatted-1.9.2-jruby.html +410 -0
  496. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/text_mate_formatted-1.9.2.html +416 -0
  497. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/text_mate_formatted-1.9.3-jruby.html +410 -0
  498. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/text_mate_formatted-1.9.3-rbx.html +462 -0
  499. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/text_mate_formatted-1.9.3.html +416 -0
  500. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/text_mate_formatter_spec.rb +91 -0
  501. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/hooks_filtering_spec.rb +227 -0
  502. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/hooks_spec.rb +250 -0
  503. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/kernel_extensions_spec.rb +9 -0
  504. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/let_spec.rb +55 -0
  505. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/metadata_spec.rb +486 -0
  506. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/option_parser_spec.rb +208 -0
  507. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/pending_example_spec.rb +220 -0
  508. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/project_initializer_spec.rb +130 -0
  509. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/rake_task_spec.rb +181 -0
  510. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/reporter_spec.rb +120 -0
  511. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/resources/a_bar.rb +0 -0
  512. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/resources/a_foo.rb +0 -0
  513. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/resources/a_spec.rb +1 -0
  514. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/resources/custom_example_group_runner.rb +14 -0
  515. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/resources/formatter_specs.rb +60 -0
  516. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/resources/utf8_encoded.rb +8 -0
  517. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/rspec_matchers_spec.rb +45 -0
  518. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/ruby_project_spec.rb +24 -0
  519. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/runner_spec.rb +82 -0
  520. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/shared_context_spec.rb +67 -0
  521. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/shared_example_group_spec.rb +96 -0
  522. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/subject_spec.rb +255 -0
  523. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/world_spec.rb +144 -0
  524. data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core_spec.rb +35 -0
  525. data/vendor/bundle/gems/rspec-core-2.12.2/spec/spec_helper.rb +128 -0
  526. data/vendor/bundle/gems/rspec-core-2.12.2/spec/support/config_options_helper.rb +15 -0
  527. data/vendor/bundle/gems/rspec-core-2.12.2/spec/support/helper_methods.rb +18 -0
  528. data/vendor/bundle/gems/rspec-core-2.12.2/spec/support/isolated_directory.rb +10 -0
  529. data/vendor/bundle/gems/rspec-core-2.12.2/spec/support/isolated_home_directory.rb +16 -0
  530. data/vendor/bundle/gems/rspec-core-2.12.2/spec/support/matchers.rb +65 -0
  531. data/vendor/bundle/gems/rspec-core-2.12.2/spec/support/shared_example_groups.rb +41 -0
  532. data/vendor/bundle/gems/rspec-core-2.12.2/spec/support/spec_files.rb +44 -0
  533. data/vendor/bundle/gems/rspec-expectations-2.12.1/Changelog.md +297 -0
  534. data/vendor/bundle/gems/rspec-expectations-2.12.1/License.txt +23 -0
  535. data/vendor/bundle/gems/rspec-expectations-2.12.1/README.md +228 -0
  536. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/README.md +49 -0
  537. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/Upgrade.md +53 -0
  538. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/README.md +90 -0
  539. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/be.feature +173 -0
  540. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/be_within.feature +46 -0
  541. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/cover.feature +45 -0
  542. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/end_with.feature +46 -0
  543. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/equality.feature +145 -0
  544. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/exist.feature +43 -0
  545. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/expect_change.feature +59 -0
  546. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/expect_error.feature +138 -0
  547. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/have.feature +103 -0
  548. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/include.feature +121 -0
  549. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/match.feature +50 -0
  550. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/operators.feature +221 -0
  551. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/predicates.feature +129 -0
  552. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/respond_to.feature +78 -0
  553. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/satisfy.feature +31 -0
  554. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/start_with.feature +46 -0
  555. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/throw_symbol.feature +85 -0
  556. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/types.feature +114 -0
  557. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/yield.feature +146 -0
  558. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/custom_matchers/access_running_example.feature +53 -0
  559. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/custom_matchers/define_diffable_matcher.feature +27 -0
  560. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/custom_matchers/define_matcher.feature +368 -0
  561. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/custom_matchers/define_matcher_outside_rspec.feature +38 -0
  562. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/custom_matchers/define_matcher_with_fluent_interface.feature +24 -0
  563. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/customized_message.feature +22 -0
  564. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/diffing.feature +85 -0
  565. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/implicit_docstrings.feature +52 -0
  566. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/step_definitions/additional_cli_steps.rb +22 -0
  567. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/support/env.rb +5 -0
  568. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/syntax_configuration.feature +68 -0
  569. data/vendor/bundle/gems/rspec-expectations-2.12.1/features/test_frameworks/test_unit.feature +46 -0
  570. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations/deprecation.rb +38 -0
  571. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations/differ.rb +115 -0
  572. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations/errors.rb +9 -0
  573. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations/expectation_target.rb +88 -0
  574. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations/extensions/array.rb +9 -0
  575. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations/extensions/object.rb +39 -0
  576. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations/extensions.rb +2 -0
  577. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations/fail_with.rb +55 -0
  578. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations/handler.rb +63 -0
  579. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations/syntax.rb +118 -0
  580. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations/version.rb +8 -0
  581. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations.rb +47 -0
  582. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/be_close.rb +9 -0
  583. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/base_matcher.rb +68 -0
  584. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/be.rb +185 -0
  585. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/be_instance_of.rb +15 -0
  586. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/be_kind_of.rb +11 -0
  587. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/be_within.rb +46 -0
  588. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/change.rb +133 -0
  589. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/cover.rb +21 -0
  590. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/eq.rb +22 -0
  591. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/eql.rb +23 -0
  592. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/equal.rb +44 -0
  593. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/exist.rb +26 -0
  594. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/has.rb +48 -0
  595. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/have.rb +108 -0
  596. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/include.rb +53 -0
  597. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/match.rb +12 -0
  598. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/match_array.rb +51 -0
  599. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/raise_error.rb +107 -0
  600. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/respond_to.rb +74 -0
  601. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/satisfy.rb +30 -0
  602. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/start_and_end_with.rb +48 -0
  603. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/throw_symbol.rb +94 -0
  604. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/yield.rb +221 -0
  605. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in.rb +39 -0
  606. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/compatibility.rb +14 -0
  607. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/configuration.rb +108 -0
  608. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/dsl.rb +24 -0
  609. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/extensions/instance_eval_with_args.rb +39 -0
  610. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/generated_descriptions.rb +35 -0
  611. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/matcher.rb +299 -0
  612. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/method_missing.rb +12 -0
  613. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/operator_matcher.rb +109 -0
  614. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/pretty.rb +60 -0
  615. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers.rb +699 -0
  616. data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec-expectations.rb +1 -0
  617. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/expectations/differ_spec.rb +177 -0
  618. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/expectations/expectation_target_spec.rb +65 -0
  619. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/expectations/extensions/kernel_spec.rb +67 -0
  620. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/expectations/fail_with_spec.rb +70 -0
  621. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/expectations/handler_spec.rb +206 -0
  622. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/expectations/syntax_spec.rb +35 -0
  623. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/base_matcher_spec.rb +60 -0
  624. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/be_close_spec.rb +22 -0
  625. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/be_instance_of_spec.rb +57 -0
  626. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/be_kind_of_spec.rb +37 -0
  627. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/be_spec.rb +452 -0
  628. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/be_within_spec.rb +80 -0
  629. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/change_spec.rb +528 -0
  630. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/configuration_spec.rb +234 -0
  631. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/cover_spec.rb +69 -0
  632. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/description_generation_spec.rb +176 -0
  633. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/dsl_spec.rb +57 -0
  634. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/eq_spec.rb +54 -0
  635. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/eql_spec.rb +41 -0
  636. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/equal_spec.rb +60 -0
  637. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/exist_spec.rb +110 -0
  638. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/has_spec.rb +118 -0
  639. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/have_spec.rb +431 -0
  640. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/include_spec.rb +373 -0
  641. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/match_array_spec.rb +153 -0
  642. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/match_spec.rb +61 -0
  643. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/matcher_spec.rb +434 -0
  644. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/matchers_spec.rb +31 -0
  645. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/method_missing_spec.rb +24 -0
  646. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/operator_matcher_spec.rb +244 -0
  647. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/raise_error_spec.rb +395 -0
  648. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/respond_to_spec.rb +295 -0
  649. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/satisfy_spec.rb +44 -0
  650. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/start_with_end_with_spec.rb +182 -0
  651. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/throw_symbol_spec.rb +116 -0
  652. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/yield_spec.rb +437 -0
  653. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/spec_helper.rb +27 -0
  654. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/support/classes.rb +56 -0
  655. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/support/in_sub_process.rb +31 -0
  656. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/support/matchers.rb +22 -0
  657. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/support/ruby_version.rb +10 -0
  658. data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/support/shared_examples.rb +13 -0
  659. data/vendor/bundle/gems/rspec-mocks-2.12.2/Changelog.md +268 -0
  660. data/vendor/bundle/gems/rspec-mocks-2.12.2/License.txt +23 -0
  661. data/vendor/bundle/gems/rspec-mocks-2.12.2/README.md +301 -0
  662. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/README.md +67 -0
  663. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/Scope.md +17 -0
  664. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/Upgrade.md +22 -0
  665. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/argument_matchers/README.md +27 -0
  666. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/argument_matchers/explicit.feature +60 -0
  667. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/argument_matchers/general_matchers.feature +85 -0
  668. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/argument_matchers/type_matchers.feature +27 -0
  669. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/message_expectations/README.md +73 -0
  670. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/message_expectations/any_instance.feature +21 -0
  671. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/message_expectations/block_local_expectations.feature.pending +55 -0
  672. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/message_expectations/call_original.feature +24 -0
  673. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/message_expectations/expect_message.feature +94 -0
  674. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/message_expectations/receive_counts.feature +209 -0
  675. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/message_expectations/warn_when_expectation_is_set_on_nil.feature +50 -0
  676. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/method_stubs/README.md +47 -0
  677. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/method_stubs/any_instance.feature +132 -0
  678. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/method_stubs/as_null_object.feature +35 -0
  679. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/method_stubs/simple_return_value.feature +64 -0
  680. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/method_stubs/stub_chain.feature +51 -0
  681. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/method_stubs/stub_implementation.feature +26 -0
  682. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/method_stubs/to_ary.feature +47 -0
  683. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/mutating_constants/README.md +82 -0
  684. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/mutating_constants/hiding_defined_constant.feature +64 -0
  685. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/mutating_constants/stub_defined_constant.feature +79 -0
  686. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/mutating_constants/stub_undefined_constant.feature +50 -0
  687. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/outside_rspec/configuration.feature +82 -0
  688. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/outside_rspec/standalone.feature +33 -0
  689. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/step_definitions/additional_cli_steps.rb +4 -0
  690. data/vendor/bundle/gems/rspec-mocks-2.12.2/features/support/env.rb +6 -0
  691. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/any_instance/chain.rb +78 -0
  692. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/any_instance/expectation_chain.rb +57 -0
  693. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/any_instance/message_chains.rb +60 -0
  694. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/any_instance/recorder.rb +199 -0
  695. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/any_instance/stub_chain.rb +37 -0
  696. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/any_instance/stub_chain_chain.rb +25 -0
  697. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/any_instance.rb +81 -0
  698. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/argument_list_matcher.rb +93 -0
  699. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/argument_matchers.rb +238 -0
  700. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/configuration.rb +28 -0
  701. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/error_generator.rb +120 -0
  702. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/errors.rb +12 -0
  703. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/example_methods.rb +120 -0
  704. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/extensions/instance_exec.rb +34 -0
  705. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/extensions/marshal.rb +23 -0
  706. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/extensions/psych.rb +23 -0
  707. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/framework.rb +22 -0
  708. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/instance_method_stasher.rb +85 -0
  709. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/message_expectation.rb +503 -0
  710. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/method_double.rb +280 -0
  711. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/methods.rb +155 -0
  712. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/mock.rb +7 -0
  713. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/mutate_const.rb +415 -0
  714. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/order_group.rb +40 -0
  715. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/proxy.rb +205 -0
  716. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/serialization.rb +34 -0
  717. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/space.rb +34 -0
  718. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/standalone.rb +3 -0
  719. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/test_double.rb +103 -0
  720. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/version.rb +7 -0
  721. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks.rb +63 -0
  722. data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/spec/mocks.rb +6 -0
  723. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/and_call_original_spec.rb +225 -0
  724. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/and_yield_spec.rb +114 -0
  725. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/any_instance/message_chains_spec.rb +40 -0
  726. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/any_instance_spec.rb +888 -0
  727. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/any_number_of_times_spec.rb +30 -0
  728. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/argument_expectation_spec.rb +34 -0
  729. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/at_least_spec.rb +142 -0
  730. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/at_most_spec.rb +90 -0
  731. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/block_return_value_spec.rb +53 -0
  732. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/bug_report_10260_spec.rb +8 -0
  733. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/bug_report_10263_spec.rb +27 -0
  734. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/bug_report_11545_spec.rb +32 -0
  735. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/bug_report_496_spec.rb +17 -0
  736. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/bug_report_600_spec.rb +22 -0
  737. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/bug_report_7611_spec.rb +16 -0
  738. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/bug_report_8165_spec.rb +31 -0
  739. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/bug_report_830_spec.rb +21 -0
  740. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/bug_report_957_spec.rb +22 -0
  741. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/configuration_spec.rb +26 -0
  742. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/double_spec.rb +12 -0
  743. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/failing_argument_matchers_spec.rb +94 -0
  744. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/hash_excluding_matcher_spec.rb +67 -0
  745. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/hash_including_matcher_spec.rb +90 -0
  746. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/instance_method_stasher_spec.rb +58 -0
  747. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/mock_ordering_spec.rb +103 -0
  748. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/mock_space_spec.rb +58 -0
  749. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/mock_spec.rb +734 -0
  750. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/multiple_return_value_spec.rb +119 -0
  751. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/mutate_const_spec.rb +481 -0
  752. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/nil_expectation_warning_spec.rb +56 -0
  753. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/null_object_mock_spec.rb +107 -0
  754. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/once_counts_spec.rb +52 -0
  755. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/options_hash_spec.rb +35 -0
  756. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/partial_mock_spec.rb +196 -0
  757. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/partial_mock_using_mocks_directly_spec.rb +95 -0
  758. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/passing_argument_matchers_spec.rb +142 -0
  759. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/precise_counts_spec.rb +68 -0
  760. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/record_messages_spec.rb +26 -0
  761. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/serialization_spec.rb +110 -0
  762. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/stash_spec.rb +54 -0
  763. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/stub_chain_spec.rb +154 -0
  764. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/stub_implementation_spec.rb +81 -0
  765. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/stub_spec.rb +266 -0
  766. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/stubbed_message_expectations_spec.rb +47 -0
  767. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/test_double_spec.rb +57 -0
  768. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/to_ary_spec.rb +40 -0
  769. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/twice_counts_spec.rb +66 -0
  770. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks_spec.rb +67 -0
  771. data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/spec_helper.rb +36 -0
  772. data/vendor/bundle/specifications/diff-lcs-1.1.3.gemspec +35 -0
  773. data/vendor/bundle/specifications/hiredis-0.4.5.gemspec +30 -0
  774. data/vendor/bundle/specifications/multi_json-1.6.1.gemspec +30 -0
  775. data/vendor/bundle/specifications/rake-10.0.3.gemspec +34 -0
  776. data/vendor/bundle/specifications/redis-3.0.2.gemspec +28 -0
  777. data/vendor/bundle/specifications/rspec-2.12.0.gemspec +39 -0
  778. data/vendor/bundle/specifications/rspec-core-2.12.2.gemspec +58 -0
  779. data/vendor/bundle/specifications/rspec-expectations-2.12.1.gemspec +40 -0
  780. data/vendor/bundle/specifications/rspec-mocks-2.12.2.gemspec +37 -0
  781. data/vendor/remq/Readme.md +30 -16
  782. data/vendor/remq/VERSION +1 -0
  783. data/vendor/remq/scripts/consume.lua +24 -38
  784. data/vendor/remq/scripts/flush.lua +33 -0
  785. data/vendor/remq/scripts/publish.lua +10 -7
  786. metadata +806 -29
  787. data/lib/remq/coder.rb +0 -30
  788. data/lib/remq/multi_json_coder.rb +0 -39
  789. data/vendor/remq/scripts/purge.lua +0 -18
@@ -0,0 +1,1144 @@
1
+ require 'spec_helper'
2
+
3
+ class SelfObserver
4
+ def self.cache
5
+ @cache ||= []
6
+ end
7
+
8
+ def initialize
9
+ self.class.cache << self
10
+ end
11
+ end
12
+
13
+ module RSpec::Core
14
+ describe ExampleGroup do
15
+ it_behaves_like "metadata hash builder" do
16
+ def metadata_hash(*args)
17
+ group = ExampleGroup.describe('example description', *args)
18
+ group.metadata
19
+ end
20
+ end
21
+
22
+ context "when RSpec.configuration.format_docstrings is set to a block" do
23
+ it "formats the description with that block" do
24
+ RSpec.configuration.format_docstrings { |s| s.upcase }
25
+ group = ExampleGroup.describe(' an example ')
26
+ group.description.should eq(' AN EXAMPLE ')
27
+ end
28
+ end
29
+
30
+ context 'when RSpec.configuration.treat_symbols_as_metadata_keys_with_true_values is set to false' do
31
+ before(:each) do
32
+ RSpec.configure { |c| c.treat_symbols_as_metadata_keys_with_true_values = false }
33
+ end
34
+
35
+ it 'processes string args as part of the description' do
36
+ group = ExampleGroup.describe("some", "separate", "strings")
37
+ group.description.should eq("some separate strings")
38
+ end
39
+
40
+ it 'processes symbol args as part of the description' do
41
+ Kernel.stub(:warn) # to silence Symbols as args warning
42
+ group = ExampleGroup.describe(:some, :separate, :symbols)
43
+ group.description.should eq("some separate symbols")
44
+ end
45
+ end
46
+
47
+ context 'when RSpec.configuration.treat_symbols_as_metadata_keys_with_true_values is set to true' do
48
+ let(:group) { ExampleGroup.describe(:symbol) }
49
+
50
+ before(:each) do
51
+ RSpec.configure { |c| c.treat_symbols_as_metadata_keys_with_true_values = true }
52
+ end
53
+
54
+ it 'does not treat the first argument as a metadata key even if it is a symbol' do
55
+ group.metadata.should_not include(:symbol)
56
+ end
57
+
58
+ it 'treats the first argument as part of the description when it is a symbol' do
59
+ group.description.should eq("symbol")
60
+ end
61
+ end
62
+
63
+ describe "top level group" do
64
+ it "runs its children" do
65
+ examples_run = []
66
+ group = ExampleGroup.describe("parent") do
67
+ describe("child") do
68
+ it "does something" do
69
+ examples_run << example
70
+ end
71
+ end
72
+ end
73
+
74
+ group.run
75
+ examples_run.should have(1).example
76
+ end
77
+
78
+ context "with a failure in the top level group" do
79
+ it "runs its children " do
80
+ examples_run = []
81
+ group = ExampleGroup.describe("parent") do
82
+ it "fails" do
83
+ examples_run << example
84
+ raise "fail"
85
+ end
86
+ describe("child") do
87
+ it "does something" do
88
+ examples_run << example
89
+ end
90
+ end
91
+ end
92
+
93
+ group.run
94
+ examples_run.should have(2).examples
95
+ end
96
+ end
97
+
98
+ describe "descendants" do
99
+ it "returns self + all descendants" do
100
+ group = ExampleGroup.describe("parent") do
101
+ describe("child") do
102
+ describe("grandchild 1") {}
103
+ describe("grandchild 2") {}
104
+ end
105
+ end
106
+ group.descendants.size.should eq(4)
107
+ end
108
+ end
109
+ end
110
+
111
+ describe "child" do
112
+ it "is known by parent" do
113
+ parent = ExampleGroup.describe
114
+ child = parent.describe
115
+ parent.children.should eq([child])
116
+ end
117
+
118
+ it "is not registered in world" do
119
+ world = RSpec::Core::World.new
120
+ parent = ExampleGroup.describe
121
+ world.register(parent)
122
+ parent.describe
123
+ world.example_groups.should eq([parent])
124
+ end
125
+ end
126
+
127
+ describe "filtering" do
128
+ let(:world) { World.new }
129
+
130
+ shared_examples "matching filters" do
131
+ context "inclusion" do
132
+ before do
133
+ filter_manager = FilterManager.new
134
+ filter_manager.include filter_metadata
135
+ world.stub(:filter_manager => filter_manager)
136
+ end
137
+
138
+ it "includes examples in groups matching filter" do
139
+ group = ExampleGroup.describe("does something", spec_metadata)
140
+ group.stub(:world) { world }
141
+ all_examples = [ group.example("first"), group.example("second") ]
142
+
143
+ group.filtered_examples.should eq(all_examples)
144
+ end
145
+
146
+ it "includes examples directly matching filter" do
147
+ group = ExampleGroup.describe("does something")
148
+ group.stub(:world) { world }
149
+ filtered_examples = [
150
+ group.example("first", spec_metadata),
151
+ group.example("second", spec_metadata)
152
+ ]
153
+ group.example("third (not-filtered)")
154
+
155
+ group.filtered_examples.should eq(filtered_examples)
156
+ end
157
+ end
158
+
159
+ context "exclusion" do
160
+ before do
161
+ filter_manager = FilterManager.new
162
+ filter_manager.exclude filter_metadata
163
+ world.stub(:filter_manager => filter_manager)
164
+ end
165
+
166
+ it "excludes examples in groups matching filter" do
167
+ group = ExampleGroup.describe("does something", spec_metadata)
168
+ group.stub(:world) { world }
169
+ [ group.example("first"), group.example("second") ]
170
+
171
+ group.filtered_examples.should be_empty
172
+ end
173
+
174
+ it "excludes examples directly matching filter" do
175
+ group = ExampleGroup.describe("does something")
176
+ group.stub(:world) { world }
177
+ [
178
+ group.example("first", spec_metadata),
179
+ group.example("second", spec_metadata)
180
+ ]
181
+ unfiltered_example = group.example("third (not-filtered)")
182
+
183
+ group.filtered_examples.should eq([unfiltered_example])
184
+ end
185
+ end
186
+ end
187
+
188
+ context "matching false" do
189
+ let(:spec_metadata) { { :awesome => false }}
190
+
191
+ context "against false" do
192
+ let(:filter_metadata) { { :awesome => false }}
193
+ include_examples "matching filters"
194
+ end
195
+
196
+ context "against 'false'" do
197
+ let(:filter_metadata) { { :awesome => 'false' }}
198
+ include_examples "matching filters"
199
+ end
200
+
201
+ context "against :false" do
202
+ let(:filter_metadata) { { :awesome => :false }}
203
+ include_examples "matching filters"
204
+ end
205
+ end
206
+
207
+ context "matching true" do
208
+ let(:spec_metadata) { { :awesome => true }}
209
+
210
+ context "against true" do
211
+ let(:filter_metadata) { { :awesome => true }}
212
+ include_examples "matching filters"
213
+ end
214
+
215
+ context "against 'true'" do
216
+ let(:filter_metadata) { { :awesome => 'true' }}
217
+ include_examples "matching filters"
218
+ end
219
+
220
+ context "against :true" do
221
+ let(:filter_metadata) { { :awesome => :true }}
222
+ include_examples "matching filters"
223
+ end
224
+ end
225
+
226
+ context "matching a string" do
227
+ let(:spec_metadata) { { :type => 'special' }}
228
+
229
+ context "against a string" do
230
+ let(:filter_metadata) { { :type => 'special' }}
231
+ include_examples "matching filters"
232
+ end
233
+
234
+ context "against a symbol" do
235
+ let(:filter_metadata) { { :type => :special }}
236
+ include_examples "matching filters"
237
+ end
238
+ end
239
+
240
+ context "matching a symbol" do
241
+ let(:spec_metadata) { { :type => :special }}
242
+
243
+ context "against a string" do
244
+ let(:filter_metadata) { { :type => 'special' }}
245
+ include_examples "matching filters"
246
+ end
247
+
248
+ context "against a symbol" do
249
+ let(:filter_metadata) { { :type => :special }}
250
+ include_examples "matching filters"
251
+ end
252
+ end
253
+
254
+ context "with no filters" do
255
+ it "returns all" do
256
+ group = ExampleGroup.describe
257
+ group.stub(:world) { world }
258
+ example = group.example("does something")
259
+ group.filtered_examples.should eq([example])
260
+ end
261
+ end
262
+
263
+ context "with no examples or groups that match filters" do
264
+ it "returns none" do
265
+ filter_manager = FilterManager.new
266
+ filter_manager.include :awesome => false
267
+ world.stub(:filter_manager => filter_manager)
268
+ group = ExampleGroup.describe
269
+ group.stub(:world) { world }
270
+ group.example("does something")
271
+ group.filtered_examples.should eq([])
272
+ end
273
+ end
274
+ end
275
+
276
+ describe '#described_class' do
277
+
278
+ context "with a constant as the first parameter" do
279
+ it "is that constant" do
280
+ ExampleGroup.describe(Object) { }.described_class.should eq(Object)
281
+ end
282
+ end
283
+
284
+ context "with a string as the first parameter" do
285
+ it "is nil" do
286
+ ExampleGroup.describe("i'm a computer") { }.described_class.should be_nil
287
+ end
288
+ end
289
+
290
+ context "with a constant in an outer group" do
291
+ context "and a string in an inner group" do
292
+ it "is the top level constant" do
293
+ group = ExampleGroup.describe(String) do
294
+ describe :symbol do
295
+ example "described_class is String" do
296
+ described_class.should eq(String)
297
+ end
298
+ end
299
+ end
300
+
301
+ group.run.should be_true
302
+ end
303
+ end
304
+
305
+ context "and metadata redefinition after `described_class` call" do
306
+ it "is the redefined level constant" do
307
+ group = ExampleGroup.describe(String) do
308
+ described_class
309
+ metadata[:example_group][:described_class] = Object
310
+ describe :symbol do
311
+ example "described_class is Object" do
312
+ described_class.should eq(Object)
313
+ end
314
+ end
315
+ end
316
+
317
+ group.run.should be_true
318
+ end
319
+ end
320
+ end
321
+
322
+ context "in a nested group" do
323
+ it "inherits the described class/module from the outer group" do
324
+ group = ExampleGroup.describe(String) do
325
+ describe Array do
326
+ example "desribes is String" do
327
+ described_class.should eq(String)
328
+ end
329
+ end
330
+ end
331
+
332
+ group.run.should be_true, "expected examples in group to pass"
333
+ end
334
+ end
335
+ end
336
+
337
+ describe '#described_class' do
338
+ it "is the same as described_class" do
339
+ self.class.described_class.should eq(self.class.described_class)
340
+ end
341
+ end
342
+
343
+ describe '#description' do
344
+ it "grabs the description from the metadata" do
345
+ group = ExampleGroup.describe(Object, "my desc") { }
346
+ group.description.should eq(group.metadata[:example_group][:description])
347
+ end
348
+ end
349
+
350
+ describe '#metadata' do
351
+ it "adds the third parameter to the metadata" do
352
+ ExampleGroup.describe(Object, nil, 'foo' => 'bar') { }.metadata.should include({ "foo" => 'bar' })
353
+ end
354
+
355
+ it "adds the the file_path to metadata" do
356
+ ExampleGroup.describe(Object) { }.metadata[:example_group][:file_path].should eq(relative_path(__FILE__))
357
+ end
358
+
359
+ it "has a reader for file_path" do
360
+ ExampleGroup.describe(Object) { }.file_path.should eq(relative_path(__FILE__))
361
+ end
362
+
363
+ it "adds the line_number to metadata" do
364
+ ExampleGroup.describe(Object) { }.metadata[:example_group][:line_number].should eq(__LINE__)
365
+ end
366
+ end
367
+
368
+ [:focus, :focused].each do |example_alias|
369
+ describe "##{example_alias}" do
370
+ let(:focused_example) { ExampleGroup.describe.send example_alias, "a focused example" }
371
+
372
+ it 'defines an example that can be filtered with :focused => true' do
373
+ focused_example.metadata[:focused].should be_true
374
+ end
375
+
376
+ it 'defines an example that can be filtered with :focus => true' do
377
+ focused_example.metadata[:focus].should be_true
378
+ end
379
+ end
380
+ end
381
+
382
+ describe "#before, after, and around hooks" do
383
+ it "runs the before alls in order" do
384
+ group = ExampleGroup.describe
385
+ order = []
386
+ group.before(:all) { order << 1 }
387
+ group.before(:all) { order << 2 }
388
+ group.before(:all) { order << 3 }
389
+ group.example("example") {}
390
+
391
+ group.run
392
+
393
+ order.should eq([1,2,3])
394
+ end
395
+
396
+ it "does not set RSpec.wants_to_quit in case of an error in before all (without fail_fast?)" do
397
+ group = ExampleGroup.describe
398
+ group.before(:all) { raise "error in before all" }
399
+ group.example("example") {}
400
+
401
+ group.run
402
+ RSpec.wants_to_quit.should be_false
403
+ end
404
+
405
+ it "runs the before eachs in order" do
406
+ group = ExampleGroup.describe
407
+ order = []
408
+ group.before(:each) { order << 1 }
409
+ group.before(:each) { order << 2 }
410
+ group.before(:each) { order << 3 }
411
+ group.example("example") {}
412
+
413
+ group.run
414
+
415
+ order.should eq([1,2,3])
416
+ end
417
+
418
+ it "runs the after eachs in reverse order" do
419
+ group = ExampleGroup.describe
420
+ order = []
421
+ group.after(:each) { order << 1 }
422
+ group.after(:each) { order << 2 }
423
+ group.after(:each) { order << 3 }
424
+ group.example("example") {}
425
+
426
+ group.run
427
+
428
+ order.should eq([3,2,1])
429
+ end
430
+
431
+ it "runs the after alls in reverse order" do
432
+ group = ExampleGroup.describe
433
+ order = []
434
+ group.after(:all) { order << 1 }
435
+ group.after(:all) { order << 2 }
436
+ group.after(:all) { order << 3 }
437
+ group.example("example") {}
438
+
439
+ group.run
440
+
441
+ order.should eq([3,2,1])
442
+ end
443
+
444
+ it "only runs before/after(:all) hooks from example groups that have specs that run" do
445
+ hooks_run = []
446
+
447
+ RSpec.configure do |c|
448
+ c.filter_run :focus => true
449
+ end
450
+
451
+ unfiltered_group = ExampleGroup.describe "unfiltered" do
452
+ before(:all) { hooks_run << :unfiltered_before_all }
453
+ after(:all) { hooks_run << :unfiltered_after_all }
454
+
455
+ context "a subcontext" do
456
+ it("has an example") { }
457
+ end
458
+ end
459
+
460
+ filtered_group = ExampleGroup.describe "filtered", :focus => true do
461
+ before(:all) { hooks_run << :filtered_before_all }
462
+ after(:all) { hooks_run << :filtered_after_all }
463
+
464
+ context "a subcontext" do
465
+ it("has an example") { }
466
+ end
467
+ end
468
+
469
+ unfiltered_group.run
470
+ filtered_group.run
471
+
472
+ hooks_run.should eq([:filtered_before_all, :filtered_after_all])
473
+ end
474
+
475
+ it "runs before_all_defined_in_config, before all, before each, example, after each, after all, after_all_defined_in_config in that order" do
476
+ order = []
477
+
478
+ RSpec.configure do |c|
479
+ c.before(:all) { order << :before_all_defined_in_config }
480
+ c.after(:all) { order << :after_all_defined_in_config }
481
+ end
482
+
483
+ group = ExampleGroup.describe
484
+ group.before(:all) { order << :top_level_before_all }
485
+ group.before(:each) { order << :before_each }
486
+ group.after(:each) { order << :after_each }
487
+ group.after(:all) { order << :top_level_after_all }
488
+ group.example("top level example") { order << :top_level_example }
489
+
490
+ context1 = group.describe("context 1")
491
+ context1.before(:all) { order << :nested_before_all }
492
+ context1.example("nested example 1") { order << :nested_example_1 }
493
+
494
+ context2 = group.describe("context 2")
495
+ context2.after(:all) { order << :nested_after_all }
496
+ context2.example("nested example 2") { order << :nested_example_2 }
497
+
498
+ group.run
499
+
500
+ order.should eq([
501
+ :before_all_defined_in_config,
502
+ :top_level_before_all,
503
+ :before_each,
504
+ :top_level_example,
505
+ :after_each,
506
+ :nested_before_all,
507
+ :before_each,
508
+ :nested_example_1,
509
+ :after_each,
510
+ :before_each,
511
+ :nested_example_2,
512
+ :after_each,
513
+ :nested_after_all,
514
+ :top_level_after_all,
515
+ :after_all_defined_in_config
516
+ ])
517
+ end
518
+
519
+ context "after(:all)" do
520
+ let(:outer) { ExampleGroup.describe }
521
+ let(:inner) { outer.describe }
522
+
523
+ it "has access to state defined before(:all)" do
524
+ outer.before(:all) { @outer = "outer" }
525
+ inner.before(:all) { @inner = "inner" }
526
+
527
+ outer.after(:all) do
528
+ @outer.should eq("outer")
529
+ @inner.should eq("inner")
530
+ end
531
+ inner.after(:all) do
532
+ @inner.should eq("inner")
533
+ @outer.should eq("outer")
534
+ end
535
+
536
+ outer.run
537
+ end
538
+
539
+ it "cleans up ivars in after(:all)" do
540
+ outer.before(:all) { @outer = "outer" }
541
+ inner.before(:all) { @inner = "inner" }
542
+
543
+ outer.run
544
+
545
+ inner.before_all_ivars[:@inner].should be_nil
546
+ inner.before_all_ivars[:@outer].should be_nil
547
+ outer.before_all_ivars[:@inner].should be_nil
548
+ outer.before_all_ivars[:@outer].should be_nil
549
+ end
550
+ end
551
+
552
+ it "treats an error in before(:each) as a failure" do
553
+ group = ExampleGroup.describe
554
+ group.before(:each) { raise "error in before each" }
555
+ example = group.example("equality") { 1.should eq(2) }
556
+ group.run.should be(false)
557
+
558
+ example.metadata[:execution_result][:exception].message.should eq("error in before each")
559
+ end
560
+
561
+ it "treats an error in before(:all) as a failure" do
562
+ group = ExampleGroup.describe
563
+ group.before(:all) { raise "error in before all" }
564
+ example = group.example("equality") { 1.should eq(2) }
565
+ group.run.should be_false
566
+
567
+ example.metadata.should_not be_nil
568
+ example.metadata[:execution_result].should_not be_nil
569
+ example.metadata[:execution_result][:exception].should_not be_nil
570
+ example.metadata[:execution_result][:exception].message.should eq("error in before all")
571
+ end
572
+
573
+ it "exposes instance variables set in before(:all) from after(:all) even if a before(:all) error occurs" do
574
+ ivar_value_in_after_hook = nil
575
+
576
+ group = ExampleGroup.describe do
577
+ before(:all) do
578
+ @an_ivar = :set_in_before_all
579
+ raise "fail"
580
+ end
581
+
582
+ after(:all) { ivar_value_in_after_hook = @an_ivar }
583
+
584
+ it("has a spec") { }
585
+ end
586
+
587
+ group.run
588
+ ivar_value_in_after_hook.should eq(:set_in_before_all)
589
+ end
590
+
591
+ it "treats an error in before(:all) as a failure for a spec in a nested group" do
592
+ example = nil
593
+ group = ExampleGroup.describe do
594
+ before(:all) { raise "error in before all" }
595
+
596
+ describe "nested" do
597
+ example = it("equality") { 1.should eq(2) }
598
+ end
599
+ end
600
+ group.run
601
+
602
+ example.metadata.should_not be_nil
603
+ example.metadata[:execution_result].should_not be_nil
604
+ example.metadata[:execution_result][:exception].should_not be_nil
605
+ example.metadata[:execution_result][:exception].message.should eq("error in before all")
606
+ end
607
+
608
+ context "when an error occurs in an after(:all) hook" do
609
+ before(:each) do
610
+ RSpec.configuration.reporter.stub(:message)
611
+ end
612
+
613
+ let(:group) do
614
+ ExampleGroup.describe do
615
+ after(:all) { raise "error in after all" }
616
+ it("equality") { 1.should eq(1) }
617
+ end
618
+ end
619
+
620
+ it "allows the example to pass" do
621
+ group.run
622
+ example = group.examples.first
623
+ example.metadata.should_not be_nil
624
+ example.metadata[:execution_result].should_not be_nil
625
+ example.metadata[:execution_result][:status].should eq("passed")
626
+ end
627
+
628
+ it "rescues the error and prints it out" do
629
+ RSpec.configuration.reporter.should_receive(:message).with(/error in after all/)
630
+ group.run
631
+ end
632
+ end
633
+
634
+ it "has no 'running example' within before(:all)" do
635
+ group = ExampleGroup.describe
636
+ running_example = :none
637
+ group.before(:all) { running_example = example }
638
+ group.example("no-op") { }
639
+ group.run
640
+ running_example.should be(nil)
641
+ end
642
+
643
+ it "has access to example options within before(:each)" do
644
+ group = ExampleGroup.describe
645
+ option = nil
646
+ group.before(:each) { option = example.options[:data] }
647
+ group.example("no-op", :data => :sample) { }
648
+ group.run
649
+ option.should eq(:sample)
650
+ end
651
+
652
+ it "has access to example options within after(:each)" do
653
+ group = ExampleGroup.describe
654
+ option = nil
655
+ group.after(:each) { option = example.options[:data] }
656
+ group.example("no-op", :data => :sample) { }
657
+ group.run
658
+ option.should eq(:sample)
659
+ end
660
+
661
+ it "has no 'running example' within after(:all)" do
662
+ group = ExampleGroup.describe
663
+ running_example = :none
664
+ group.after(:all) { running_example = example }
665
+ group.example("no-op") { }
666
+ group.run
667
+ running_example.should be(nil)
668
+ end
669
+ end
670
+
671
+ %w[pending xit xspecify xexample].each do |method_name|
672
+ describe "::#{method_name}" do
673
+ before do
674
+ @group = ExampleGroup.describe
675
+ @group.send(method_name, "is pending") { }
676
+ end
677
+
678
+ it "generates a pending example" do
679
+ @group.run
680
+ @group.examples.first.should be_pending
681
+ end
682
+
683
+ it "sets the pending message", :if => method_name == 'pending' do
684
+ @group.run
685
+ @group.examples.first.metadata[:execution_result][:pending_message].should eq(RSpec::Core::Pending::NO_REASON_GIVEN)
686
+ end
687
+
688
+ it "sets the pending message", :unless => method_name == 'pending' do
689
+ @group.run
690
+ @group.examples.first.metadata[:execution_result][:pending_message].should eq("Temporarily disabled with #{method_name}")
691
+ end
692
+ end
693
+ end
694
+
695
+ describe "adding examples" do
696
+
697
+ it "allows adding an example using 'it'" do
698
+ group = ExampleGroup.describe
699
+ group.it("should do something") { }
700
+ group.examples.size.should eq(1)
701
+ end
702
+
703
+ it "exposes all examples at examples" do
704
+ group = ExampleGroup.describe
705
+ group.it("should do something 1") { }
706
+ group.it("should do something 2") { }
707
+ group.it("should do something 3") { }
708
+ group.should have(3).examples
709
+ end
710
+
711
+ it "maintains the example order" do
712
+ group = ExampleGroup.describe
713
+ group.it("should 1") { }
714
+ group.it("should 2") { }
715
+ group.it("should 3") { }
716
+ group.examples[0].description.should eq('should 1')
717
+ group.examples[1].description.should eq('should 2')
718
+ group.examples[2].description.should eq('should 3')
719
+ end
720
+
721
+ end
722
+
723
+ describe Object, "describing nested example_groups", :little_less_nested => 'yep' do
724
+
725
+ describe "A sample nested group", :nested_describe => "yep" do
726
+ it "sets the described class to the described class of the outer most group" do
727
+ example.example_group.described_class.should eq(ExampleGroup)
728
+ end
729
+
730
+ it "sets the description to 'A sample nested describe'" do
731
+ example.example_group.description.should eq('A sample nested group')
732
+ end
733
+
734
+ it "has top level metadata from the example_group and its parent groups" do
735
+ example.example_group.metadata.should include(:little_less_nested => 'yep', :nested_describe => 'yep')
736
+ end
737
+
738
+ it "exposes the parent metadata to the contained examples" do
739
+ example.metadata.should include(:little_less_nested => 'yep', :nested_describe => 'yep')
740
+ end
741
+ end
742
+
743
+ end
744
+
745
+ describe "#run_examples" do
746
+
747
+ let(:reporter) { double("reporter").as_null_object }
748
+
749
+ it "returns true if all examples pass" do
750
+ group = ExampleGroup.describe('group') do
751
+ example('ex 1') { 1.should eq(1) }
752
+ example('ex 2') { 1.should eq(1) }
753
+ end
754
+ group.stub(:filtered_examples) { group.examples.extend(Extensions::Ordered::Examples) }
755
+ group.run(reporter).should be_true
756
+ end
757
+
758
+ it "returns false if any of the examples fail" do
759
+ group = ExampleGroup.describe('group') do
760
+ example('ex 1') { 1.should eq(1) }
761
+ example('ex 2') { 1.should eq(2) }
762
+ end
763
+ group.stub(:filtered_examples) { group.examples.extend(Extensions::Ordered::Examples) }
764
+ group.run(reporter).should be_false
765
+ end
766
+
767
+ it "runs all examples, regardless of any of them failing" do
768
+ group = ExampleGroup.describe('group') do
769
+ example('ex 1') { 1.should eq(2) }
770
+ example('ex 2') { 1.should eq(1) }
771
+ end
772
+ group.stub(:filtered_examples) { group.examples.extend(Extensions::Ordered::Examples) }
773
+ group.filtered_examples.each do |example|
774
+ example.should_receive(:run)
775
+ end
776
+ group.run(reporter).should be_false
777
+ end
778
+ end
779
+
780
+ describe "how instance variables are inherited" do
781
+ before(:all) do
782
+ @before_all_top_level = 'before_all_top_level'
783
+ end
784
+
785
+ before(:each) do
786
+ @before_each_top_level = 'before_each_top_level'
787
+ end
788
+
789
+ it "can access a before each ivar at the same level" do
790
+ @before_each_top_level.should eq('before_each_top_level')
791
+ end
792
+
793
+ it "can access a before all ivar at the same level" do
794
+ @before_all_top_level.should eq('before_all_top_level')
795
+ end
796
+
797
+ it "can access the before all ivars in the before_all_ivars hash", :ruby => 1.8 do
798
+ example.example_group.before_all_ivars.should include('@before_all_top_level' => 'before_all_top_level')
799
+ end
800
+
801
+ it "can access the before all ivars in the before_all_ivars hash", :ruby => 1.9 do
802
+ example.example_group.before_all_ivars.should include(:@before_all_top_level => 'before_all_top_level')
803
+ end
804
+
805
+ describe "but now I am nested" do
806
+ it "can access a parent example groups before each ivar at a nested level" do
807
+ @before_each_top_level.should eq('before_each_top_level')
808
+ end
809
+
810
+ it "can access a parent example groups before all ivar at a nested level" do
811
+ @before_all_top_level.should eq("before_all_top_level")
812
+ end
813
+
814
+ it "changes to before all ivars from within an example do not persist outside the current describe" do
815
+ @before_all_top_level = "ive been changed"
816
+ end
817
+
818
+ describe "accessing a before_all ivar that was changed in a parent example_group" do
819
+ it "does not have access to the modified version" do
820
+ @before_all_top_level.should eq('before_all_top_level')
821
+ end
822
+ end
823
+ end
824
+
825
+ end
826
+
827
+ describe "ivars are not shared across examples" do
828
+ it "(first example)" do
829
+ @a = 1
830
+ defined?(@b).should be_false
831
+ end
832
+
833
+ it "(second example)" do
834
+ @b = 2
835
+ defined?(@a).should be_false
836
+ end
837
+ end
838
+
839
+
840
+ describe "#top_level_description" do
841
+ it "returns the description from the outermost example group" do
842
+ group = nil
843
+ ExampleGroup.describe("top") do
844
+ context "middle" do
845
+ group = describe "bottom" do
846
+ end
847
+ end
848
+ end
849
+
850
+ group.top_level_description.should eq("top")
851
+ end
852
+ end
853
+
854
+ describe "#run" do
855
+ let(:reporter) { double("reporter").as_null_object }
856
+
857
+ context "with fail_fast? => true" do
858
+ let(:group) do
859
+ group = RSpec::Core::ExampleGroup.describe
860
+ group.stub(:fail_fast?) { true }
861
+ group
862
+ end
863
+
864
+ it "does not run examples after the failed example" do
865
+ examples_run = []
866
+ group.example('example 1') { examples_run << self }
867
+ group.example('example 2') { examples_run << self; fail; }
868
+ group.example('example 3') { examples_run << self }
869
+
870
+ group.run
871
+
872
+ examples_run.length.should eq(2)
873
+ end
874
+
875
+ it "sets RSpec.wants_to_quit flag if encountering an exception in before(:all)" do
876
+ group.before(:all) { raise "error in before all" }
877
+ example = group.example("equality") { 1.should eq(2) }
878
+ group.run.should be_false
879
+ RSpec.wants_to_quit.should be_true
880
+ end
881
+ end
882
+
883
+ context "with RSpec.wants_to_quit=true" do
884
+ let(:group) { RSpec::Core::ExampleGroup.describe }
885
+
886
+ before do
887
+ RSpec.stub(:wants_to_quit) { true }
888
+ RSpec.stub(:clear_remaining_example_groups)
889
+ end
890
+
891
+ it "returns without starting the group" do
892
+ reporter.should_not_receive(:example_group_started)
893
+ group.run(reporter)
894
+ end
895
+
896
+ context "at top level" do
897
+ it "purges remaining groups" do
898
+ RSpec.should_receive(:clear_remaining_example_groups)
899
+ group.run(reporter)
900
+ end
901
+ end
902
+
903
+ context "in a nested group" do
904
+ it "does not purge remaining groups" do
905
+ nested_group = group.describe
906
+ RSpec.should_not_receive(:clear_remaining_example_groups)
907
+ nested_group.run(reporter)
908
+ end
909
+ end
910
+ end
911
+
912
+ context "with all examples passing" do
913
+ it "returns true" do
914
+ group = RSpec::Core::ExampleGroup.describe("something") do
915
+ it "does something" do
916
+ # pass
917
+ end
918
+ describe "nested" do
919
+ it "does something else" do
920
+ # pass
921
+ end
922
+ end
923
+ end
924
+
925
+ group.run(reporter).should be_true
926
+ end
927
+ end
928
+
929
+ context "with top level example failing" do
930
+ it "returns false" do
931
+ group = RSpec::Core::ExampleGroup.describe("something") do
932
+ it "does something (wrong - fail)" do
933
+ raise "fail"
934
+ end
935
+ describe "nested" do
936
+ it "does something else" do
937
+ # pass
938
+ end
939
+ end
940
+ end
941
+
942
+ group.run(reporter).should be_false
943
+ end
944
+ end
945
+
946
+ context "with nested example failing" do
947
+ it "returns true" do
948
+ group = RSpec::Core::ExampleGroup.describe("something") do
949
+ it "does something" do
950
+ # pass
951
+ end
952
+ describe "nested" do
953
+ it "does something else (wrong -fail)" do
954
+ raise "fail"
955
+ end
956
+ end
957
+ end
958
+
959
+ group.run(reporter).should be_false
960
+ end
961
+ end
962
+ end
963
+
964
+ %w[include_examples include_context].each do |name|
965
+ describe "##{name}" do
966
+ before do
967
+ shared_examples "named this" do
968
+ example("does something") {}
969
+ end
970
+ end
971
+
972
+ it "includes the named examples" do
973
+ group = ExampleGroup.describe
974
+ group.send(name, "named this")
975
+ group.examples.first.description.should eq("does something")
976
+ end
977
+
978
+ it "raises a helpful error message when shared content is not found" do
979
+ group = ExampleGroup.describe
980
+ expect do
981
+ group.send(name, "shared stuff")
982
+ end.to raise_error(ArgumentError, /Could not find .* "shared stuff"/)
983
+ end
984
+
985
+ it "passes parameters to the shared content" do
986
+ passed_params = {}
987
+
988
+ shared_examples "named this with params" do |param1, param2|
989
+ it("has access to the given parameters") do
990
+ passed_params[:param1] = param1
991
+ passed_params[:param2] = param2
992
+ end
993
+ end
994
+
995
+ group = ExampleGroup.describe
996
+ group.send(name, "named this with params", :value1, :value2)
997
+ group.run
998
+
999
+ passed_params.should eq({ :param1 => :value1, :param2 => :value2 })
1000
+ end
1001
+
1002
+ it "adds shared instance methods to the group" do
1003
+ shared_examples "named this with params" do |param1|
1004
+ def foo; end
1005
+ end
1006
+ group = ExampleGroup.describe('fake group')
1007
+ group.send(name, "named this with params", :a)
1008
+ group.public_instance_methods.map{|m| m.to_s}.should include("foo")
1009
+ end
1010
+
1011
+ it "evals the shared example group only once" do
1012
+ eval_count = 0
1013
+ shared_examples("named this with params") { |p| eval_count += 1 }
1014
+ group = ExampleGroup.describe('fake group')
1015
+ group.send(name, "named this with params", :a)
1016
+ eval_count.should eq(1)
1017
+ end
1018
+
1019
+ it "evals the block when given" do
1020
+ key = "#{__FILE__}:#{__LINE__}"
1021
+ shared_examples(key) do
1022
+ it("does something") do
1023
+ foo.should eq("bar")
1024
+ end
1025
+ end
1026
+ group = ExampleGroup.describe do
1027
+ send name, key do
1028
+ def foo; "bar"; end
1029
+ end
1030
+ end
1031
+ group.run.should be_true
1032
+ end
1033
+ end
1034
+ end
1035
+
1036
+ describe "#it_should_behave_like" do
1037
+ it "creates a nested group" do
1038
+ shared_examples_for("thing") {}
1039
+ group = ExampleGroup.describe('fake group')
1040
+ group.it_should_behave_like("thing")
1041
+ group.should have(1).children
1042
+ end
1043
+
1044
+ it "creates a nested group for a class" do
1045
+ klass = Class.new
1046
+ shared_examples_for(klass) {}
1047
+ group = ExampleGroup.describe('fake group')
1048
+ group.it_should_behave_like(klass)
1049
+ group.should have(1).children
1050
+ end
1051
+
1052
+ it "adds shared examples to nested group" do
1053
+ shared_examples_for("thing") do
1054
+ it("does something")
1055
+ end
1056
+ group = ExampleGroup.describe('fake group')
1057
+ shared_group = group.it_should_behave_like("thing")
1058
+ shared_group.should have(1).examples
1059
+ end
1060
+
1061
+ it "adds shared instance methods to nested group" do
1062
+ shared_examples_for("thing") do
1063
+ def foo; end
1064
+ end
1065
+ group = ExampleGroup.describe('fake group')
1066
+ shared_group = group.it_should_behave_like("thing")
1067
+ shared_group.public_instance_methods.map{|m| m.to_s}.should include("foo")
1068
+ end
1069
+
1070
+ it "adds shared class methods to nested group" do
1071
+ shared_examples_for("thing") do
1072
+ def self.foo; end
1073
+ end
1074
+ group = ExampleGroup.describe('fake group')
1075
+ shared_group = group.it_should_behave_like("thing")
1076
+ shared_group.methods.map{|m| m.to_s}.should include("foo")
1077
+ end
1078
+
1079
+ it "passes parameters to the shared example group" do
1080
+ passed_params = {}
1081
+
1082
+ shared_examples_for("thing") do |param1, param2|
1083
+ it("has access to the given parameters") do
1084
+ passed_params[:param1] = param1
1085
+ passed_params[:param2] = param2
1086
+ end
1087
+ end
1088
+
1089
+ group = ExampleGroup.describe("group") do
1090
+ it_should_behave_like "thing", :value1, :value2
1091
+ end
1092
+ group.run
1093
+
1094
+ passed_params.should eq({ :param1 => :value1, :param2 => :value2 })
1095
+ end
1096
+
1097
+ it "adds shared instance methods to nested group" do
1098
+ shared_examples_for("thing") do |param1|
1099
+ def foo; end
1100
+ end
1101
+ group = ExampleGroup.describe('fake group')
1102
+ shared_group = group.it_should_behave_like("thing", :a)
1103
+ shared_group.public_instance_methods.map{|m| m.to_s}.should include("foo")
1104
+ end
1105
+
1106
+ it "evals the shared example group only once" do
1107
+ eval_count = 0
1108
+ shared_examples_for("thing") { |p| eval_count += 1 }
1109
+ group = ExampleGroup.describe('fake group')
1110
+ group.it_should_behave_like("thing", :a)
1111
+ eval_count.should eq(1)
1112
+ end
1113
+
1114
+ context "given a block" do
1115
+ it "evaluates the block in nested group" do
1116
+ scopes = []
1117
+ shared_examples_for("thing") do
1118
+ it("gets run in the nested group") do
1119
+ scopes << self.class
1120
+ end
1121
+ end
1122
+ group = ExampleGroup.describe("group") do
1123
+ it_should_behave_like "thing" do
1124
+ it("gets run in the same nested group") do
1125
+ scopes << self.class
1126
+ end
1127
+ end
1128
+ end
1129
+ group.run
1130
+
1131
+ scopes[0].should be(scopes[1])
1132
+ end
1133
+ end
1134
+
1135
+ it "raises a helpful error message when shared context is not found" do
1136
+ expect do
1137
+ ExampleGroup.describe do
1138
+ it_should_behave_like "shared stuff"
1139
+ end
1140
+ end.to raise_error(ArgumentError,%q|Could not find shared examples "shared stuff"|)
1141
+ end
1142
+ end
1143
+ end
1144
+ end