syllable_counter 0.0.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (652) hide show
  1. checksums.yaml +6 -14
  2. data/README.md +5 -2
  3. data/lib/syllable_counter.rb +7 -19
  4. data/lib/syllable_counter/calculate.rb +28 -0
  5. data/lib/syllable_counter/english_exceptions.rb +11 -0
  6. data/lib/syllable_counter/rules.rb +71 -0
  7. data/lib/syllable_counter/version.rb +1 -1
  8. data/spec/calculator_spec.rb +27 -0
  9. data/spec/rules_spec.rb +39 -0
  10. data/spec/spec_helper.rb +3 -0
  11. data/spec/syllable_counter_spec.rb +6 -75
  12. data/syllable_counter.gemspec +2 -2
  13. data/vendor/bundle/bin/autospec +23 -0
  14. data/vendor/bundle/bin/htmldiff +25 -0
  15. data/vendor/bundle/bin/ldiff +25 -0
  16. data/vendor/bundle/bin/rake +23 -0
  17. data/vendor/bundle/bin/rspec +23 -0
  18. data/vendor/bundle/build_info/diff-lcs-1.2.4.info +1 -0
  19. data/vendor/bundle/build_info/rake-10.1.0.info +1 -0
  20. data/vendor/bundle/build_info/rspec-2.14.1.info +1 -0
  21. data/vendor/bundle/build_info/rspec-core-2.14.5.info +1 -0
  22. data/vendor/bundle/build_info/rspec-expectations-2.14.2.info +1 -0
  23. data/vendor/bundle/build_info/rspec-mocks-2.14.3.info +1 -0
  24. data/vendor/bundle/gems/diff-lcs-1.2.4/.autotest +3 -0
  25. data/vendor/bundle/gems/diff-lcs-1.2.4/.gemtest +0 -0
  26. data/vendor/bundle/gems/diff-lcs-1.2.4/.hoerc +2 -0
  27. data/vendor/bundle/gems/diff-lcs-1.2.4/.rspec +2 -0
  28. data/vendor/bundle/gems/diff-lcs-1.2.4/.travis.yml +22 -0
  29. data/vendor/bundle/gems/diff-lcs-1.2.4/Contributing.rdoc +64 -0
  30. data/vendor/bundle/gems/diff-lcs-1.2.4/Gemfile +20 -0
  31. data/vendor/bundle/gems/diff-lcs-1.2.4/History.rdoc +146 -0
  32. data/vendor/bundle/gems/diff-lcs-1.2.4/License.rdoc +39 -0
  33. data/vendor/bundle/gems/diff-lcs-1.2.4/Manifest.txt +38 -0
  34. data/vendor/bundle/gems/diff-lcs-1.2.4/README.rdoc +85 -0
  35. data/vendor/bundle/gems/diff-lcs-1.2.4/Rakefile +39 -0
  36. data/vendor/bundle/gems/diff-lcs-1.2.4/autotest/discover.rb +1 -0
  37. data/vendor/bundle/gems/diff-lcs-1.2.4/bin/htmldiff +32 -0
  38. data/vendor/bundle/gems/diff-lcs-1.2.4/bin/ldiff +6 -0
  39. data/vendor/bundle/gems/diff-lcs-1.2.4/docs/COPYING.txt +339 -0
  40. data/vendor/bundle/gems/diff-lcs-1.2.4/docs/artistic.txt +127 -0
  41. data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff-lcs.rb +3 -0
  42. data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs.rb +805 -0
  43. data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/array.rb +7 -0
  44. data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/block.rb +37 -0
  45. data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/callbacks.rb +322 -0
  46. data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/change.rb +177 -0
  47. data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/htmldiff.rb +149 -0
  48. data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/hunk.rb +276 -0
  49. data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/internals.rb +301 -0
  50. data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/ldiff.rb +195 -0
  51. data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/string.rb +5 -0
  52. data/vendor/bundle/gems/diff-lcs-1.2.4/spec/change_spec.rb +65 -0
  53. data/vendor/bundle/gems/diff-lcs-1.2.4/spec/diff_spec.rb +47 -0
  54. data/vendor/bundle/gems/diff-lcs-1.2.4/spec/hunk_spec.rb +72 -0
  55. data/vendor/bundle/gems/diff-lcs-1.2.4/spec/issues_spec.rb +24 -0
  56. data/vendor/bundle/gems/diff-lcs-1.2.4/spec/lcs_spec.rb +54 -0
  57. data/vendor/bundle/gems/diff-lcs-1.2.4/spec/patch_spec.rb +414 -0
  58. data/vendor/bundle/gems/diff-lcs-1.2.4/spec/sdiff_spec.rb +202 -0
  59. data/vendor/bundle/gems/diff-lcs-1.2.4/spec/spec_helper.rb +290 -0
  60. data/vendor/bundle/gems/diff-lcs-1.2.4/spec/traverse_balanced_spec.rb +310 -0
  61. data/vendor/bundle/gems/diff-lcs-1.2.4/spec/traverse_sequences_spec.rb +139 -0
  62. data/vendor/bundle/gems/rake-10.1.0/.gemtest +0 -0
  63. data/vendor/bundle/gems/rake-10.1.0/CHANGES +530 -0
  64. data/vendor/bundle/gems/rake-10.1.0/MIT-LICENSE +21 -0
  65. data/vendor/bundle/gems/rake-10.1.0/README.rdoc +187 -0
  66. data/vendor/bundle/gems/rake-10.1.0/Rakefile +375 -0
  67. data/vendor/bundle/gems/rake-10.1.0/TODO +21 -0
  68. data/vendor/bundle/gems/rake-10.1.0/bin/rake +33 -0
  69. data/vendor/bundle/gems/rake-10.1.0/install.rb +80 -0
  70. data/vendor/bundle/gems/rake-10.1.0/lib/rake.rb +73 -0
  71. data/vendor/bundle/gems/rake-10.1.0/lib/rake/alt_system.rb +108 -0
  72. data/vendor/bundle/gems/rake-10.1.0/lib/rake/application.rb +728 -0
  73. data/vendor/bundle/gems/rake-10.1.0/lib/rake/backtrace.rb +20 -0
  74. data/vendor/bundle/gems/rake-10.1.0/lib/rake/clean.rb +55 -0
  75. data/vendor/bundle/gems/rake-10.1.0/lib/rake/cloneable.rb +16 -0
  76. data/vendor/bundle/gems/rake-10.1.0/lib/rake/contrib/compositepublisher.rb +21 -0
  77. data/vendor/bundle/gems/rake-10.1.0/lib/rake/contrib/ftptools.rb +139 -0
  78. data/vendor/bundle/gems/rake-10.1.0/lib/rake/contrib/publisher.rb +73 -0
  79. data/vendor/bundle/gems/rake-10.1.0/lib/rake/contrib/rubyforgepublisher.rb +16 -0
  80. data/vendor/bundle/gems/rake-10.1.0/lib/rake/contrib/sshpublisher.rb +50 -0
  81. data/vendor/bundle/gems/rake-10.1.0/lib/rake/contrib/sys.rb +2 -0
  82. data/vendor/bundle/gems/rake-10.1.0/lib/rake/default_loader.rb +10 -0
  83. data/vendor/bundle/gems/rake-10.1.0/lib/rake/dsl_definition.rb +157 -0
  84. data/vendor/bundle/gems/rake-10.1.0/lib/rake/early_time.rb +18 -0
  85. data/vendor/bundle/gems/rake-10.1.0/lib/rake/ext/core.rb +28 -0
  86. data/vendor/bundle/gems/rake-10.1.0/lib/rake/ext/module.rb +0 -0
  87. data/vendor/bundle/gems/rake-10.1.0/lib/rake/ext/string.rb +166 -0
  88. data/vendor/bundle/gems/rake-10.1.0/lib/rake/ext/time.rb +15 -0
  89. data/vendor/bundle/gems/rake-10.1.0/lib/rake/file_creation_task.rb +24 -0
  90. data/vendor/bundle/gems/rake-10.1.0/lib/rake/file_list.rb +416 -0
  91. data/vendor/bundle/gems/rake-10.1.0/lib/rake/file_task.rb +46 -0
  92. data/vendor/bundle/gems/rake-10.1.0/lib/rake/file_utils.rb +116 -0
  93. data/vendor/bundle/gems/rake-10.1.0/lib/rake/file_utils_ext.rb +144 -0
  94. data/vendor/bundle/gems/rake-10.1.0/lib/rake/gempackagetask.rb +2 -0
  95. data/vendor/bundle/gems/rake-10.1.0/lib/rake/invocation_chain.rb +57 -0
  96. data/vendor/bundle/gems/rake-10.1.0/lib/rake/invocation_exception_mixin.rb +16 -0
  97. data/vendor/bundle/gems/rake-10.1.0/lib/rake/linked_list.rb +103 -0
  98. data/vendor/bundle/gems/rake-10.1.0/lib/rake/loaders/makefile.rb +40 -0
  99. data/vendor/bundle/gems/rake-10.1.0/lib/rake/multi_task.rb +13 -0
  100. data/vendor/bundle/gems/rake-10.1.0/lib/rake/name_space.rb +25 -0
  101. data/vendor/bundle/gems/rake-10.1.0/lib/rake/packagetask.rb +190 -0
  102. data/vendor/bundle/gems/rake-10.1.0/lib/rake/pathmap.rb +1 -0
  103. data/vendor/bundle/gems/rake-10.1.0/lib/rake/phony.rb +15 -0
  104. data/vendor/bundle/gems/rake-10.1.0/lib/rake/private_reader.rb +20 -0
  105. data/vendor/bundle/gems/rake-10.1.0/lib/rake/promise.rb +99 -0
  106. data/vendor/bundle/gems/rake-10.1.0/lib/rake/pseudo_status.rb +29 -0
  107. data/vendor/bundle/gems/rake-10.1.0/lib/rake/rake_module.rb +37 -0
  108. data/vendor/bundle/gems/rake-10.1.0/lib/rake/rake_test_loader.rb +22 -0
  109. data/vendor/bundle/gems/rake-10.1.0/lib/rake/rdoctask.rb +2 -0
  110. data/vendor/bundle/gems/rake-10.1.0/lib/rake/ruby182_test_unit_fix.rb +27 -0
  111. data/vendor/bundle/gems/rake-10.1.0/lib/rake/rule_recursion_overflow_error.rb +20 -0
  112. data/vendor/bundle/gems/rake-10.1.0/lib/rake/runtest.rb +22 -0
  113. data/vendor/bundle/gems/rake-10.1.0/lib/rake/scope.rb +42 -0
  114. data/vendor/bundle/gems/rake-10.1.0/lib/rake/task.rb +378 -0
  115. data/vendor/bundle/gems/rake-10.1.0/lib/rake/task_argument_error.rb +7 -0
  116. data/vendor/bundle/gems/rake-10.1.0/lib/rake/task_arguments.rb +89 -0
  117. data/vendor/bundle/gems/rake-10.1.0/lib/rake/task_manager.rb +297 -0
  118. data/vendor/bundle/gems/rake-10.1.0/lib/rake/tasklib.rb +22 -0
  119. data/vendor/bundle/gems/rake-10.1.0/lib/rake/testtask.rb +201 -0
  120. data/vendor/bundle/gems/rake-10.1.0/lib/rake/thread_history_display.rb +48 -0
  121. data/vendor/bundle/gems/rake-10.1.0/lib/rake/thread_pool.rb +161 -0
  122. data/vendor/bundle/gems/rake-10.1.0/lib/rake/trace_output.rb +22 -0
  123. data/vendor/bundle/gems/rake-10.1.0/lib/rake/version.rb +9 -0
  124. data/vendor/bundle/gems/rake-10.1.0/lib/rake/win32.rb +56 -0
  125. data/vendor/bundle/gems/rake-10.1.0/test/file_creation.rb +34 -0
  126. data/vendor/bundle/gems/rake-10.1.0/test/helper.rb +128 -0
  127. data/vendor/bundle/gems/rake-10.1.0/test/support/rakefile_definitions.rb +444 -0
  128. data/vendor/bundle/gems/rake-10.1.0/test/support/ruby_runner.rb +33 -0
  129. data/vendor/bundle/gems/rake-10.1.0/test/test_private_reader.rb +42 -0
  130. data/vendor/bundle/gems/rake-10.1.0/test/test_rake.rb +40 -0
  131. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_application.rb +517 -0
  132. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_application_options.rb +457 -0
  133. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_backtrace.rb +113 -0
  134. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_clean.rb +46 -0
  135. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_definitions.rb +79 -0
  136. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_directory_task.rb +57 -0
  137. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_dsl.rb +40 -0
  138. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_early_time.rb +31 -0
  139. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_extension.rb +59 -0
  140. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_file_creation_task.rb +56 -0
  141. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_file_list.rb +627 -0
  142. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_file_list_path_map.rb +8 -0
  143. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_file_task.rb +122 -0
  144. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_file_utils.rb +309 -0
  145. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_ftp_file.rb +74 -0
  146. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_functional.rb +466 -0
  147. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_invocation_chain.rb +64 -0
  148. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_linked_list.rb +84 -0
  149. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_makefile_loader.rb +46 -0
  150. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_multi_task.rb +58 -0
  151. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_name_space.rb +43 -0
  152. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_package_task.rb +79 -0
  153. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_path_map.rb +168 -0
  154. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_path_map_explode.rb +34 -0
  155. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_path_map_partial.rb +18 -0
  156. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_pseudo_status.rb +21 -0
  157. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_rake_test_loader.rb +20 -0
  158. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_reduce_compat.rb +26 -0
  159. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_require.rb +40 -0
  160. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_rules.rb +362 -0
  161. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_scope.rb +44 -0
  162. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_task.rb +376 -0
  163. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_task_argument_parsing.rb +103 -0
  164. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_task_arguments.rb +121 -0
  165. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_task_lib.rb +9 -0
  166. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_task_manager.rb +158 -0
  167. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_task_manager_argument_resolution.rb +19 -0
  168. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_task_with_arguments.rb +171 -0
  169. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_test_task.rb +119 -0
  170. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_thread_pool.rb +142 -0
  171. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_top_level_functions.rb +71 -0
  172. data/vendor/bundle/gems/rake-10.1.0/test/test_rake_win32.rb +72 -0
  173. data/vendor/bundle/gems/rake-10.1.0/test/test_thread_history_display.rb +101 -0
  174. data/vendor/bundle/gems/rake-10.1.0/test/test_trace_output.rb +52 -0
  175. data/vendor/bundle/gems/rspec-2.14.1/License.txt +24 -0
  176. data/vendor/bundle/gems/rspec-2.14.1/README.md +47 -0
  177. data/vendor/bundle/gems/rspec-2.14.1/lib/rspec.rb +3 -0
  178. data/vendor/bundle/gems/rspec-2.14.1/lib/rspec/version.rb +5 -0
  179. data/vendor/bundle/gems/rspec-core-2.14.5/.document +5 -0
  180. data/vendor/bundle/gems/rspec-core-2.14.5/.yardopts +6 -0
  181. data/vendor/bundle/gems/rspec-core-2.14.5/Changelog.md +881 -0
  182. data/vendor/bundle/gems/rspec-core-2.14.5/License.txt +24 -0
  183. data/vendor/bundle/gems/rspec-core-2.14.5/README.md +261 -0
  184. data/vendor/bundle/gems/rspec-core-2.14.5/exe/autospec +13 -0
  185. data/vendor/bundle/gems/rspec-core-2.14.5/exe/rspec +25 -0
  186. data/vendor/bundle/gems/rspec-core-2.14.5/features/Autotest.md +38 -0
  187. data/vendor/bundle/gems/rspec-core-2.14.5/features/README.md +17 -0
  188. data/vendor/bundle/gems/rspec-core-2.14.5/features/Upgrade.md +364 -0
  189. data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/README.md +28 -0
  190. data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/example_name_option.feature +97 -0
  191. data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/exit_status.feature +82 -0
  192. data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/format_option.feature +75 -0
  193. data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/init.feature +18 -0
  194. data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/line_number_appended_to_path.feature +140 -0
  195. data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/line_number_option.feature +58 -0
  196. data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/order.feature +29 -0
  197. data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/pattern_option.feature +49 -0
  198. data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/rake_task.feature +122 -0
  199. data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/require_option.feature +43 -0
  200. data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/ruby.feature +22 -0
  201. data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/tag.feature +98 -0
  202. data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/warnings_option.feature +29 -0
  203. data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/alias_example_to.feature +48 -0
  204. data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/backtrace_clean_patterns.feature +102 -0
  205. data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/custom_settings.feature +84 -0
  206. data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/default_path.feature +38 -0
  207. data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/deprecation_stream.feature +58 -0
  208. data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/fail_fast.feature +77 -0
  209. data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/failure_exit_code.feature +36 -0
  210. data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/order_and_seed.feature +3 -0
  211. data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/output_stream.feature +24 -0
  212. data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/pattern.feature +38 -0
  213. data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/profile.feature +220 -0
  214. data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/read_options_from_file.feature +90 -0
  215. data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/run_all_when_everything_filtered.feature +76 -0
  216. data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/show_failures_in_pending_blocks.feature +61 -0
  217. data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/treat_symbols_as_metadata_keys_with_true_values.feature +52 -0
  218. data/vendor/bundle/gems/rspec-core-2.14.5/features/example_groups/basic_structure.feature +55 -0
  219. data/vendor/bundle/gems/rspec-core-2.14.5/features/example_groups/shared_context.feature +74 -0
  220. data/vendor/bundle/gems/rspec-core-2.14.5/features/example_groups/shared_examples.feature +294 -0
  221. data/vendor/bundle/gems/rspec-core-2.14.5/features/expectation_framework_integration/configure_expectation_framework.feature +102 -0
  222. data/vendor/bundle/gems/rspec-core-2.14.5/features/filtering/exclusion_filters.feature +138 -0
  223. data/vendor/bundle/gems/rspec-core-2.14.5/features/filtering/if_and_unless.feature +168 -0
  224. data/vendor/bundle/gems/rspec-core-2.14.5/features/filtering/inclusion_filters.feature +105 -0
  225. data/vendor/bundle/gems/rspec-core-2.14.5/features/formatters/configurable_colors.feature +31 -0
  226. data/vendor/bundle/gems/rspec-core-2.14.5/features/formatters/custom_formatter.feature +36 -0
  227. data/vendor/bundle/gems/rspec-core-2.14.5/features/formatters/json_formatter.feature +30 -0
  228. data/vendor/bundle/gems/rspec-core-2.14.5/features/formatters/text_formatter.feature +46 -0
  229. data/vendor/bundle/gems/rspec-core-2.14.5/features/helper_methods/arbitrary_methods.feature +40 -0
  230. data/vendor/bundle/gems/rspec-core-2.14.5/features/helper_methods/let.feature +50 -0
  231. data/vendor/bundle/gems/rspec-core-2.14.5/features/helper_methods/modules.feature +149 -0
  232. data/vendor/bundle/gems/rspec-core-2.14.5/features/hooks/around_hooks.feature +343 -0
  233. data/vendor/bundle/gems/rspec-core-2.14.5/features/hooks/before_and_after_hooks.feature +427 -0
  234. data/vendor/bundle/gems/rspec-core-2.14.5/features/hooks/filtering.feature +234 -0
  235. data/vendor/bundle/gems/rspec-core-2.14.5/features/metadata/current_example.feature +17 -0
  236. data/vendor/bundle/gems/rspec-core-2.14.5/features/metadata/described_class.feature +17 -0
  237. data/vendor/bundle/gems/rspec-core-2.14.5/features/metadata/user_defined.feature +113 -0
  238. data/vendor/bundle/gems/rspec-core-2.14.5/features/mock_framework_integration/use_any_framework.feature +106 -0
  239. data/vendor/bundle/gems/rspec-core-2.14.5/features/mock_framework_integration/use_flexmock.feature +96 -0
  240. data/vendor/bundle/gems/rspec-core-2.14.5/features/mock_framework_integration/use_mocha.feature +97 -0
  241. data/vendor/bundle/gems/rspec-core-2.14.5/features/mock_framework_integration/use_rr.feature +98 -0
  242. data/vendor/bundle/gems/rspec-core-2.14.5/features/mock_framework_integration/use_rspec.feature +97 -0
  243. data/vendor/bundle/gems/rspec-core-2.14.5/features/pending/pending_examples.feature +229 -0
  244. data/vendor/bundle/gems/rspec-core-2.14.5/features/spec_files/arbitrary_file_suffix.feature +13 -0
  245. data/vendor/bundle/gems/rspec-core-2.14.5/features/step_definitions/additional_cli_steps.rb +49 -0
  246. data/vendor/bundle/gems/rspec-core-2.14.5/features/subject/attribute_of_subject.feature +124 -0
  247. data/vendor/bundle/gems/rspec-core-2.14.5/features/subject/explicit_subject.feature +101 -0
  248. data/vendor/bundle/gems/rspec-core-2.14.5/features/subject/implicit_receiver.feature +29 -0
  249. data/vendor/bundle/gems/rspec-core-2.14.5/features/subject/implicit_subject.feature +63 -0
  250. data/vendor/bundle/gems/rspec-core-2.14.5/features/support/env.rb +14 -0
  251. data/vendor/bundle/gems/rspec-core-2.14.5/features/support/rubinius.rb +6 -0
  252. data/vendor/bundle/gems/rspec-core-2.14.5/lib/autotest/discover.rb +1 -0
  253. data/vendor/bundle/gems/rspec-core-2.14.5/lib/autotest/rspec2.rb +73 -0
  254. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/autorun.rb +2 -0
  255. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core.rb +169 -0
  256. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/backtrace_cleaner.rb +46 -0
  257. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/backward_compatibility.rb +55 -0
  258. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/command_line.rb +36 -0
  259. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/configuration.rb +1174 -0
  260. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/configuration_options.rb +156 -0
  261. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/deprecation.rb +31 -0
  262. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/drb_command_line.rb +26 -0
  263. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/drb_options.rb +87 -0
  264. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/dsl.rb +26 -0
  265. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/example.rb +331 -0
  266. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/example_group.rb +479 -0
  267. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/extensions/instance_eval_with_args.rb +44 -0
  268. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/extensions/kernel.rb +9 -0
  269. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/extensions/module_eval_with_args.rb +38 -0
  270. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/extensions/ordered.rb +27 -0
  271. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/filter_manager.rb +203 -0
  272. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters.rb +55 -0
  273. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/base_formatter.rb +246 -0
  274. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/base_text_formatter.rb +329 -0
  275. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/deprecation_formatter.rb +39 -0
  276. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/documentation_formatter.rb +67 -0
  277. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/helpers.rb +110 -0
  278. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/html_formatter.rb +155 -0
  279. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/html_printer.rb +408 -0
  280. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/json_formatter.rb +70 -0
  281. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/progress_formatter.rb +32 -0
  282. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/snippet_extractor.rb +92 -0
  283. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/text_mate_formatter.rb +34 -0
  284. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/hooks.rb +519 -0
  285. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/memoized_helpers.rb +514 -0
  286. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/metadata.rb +299 -0
  287. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/metadata_hash_builder.rb +97 -0
  288. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/mocking/with_absolutely_nothing.rb +11 -0
  289. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/mocking/with_flexmock.rb +27 -0
  290. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/mocking/with_mocha.rb +52 -0
  291. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/mocking/with_rr.rb +27 -0
  292. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/mocking/with_rspec.rb +27 -0
  293. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/option_parser.rb +219 -0
  294. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/pending.rb +109 -0
  295. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/project_initializer.rb +86 -0
  296. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/rake_task.rb +206 -0
  297. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/reporter.rb +132 -0
  298. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/ruby_project.rb +44 -0
  299. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/runner.rb +87 -0
  300. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/shared_context.rb +55 -0
  301. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/shared_example_group.rb +185 -0
  302. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/shared_example_group/collection.rb +43 -0
  303. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/version.rb +8 -0
  304. data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/world.rb +127 -0
  305. data/vendor/bundle/gems/rspec-core-2.14.5/spec/autotest/discover_spec.rb +19 -0
  306. data/vendor/bundle/gems/rspec-core-2.14.5/spec/autotest/failed_results_re_spec.rb +45 -0
  307. data/vendor/bundle/gems/rspec-core-2.14.5/spec/autotest/rspec_spec.rb +133 -0
  308. data/vendor/bundle/gems/rspec-core-2.14.5/spec/command_line/order_spec.rb +204 -0
  309. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/backtrace_cleaner_spec.rb +68 -0
  310. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/command_line_spec.rb +108 -0
  311. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/command_line_spec_output.txt +0 -0
  312. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/configuration_options_spec.rb +417 -0
  313. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/configuration_spec.rb +1561 -0
  314. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/deprecation_spec.rb +46 -0
  315. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/deprecations_spec.rb +73 -0
  316. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/drb_command_line_spec.rb +102 -0
  317. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/drb_options_spec.rb +193 -0
  318. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/dsl_spec.rb +25 -0
  319. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/example_group_spec.rb +1187 -0
  320. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/example_spec.rb +439 -0
  321. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/filter_manager_spec.rb +246 -0
  322. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/base_formatter_spec.rb +108 -0
  323. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/base_text_formatter_spec.rb +494 -0
  324. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/deprecation_formatter_spec.rb +96 -0
  325. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/documentation_formatter_spec.rb +88 -0
  326. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/helpers_spec.rb +94 -0
  327. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-1.8.7-jruby.html +404 -0
  328. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-1.8.7-rbx.html +477 -0
  329. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-1.8.7.html +414 -0
  330. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-1.9.2.html +425 -0
  331. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-1.9.3-jruby.html +404 -0
  332. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-1.9.3-rbx.html +477 -0
  333. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-1.9.3.html +425 -0
  334. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-2.0.0.html +425 -0
  335. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatter_spec.rb +95 -0
  336. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/json_formatter_spec.rb +115 -0
  337. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/progress_formatter_spec.rb +30 -0
  338. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/snippet_extractor_spec.rb +26 -0
  339. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-1.8.7-jruby.html +395 -0
  340. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-1.8.7-rbx.html +477 -0
  341. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-1.8.7.html +414 -0
  342. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-1.9.2.html +425 -0
  343. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-1.9.3-jruby.html +404 -0
  344. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-1.9.3-rbx.html +477 -0
  345. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-1.9.3.html +425 -0
  346. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-2.0.0.html +425 -0
  347. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatter_spec.rb +96 -0
  348. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/hooks_filtering_spec.rb +227 -0
  349. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/hooks_spec.rb +267 -0
  350. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/kernel_extensions_spec.rb +9 -0
  351. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/memoized_helpers_spec.rb +688 -0
  352. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/metadata_spec.rb +491 -0
  353. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/option_parser_spec.rb +242 -0
  354. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/pending_example_spec.rb +220 -0
  355. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/project_initializer_spec.rb +130 -0
  356. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/rake_task_spec.rb +181 -0
  357. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/reporter_spec.rb +141 -0
  358. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/resources/a_bar.rb +0 -0
  359. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/resources/a_foo.rb +0 -0
  360. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/resources/a_spec.rb +1 -0
  361. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/resources/custom_example_group_runner.rb +14 -0
  362. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/resources/formatter_specs.rb +60 -0
  363. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/resources/utf8_encoded.rb +8 -0
  364. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/rspec_matchers_spec.rb +45 -0
  365. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/ruby_project_spec.rb +26 -0
  366. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/runner_spec.rb +82 -0
  367. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/shared_context_spec.rb +114 -0
  368. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/shared_example_group/collection_spec.rb +70 -0
  369. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/shared_example_group_spec.rb +120 -0
  370. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/world_spec.rb +142 -0
  371. data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core_spec.rb +74 -0
  372. data/vendor/bundle/gems/rspec-core-2.14.5/spec/spec_helper.rb +132 -0
  373. data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/config_options_helper.rb +15 -0
  374. data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/helper_methods.rb +36 -0
  375. data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/isolate_load_path_mutation.rb +6 -0
  376. data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/isolated_directory.rb +10 -0
  377. data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/isolated_home_directory.rb +16 -0
  378. data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/matchers.rb +65 -0
  379. data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/sandboxed_mock_space.rb +100 -0
  380. data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/shared_example_groups.rb +41 -0
  381. data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/spec_files.rb +44 -0
  382. data/vendor/bundle/gems/rspec-expectations-2.14.2/.document +5 -0
  383. data/vendor/bundle/gems/rspec-expectations-2.14.2/.yardopts +6 -0
  384. data/vendor/bundle/gems/rspec-expectations-2.14.2/Changelog.md +399 -0
  385. data/vendor/bundle/gems/rspec-expectations-2.14.2/License.txt +23 -0
  386. data/vendor/bundle/gems/rspec-expectations-2.14.2/README.md +184 -0
  387. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/README.md +48 -0
  388. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/Upgrade.md +53 -0
  389. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/README.md +90 -0
  390. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/be.feature +175 -0
  391. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/be_within.feature +48 -0
  392. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/cover.feature +47 -0
  393. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/end_with.feature +48 -0
  394. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/equality.feature +139 -0
  395. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/exist.feature +45 -0
  396. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/expect_change.feature +59 -0
  397. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/expect_error.feature +144 -0
  398. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/have.feature +109 -0
  399. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/include.feature +174 -0
  400. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/match.feature +52 -0
  401. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/operators.feature +227 -0
  402. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/predicates.feature +137 -0
  403. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/respond_to.feature +84 -0
  404. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/satisfy.feature +33 -0
  405. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/start_with.feature +48 -0
  406. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/throw_symbol.feature +91 -0
  407. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/types.feature +116 -0
  408. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/yield.feature +161 -0
  409. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/custom_matchers/access_running_example.feature +53 -0
  410. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/custom_matchers/define_diffable_matcher.feature +27 -0
  411. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/custom_matchers/define_matcher.feature +368 -0
  412. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/custom_matchers/define_matcher_outside_rspec.feature +38 -0
  413. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/custom_matchers/define_matcher_with_fluent_interface.feature +24 -0
  414. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/customized_message.feature +22 -0
  415. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/diffing.feature +85 -0
  416. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/implicit_docstrings.feature +52 -0
  417. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/step_definitions/additional_cli_steps.rb +22 -0
  418. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/support/env.rb +14 -0
  419. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/support/rubinius.rb +6 -0
  420. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/syntax_configuration.feature +71 -0
  421. data/vendor/bundle/gems/rspec-expectations-2.14.2/features/test_frameworks/test_unit.feature +44 -0
  422. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec-expectations.rb +1 -0
  423. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations.rb +47 -0
  424. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/deprecation.rb +17 -0
  425. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/differ.rb +140 -0
  426. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/errors.rb +9 -0
  427. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/expectation_target.rb +87 -0
  428. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/extensions.rb +2 -0
  429. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/extensions/array.rb +9 -0
  430. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/extensions/object.rb +29 -0
  431. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/fail_with.rb +79 -0
  432. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/handler.rb +68 -0
  433. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/syntax.rb +164 -0
  434. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/version.rb +9 -0
  435. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers.rb +697 -0
  436. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/be_close.rb +9 -0
  437. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in.rb +39 -0
  438. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/base_matcher.rb +68 -0
  439. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/be.rb +197 -0
  440. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/be_instance_of.rb +15 -0
  441. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/be_kind_of.rb +11 -0
  442. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/be_within.rb +55 -0
  443. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/change.rb +141 -0
  444. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/cover.rb +21 -0
  445. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/eq.rb +22 -0
  446. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/eql.rb +23 -0
  447. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/equal.rb +48 -0
  448. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/exist.rb +26 -0
  449. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/has.rb +48 -0
  450. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/have.rb +124 -0
  451. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/include.rb +61 -0
  452. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/match.rb +12 -0
  453. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/match_array.rb +51 -0
  454. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/raise_error.rb +123 -0
  455. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/respond_to.rb +74 -0
  456. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/satisfy.rb +30 -0
  457. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/start_and_end_with.rb +48 -0
  458. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/throw_symbol.rb +94 -0
  459. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/yield.rb +296 -0
  460. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/compatibility.rb +14 -0
  461. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/configuration.rb +108 -0
  462. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/dsl.rb +24 -0
  463. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/extensions/instance_eval_with_args.rb +39 -0
  464. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/generated_descriptions.rb +35 -0
  465. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/matcher.rb +300 -0
  466. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/method_missing.rb +12 -0
  467. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/operator_matcher.rb +109 -0
  468. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/pretty.rb +70 -0
  469. data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/test_unit_integration.rb +11 -0
  470. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/expectations/differ_spec.rb +203 -0
  471. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/expectations/expectation_target_spec.rb +82 -0
  472. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/expectations/extensions/kernel_spec.rb +67 -0
  473. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/expectations/fail_with_spec.rb +114 -0
  474. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/expectations/handler_spec.rb +227 -0
  475. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/expectations/syntax_spec.rb +139 -0
  476. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/base_matcher_spec.rb +62 -0
  477. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/be_close_spec.rb +22 -0
  478. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/be_instance_of_spec.rb +63 -0
  479. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/be_kind_of_spec.rb +41 -0
  480. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/be_spec.rb +522 -0
  481. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/be_within_spec.rb +137 -0
  482. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/change_spec.rb +567 -0
  483. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/configuration_spec.rb +206 -0
  484. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/cover_spec.rb +69 -0
  485. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/description_generation_spec.rb +190 -0
  486. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/dsl_spec.rb +57 -0
  487. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/eq_spec.rb +60 -0
  488. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/eql_spec.rb +41 -0
  489. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/equal_spec.rb +78 -0
  490. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/exist_spec.rb +124 -0
  491. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/has_spec.rb +122 -0
  492. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/have_spec.rb +455 -0
  493. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/include_matcher_integration_spec.rb +30 -0
  494. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/include_spec.rb +531 -0
  495. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/match_array_spec.rb +194 -0
  496. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/match_spec.rb +61 -0
  497. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/matcher_spec.rb +471 -0
  498. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/matchers_spec.rb +37 -0
  499. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/method_missing_spec.rb +28 -0
  500. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/operator_matcher_spec.rb +223 -0
  501. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/raise_error_spec.rb +485 -0
  502. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/respond_to_spec.rb +292 -0
  503. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/satisfy_spec.rb +44 -0
  504. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/start_with_end_with_spec.rb +186 -0
  505. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/throw_symbol_spec.rb +116 -0
  506. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/yield_spec.rb +514 -0
  507. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/spec_helper.rb +54 -0
  508. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/support/classes.rb +56 -0
  509. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/support/in_sub_process.rb +38 -0
  510. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/support/matchers.rb +22 -0
  511. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/support/ruby_version.rb +10 -0
  512. data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/support/shared_examples.rb +13 -0
  513. data/vendor/bundle/gems/rspec-mocks-2.14.3/.document +5 -0
  514. data/vendor/bundle/gems/rspec-mocks-2.14.3/.yardopts +6 -0
  515. data/vendor/bundle/gems/rspec-mocks-2.14.3/Changelog.md +410 -0
  516. data/vendor/bundle/gems/rspec-mocks-2.14.3/License.txt +23 -0
  517. data/vendor/bundle/gems/rspec-mocks-2.14.3/README.md +315 -0
  518. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/README.md +67 -0
  519. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/Scope.md +17 -0
  520. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/Upgrade.md +22 -0
  521. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/argument_matchers/README.md +27 -0
  522. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/argument_matchers/explicit.feature +59 -0
  523. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/argument_matchers/general_matchers.feature +85 -0
  524. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/argument_matchers/type_matchers.feature +26 -0
  525. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/README.md +73 -0
  526. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/allow_any_instance_of.feature +26 -0
  527. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/any_instance.feature +21 -0
  528. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/block_local_expectations.feature.pending +55 -0
  529. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/call_original.feature +24 -0
  530. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/expect_any_instance_of.feature +27 -0
  531. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/expect_message_using_expect.feature +107 -0
  532. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/expect_message_using_should_receive.feature +118 -0
  533. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/receive_counts.feature +209 -0
  534. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/warn_when_expectation_is_set_on_nil.feature +50 -0
  535. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/README.md +73 -0
  536. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/any_instance.feature +136 -0
  537. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/as_null_object.feature +40 -0
  538. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/simple_return_value_with_allow.feature +44 -0
  539. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/simple_return_value_with_stub.feature +64 -0
  540. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/stub_chain.feature +51 -0
  541. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/stub_implementation.feature +48 -0
  542. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/to_ary.feature +51 -0
  543. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/mutating_constants/README.md +82 -0
  544. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/mutating_constants/hiding_defined_constant.feature +64 -0
  545. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/mutating_constants/stub_defined_constant.feature +79 -0
  546. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/mutating_constants/stub_undefined_constant.feature +50 -0
  547. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/outside_rspec/configuration.feature +62 -0
  548. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/outside_rspec/standalone.feature +33 -0
  549. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/spies/spy_partial_mock_method.feature +34 -0
  550. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/spies/spy_pure_mock_method.feature +76 -0
  551. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/spies/spy_unstubbed_method.feature +18 -0
  552. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/step_definitions/additional_cli_steps.rb +11 -0
  553. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/support/env.rb +13 -0
  554. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/support/rubinius.rb +6 -0
  555. data/vendor/bundle/gems/rspec-mocks-2.14.3/features/test_frameworks/test_unit.feature +43 -0
  556. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks.rb +92 -0
  557. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/any_instance/chain.rb +93 -0
  558. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/any_instance/expectation_chain.rb +42 -0
  559. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/any_instance/message_chains.rb +60 -0
  560. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/any_instance/recorder.rb +206 -0
  561. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/any_instance/stub_chain.rb +38 -0
  562. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/any_instance/stub_chain_chain.rb +23 -0
  563. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/argument_list_matcher.rb +97 -0
  564. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/argument_matchers.rb +238 -0
  565. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/configuration.rb +55 -0
  566. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/deprecation.rb +18 -0
  567. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/error_generator.rb +179 -0
  568. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/errors.rb +12 -0
  569. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/example_methods.rb +156 -0
  570. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/extensions/instance_exec.rb +34 -0
  571. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/extensions/marshal.rb +17 -0
  572. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/framework.rb +34 -0
  573. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/instance_method_stasher.rb +94 -0
  574. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/matchers/have_received.rb +93 -0
  575. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/matchers/receive.rb +96 -0
  576. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/message_expectation.rb +583 -0
  577. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/method_double.rb +265 -0
  578. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/mock.rb +7 -0
  579. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/mutate_const.rb +403 -0
  580. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/order_group.rb +40 -0
  581. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/proxy.rb +216 -0
  582. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/proxy_for_nil.rb +37 -0
  583. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/space.rb +87 -0
  584. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/standalone.rb +3 -0
  585. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/stub_chain.rb +51 -0
  586. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/syntax.rb +349 -0
  587. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/targets.rb +69 -0
  588. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/test_double.rb +135 -0
  589. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/version.rb +7 -0
  590. data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/spec/mocks.rb +4 -0
  591. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/and_call_original_spec.rb +243 -0
  592. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/and_yield_spec.rb +127 -0
  593. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/any_instance/message_chains_spec.rb +40 -0
  594. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/any_instance_spec.rb +963 -0
  595. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/any_number_of_times_spec.rb +36 -0
  596. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/argument_expectation_spec.rb +32 -0
  597. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/at_least_spec.rb +151 -0
  598. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/at_most_spec.rb +90 -0
  599. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/block_return_value_spec.rb +88 -0
  600. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_10260_spec.rb +8 -0
  601. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_10263_spec.rb +27 -0
  602. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_11545_spec.rb +32 -0
  603. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_496_spec.rb +17 -0
  604. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_600_spec.rb +22 -0
  605. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_7611_spec.rb +16 -0
  606. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_8165_spec.rb +31 -0
  607. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_830_spec.rb +21 -0
  608. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_957_spec.rb +22 -0
  609. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/combining_implementation_instructions_spec.rb +205 -0
  610. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/configuration_spec.rb +150 -0
  611. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/double_spec.rb +24 -0
  612. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/extensions/marshal_spec.rb +54 -0
  613. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/failing_argument_matchers_spec.rb +110 -0
  614. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/hash_excluding_matcher_spec.rb +67 -0
  615. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/hash_including_matcher_spec.rb +90 -0
  616. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/instance_method_stasher_spec.rb +58 -0
  617. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/matchers/have_received_spec.rb +266 -0
  618. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/matchers/receive_spec.rb +328 -0
  619. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/methods_spec.rb +27 -0
  620. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/mock_ordering_spec.rb +103 -0
  621. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/mock_space_spec.rb +113 -0
  622. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/mock_spec.rb +798 -0
  623. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/multiple_return_value_spec.rb +132 -0
  624. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/mutate_const_spec.rb +501 -0
  625. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/nil_expectation_warning_spec.rb +68 -0
  626. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/null_object_mock_spec.rb +123 -0
  627. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/once_counts_spec.rb +52 -0
  628. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/options_hash_spec.rb +35 -0
  629. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/partial_mock_spec.rb +205 -0
  630. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/partial_mock_using_mocks_directly_spec.rb +95 -0
  631. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/passing_argument_matchers_spec.rb +142 -0
  632. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/precise_counts_spec.rb +68 -0
  633. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/record_messages_spec.rb +26 -0
  634. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/serialization_spec.rb +89 -0
  635. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/stash_spec.rb +46 -0
  636. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/stub_chain_spec.rb +154 -0
  637. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/stub_implementation_spec.rb +81 -0
  638. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/stub_spec.rb +353 -0
  639. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/stubbed_message_expectations_spec.rb +58 -0
  640. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/syntax_agnostic_message_matchers_spec.rb +81 -0
  641. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/test_double_spec.rb +67 -0
  642. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/to_ary_spec.rb +54 -0
  643. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/twice_counts_spec.rb +66 -0
  644. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks_spec.rb +65 -0
  645. data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/spec_helper.rb +60 -0
  646. data/vendor/bundle/specifications/diff-lcs-1.2.4.gemspec +64 -0
  647. data/vendor/bundle/specifications/rake-10.1.0.gemspec +35 -0
  648. data/vendor/bundle/specifications/rspec-2.14.1.gemspec +39 -0
  649. data/vendor/bundle/specifications/rspec-core-2.14.5.gemspec +58 -0
  650. data/vendor/bundle/specifications/rspec-expectations-2.14.2.gemspec +40 -0
  651. data/vendor/bundle/specifications/rspec-mocks-2.14.3.gemspec +37 -0
  652. metadata +657 -11
@@ -0,0 +1,46 @@
1
+ require "spec_helper"
2
+
3
+ describe RSpec::Core::Deprecation do
4
+ describe "#deprecate" do
5
+ context "old API with individual args" do
6
+ it "includes the method to deprecate" do
7
+ expect(RSpec.configuration.reporter).to receive(:deprecation).with(hash_including :deprecated => "deprecated_method")
8
+ RSpec.deprecate("deprecated_method")
9
+ end
10
+
11
+ it "includes the replacement when provided" do
12
+ expect(RSpec.configuration.reporter).to receive(:deprecation).with(hash_including :deprecated => "deprecated_method", :replacement => "replacement")
13
+ RSpec.deprecate("deprecated_method", "replacement")
14
+ end
15
+
16
+ it "adds the call site" do
17
+ expect_deprecation_with_call_site(__FILE__, __LINE__ + 1)
18
+ RSpec.deprecate("deprecated_method")
19
+ end
20
+
21
+ it "doesn't override the existing callsite" do
22
+ expect(RSpec.configuration.reporter).to receive(:deprecation).with(hash_including :call_site => "/path")
23
+ RSpec.deprecate("deprecated_method", :call_site => "/path")
24
+ end
25
+ end
26
+
27
+ context "new API with a hash after the first arg" do
28
+ it "passes the hash to the reporter" do
29
+ expect(RSpec.configuration.reporter).to receive(:deprecation).with(hash_including :deprecated => "deprecated_method", :replacement => "replacement")
30
+ RSpec.deprecate("deprecated_method", :replacement => "replacement")
31
+ end
32
+
33
+ it "adds the call site" do
34
+ expect_deprecation_with_call_site(__FILE__, __LINE__ + 1)
35
+ RSpec.deprecate("deprecated_method")
36
+ end
37
+ end
38
+ end
39
+
40
+ describe "#warn_deprecation" do
41
+ it "puts message in a hash" do
42
+ expect(RSpec.configuration.reporter).to receive(:deprecation).with(hash_including :message => "this is the message")
43
+ RSpec.warn_deprecation("this is the message")
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,73 @@
1
+ require "spec_helper"
2
+
3
+ describe "deprecated methods" do
4
+ describe "Spec" do
5
+ it "is deprecated" do
6
+ RSpec.should_receive(:deprecate)
7
+ Spec
8
+ end
9
+
10
+ it "returns RSpec" do
11
+ RSpec.stub(:deprecate)
12
+ expect(Spec).to eq(RSpec)
13
+ end
14
+
15
+ it "doesn't include backward compatibility in const_missing backtrace" do
16
+ RSpec.stub(:deprecate)
17
+ exception = nil
18
+ begin
19
+ ConstantThatDoesNotExist
20
+ rescue Exception => exception
21
+ end
22
+ expect(exception.backtrace.find { |l| l =~ /lib\/rspec\/core\/backward_compatibility/ }).to be_nil
23
+ end
24
+ end
25
+
26
+ describe RSpec::Core::ExampleGroup do
27
+ describe 'running_example' do
28
+ it 'is deprecated' do
29
+ RSpec.should_receive(:deprecate).at_least(:once)
30
+ self.running_example
31
+ end
32
+
33
+ it "delegates to example" do
34
+ RSpec.stub(:deprecate)
35
+ expect(running_example).to eq(example)
36
+ end
37
+ end
38
+ end
39
+
40
+ describe RSpec::Core::SharedExampleGroup do
41
+ describe 'share_as' do
42
+ it 'is deprecated' do
43
+ RSpec.should_receive(:deprecate).at_least(:once)
44
+ RSpec::Core::SharedExampleGroup.share_as(:DeprecatedSharedConst) {}
45
+ end
46
+ end
47
+ end
48
+
49
+ describe "Spec::Runner.configure" do
50
+ it "is deprecated" do
51
+ RSpec.should_receive(:deprecate).at_least(:once)
52
+ Spec::Runner.configure
53
+ end
54
+ end
55
+
56
+ describe "Spec::Rake::SpecTask" do
57
+ it "is deprecated" do
58
+ RSpec.should_receive(:deprecate).at_least(:once)
59
+ Spec::Rake::SpecTask
60
+ end
61
+
62
+ it "doesn't include backward compatibility in const_missing backtrace" do
63
+ RSpec.stub(:deprecate)
64
+ exception = nil
65
+ begin
66
+ Spec::Rake::ConstantThatDoesNotExist
67
+ rescue Exception => exception
68
+ end
69
+ expect(exception.backtrace.find { |l| l =~ /lib\/rspec\/core\/backward_compatibility/ }).to be_nil
70
+ end
71
+ end
72
+
73
+ end
@@ -0,0 +1,102 @@
1
+ require "spec_helper"
2
+ require 'rspec/core/drb_command_line'
3
+
4
+ describe "::DRbCommandLine", :type => :drb, :unless => RUBY_PLATFORM == 'java' do
5
+ let(:config) { RSpec::Core::Configuration.new }
6
+ let(:out) { StringIO.new }
7
+ let(:err) { StringIO.new }
8
+
9
+ include_context "spec files"
10
+
11
+ def command_line(*args)
12
+ RSpec::Core::DRbCommandLine.new(config_options(*args))
13
+ end
14
+
15
+ def config_options(*args)
16
+ options = RSpec::Core::ConfigurationOptions.new(args)
17
+ options.parse_options
18
+ options
19
+ end
20
+
21
+ context "without server running" do
22
+ it "raises an error" do
23
+ expect { command_line.run(err, out) }.to raise_error(DRb::DRbConnError)
24
+ end
25
+ end
26
+
27
+ describe "--drb-port" do
28
+ def with_RSPEC_DRB_set_to(val)
29
+ with_env_vars('RSPEC_DRB' => val) { yield }
30
+ end
31
+
32
+ context "without RSPEC_DRB environment variable set" do
33
+ it "defaults to 8989" do
34
+ with_RSPEC_DRB_set_to(nil) do
35
+ expect(command_line.drb_port).to eq(8989)
36
+ end
37
+ end
38
+
39
+ it "sets the DRb port" do
40
+ with_RSPEC_DRB_set_to(nil) do
41
+ expect(command_line("--drb-port", "1234").drb_port).to eq(1234)
42
+ expect(command_line("--drb-port", "5678").drb_port).to eq(5678)
43
+ end
44
+ end
45
+ end
46
+
47
+ context "with RSPEC_DRB environment variable set" do
48
+ context "without config variable set" do
49
+ it "uses RSPEC_DRB value" do
50
+ with_RSPEC_DRB_set_to('9000') do
51
+ expect(command_line.drb_port).to eq("9000")
52
+ end
53
+ end
54
+ end
55
+
56
+ context "and config variable set" do
57
+ it "uses configured value" do
58
+ with_RSPEC_DRB_set_to('9000') do
59
+ expect(command_line(*%w[--drb-port 5678]).drb_port).to eq(5678)
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end
65
+
66
+ context "with server running" do
67
+ class SimpleDRbSpecServer
68
+ def self.run(argv, err, out)
69
+ options = RSpec::Core::ConfigurationOptions.new(argv)
70
+ options.parse_options
71
+ RSpec::Core::CommandLine.new(options, RSpec::Core::Configuration.new).run(err, out)
72
+ end
73
+ end
74
+
75
+ before(:all) do
76
+ @drb_port = '8990'
77
+ @drb_example_file_counter = 0
78
+ DRb::start_service("druby://127.0.0.1:#{@drb_port}", SimpleDRbSpecServer)
79
+ end
80
+
81
+ after(:all) do
82
+ DRb::stop_service
83
+ end
84
+
85
+ it "returns 0 if spec passes" do
86
+ result = command_line("--drb-port", @drb_port, passing_spec_filename).run(err, out)
87
+ expect(result).to be(0)
88
+ end
89
+
90
+ it "returns 1 if spec fails" do
91
+ result = command_line("--drb-port", @drb_port, failing_spec_filename).run(err, out)
92
+ expect(result).to be(1)
93
+ end
94
+
95
+ it "outputs colorized text when running with --colour option" do
96
+ pending "figure out a way to tell the output to say it's tty"
97
+ command_line(failing_spec_filename, "--color", "--drb-port", @drb_port).run(err, out)
98
+ out.rewind
99
+ expect(out.read).to match(/\e\[31m/m)
100
+ end
101
+ end
102
+ end
@@ -0,0 +1,193 @@
1
+ require "spec_helper"
2
+ require 'rspec/core/drb_options'
3
+
4
+ describe RSpec::Core::DrbOptions, :isolated_directory => true, :isolated_home => true do
5
+ include ConfigOptionsHelper
6
+
7
+ describe "#drb_argv" do
8
+ it "preserves extra arguments" do
9
+ File.stub(:exist?) { false }
10
+ expect(config_options_object(*%w[ a --drb b --color c ]).drb_argv).to match_array %w[ --color a b c ]
11
+ end
12
+
13
+ %w(--color --fail-fast --profile --backtrace --tty).each do |option|
14
+ it "includes #{option}" do
15
+ expect(config_options_object("#{option}").drb_argv).to include("#{option}")
16
+ end
17
+ end
18
+
19
+ it "includes --failure-exit-code" do
20
+ expect(config_options_object(*%w[--failure-exit-code 2]).drb_argv).to include("--failure-exit-code", "2")
21
+ end
22
+
23
+ it "includes --options" do
24
+ expect(config_options_object(*%w[--options custom.opts]).drb_argv).to include("--options", "custom.opts")
25
+ end
26
+
27
+ it "includes --order" do
28
+ expect(config_options_object(*%w[--order random]).drb_argv).to include('--order', 'random')
29
+ end
30
+
31
+ context "with --example" do
32
+ it "includes --example" do
33
+ expect(config_options_object(*%w[--example foo]).drb_argv).to include("--example", "foo")
34
+ end
35
+
36
+ it "unescapes characters which were escaped upon storing --example originally" do
37
+ expect(config_options_object("--example", "foo\\ bar").drb_argv).to include("--example", "foo bar")
38
+ end
39
+ end
40
+
41
+ context "with tags" do
42
+ it "includes the inclusion tags" do
43
+ coo = config_options_object("--tag", "tag")
44
+ expect(coo.drb_argv).to eq(["--tag", "tag"])
45
+ end
46
+
47
+ it "includes the inclusion tags with values" do
48
+ coo = config_options_object("--tag", "tag:foo")
49
+ expect(coo.drb_argv).to eq(["--tag", "tag:foo"])
50
+ end
51
+
52
+ it "leaves inclusion tags intact" do
53
+ coo = config_options_object("--tag", "tag")
54
+ coo.drb_argv
55
+ expect(coo.filter_manager.inclusions).to eq( {:tag=>true} )
56
+ end
57
+
58
+ it "leaves inclusion tags with values intact" do
59
+ coo = config_options_object("--tag", "tag:foo")
60
+ coo.drb_argv
61
+ expect(coo.filter_manager.inclusions).to eq( {:tag=>'foo'} )
62
+ end
63
+
64
+ it "includes the exclusion tags" do
65
+ coo = config_options_object("--tag", "~tag")
66
+ expect(coo.drb_argv).to eq(["--tag", "~tag"])
67
+ end
68
+
69
+ it "includes the exclusion tags with values" do
70
+ coo = config_options_object("--tag", "~tag:foo")
71
+ expect(coo.drb_argv).to eq(["--tag", "~tag:foo"])
72
+ end
73
+
74
+ it "leaves exclusion tags intact" do
75
+ coo = config_options_object("--tag", "~tag")
76
+ coo.drb_argv
77
+ expect(coo.filter_manager.exclusions).to include(:tag=>true)
78
+ end
79
+
80
+ it "leaves exclusion tags with values intact" do
81
+ coo = config_options_object("--tag", "~tag:foo")
82
+ coo.drb_argv
83
+ expect(coo.filter_manager.exclusions).to include(:tag=>'foo')
84
+ end
85
+ end
86
+
87
+ context "with formatters" do
88
+ it "includes the formatters" do
89
+ coo = config_options_object("--format", "d")
90
+ expect(coo.drb_argv).to eq(["--format", "d"])
91
+ end
92
+
93
+ it "leaves formatters intact" do
94
+ coo = config_options_object("--format", "d")
95
+ coo.drb_argv
96
+ expect(coo.options[:formatters]).to eq([["d"]])
97
+ end
98
+
99
+ it "leaves output intact" do
100
+ coo = config_options_object("--format", "p", "--out", "foo.txt", "--format", "d")
101
+ coo.drb_argv
102
+ expect(coo.options[:formatters]).to eq([["p","foo.txt"],["d"]])
103
+ end
104
+ end
105
+
106
+ context "with --out" do
107
+ it "combines with formatters" do
108
+ coo = config_options_object(*%w[--format h --out report.html])
109
+ expect(coo.drb_argv).to eq(%w[--format h --out report.html])
110
+ end
111
+ end
112
+
113
+ context "with --line_number" do
114
+ it "includes --line_number" do
115
+ expect(config_options_object(*%w[--line_number 35]).drb_argv).to eq(%w[--line_number 35])
116
+ end
117
+
118
+ it "includes multiple lines" do
119
+ expect(config_options_object(*%w[-l 90 -l 4 -l 55]).drb_argv).to eq(
120
+ %w[--line_number 90 --line_number 4 --line_number 55]
121
+ )
122
+ end
123
+ end
124
+
125
+ context "with -I libs" do
126
+ it "includes -I" do
127
+ expect(config_options_object(*%w[-I a_dir]).drb_argv).to eq(%w[-I a_dir])
128
+ end
129
+
130
+ it "includes multiple paths" do
131
+ expect(config_options_object(*%w[-I dir_1 -I dir_2 -I dir_3]).drb_argv).to eq(
132
+ %w[-I dir_1 -I dir_2 -I dir_3]
133
+ )
134
+ end
135
+ end
136
+
137
+ context "with --require" do
138
+ it "includes --require" do
139
+ expect(config_options_object(*%w[--require a_path]).drb_argv).to eq(%w[--require a_path])
140
+ end
141
+
142
+ it "includes multiple paths" do
143
+ expect(config_options_object(*%w[--require dir/ --require file.rb]).drb_argv).to eq(
144
+ %w[--require dir/ --require file.rb]
145
+ )
146
+ end
147
+ end
148
+
149
+ context "--drb specified in ARGV" do
150
+ it "renders all the original arguments except --drb" do
151
+ drb_argv = config_options_object(*%w[ --drb --color --format s --example pattern
152
+ --line_number 1 --profile --backtrace -I
153
+ path/a -I path/b --require path/c --require
154
+ path/d]).drb_argv
155
+ expect(drb_argv).to eq(%w[ --color --profile --backtrace --example pattern --line_number 1 --format s -I path/a -I path/b --require path/c --require path/d])
156
+ end
157
+ end
158
+
159
+ context "--drb specified in the options file" do
160
+ it "renders all the original arguments except --drb" do
161
+ File.open("./.rspec", "w") {|f| f << "--drb --color"}
162
+ drb_argv = config_options_object(*%w[ --tty --format s --example
163
+ pattern --line_number 1 --profile
164
+ --backtrace ]).drb_argv
165
+
166
+ expect(drb_argv).to eq(%w[ --color --profile --backtrace --tty
167
+ --example pattern --line_number 1 --format s])
168
+ end
169
+ end
170
+
171
+ context "--drb specified in ARGV and the options file" do
172
+ it "renders all the original arguments except --drb" do
173
+ File.open("./.rspec", "w") {|f| f << "--drb --color"}
174
+ drb_argv = config_options_object(*%w[ --drb --format s --example
175
+ pattern --line_number 1 --profile
176
+ --backtrace]).drb_argv
177
+
178
+ expect(drb_argv).to eq(%w[ --color --profile --backtrace --example pattern --line_number 1 --format s])
179
+ end
180
+ end
181
+
182
+ context "--drb specified in ARGV and in as ARGV-specified --options file" do
183
+ it "renders all the original arguments except --drb and --options" do
184
+ File.open("./.rspec", "w") {|f| f << "--drb --color"}
185
+ drb_argv = config_options_object(*%w[ --drb --format s --example
186
+ pattern --line_number 1 --profile
187
+ --backtrace]).drb_argv
188
+
189
+ expect(drb_argv).to eq(%w[ --color --profile --backtrace --example pattern --line_number 1 --format s ])
190
+ end
191
+ end
192
+ end
193
+ end
@@ -0,0 +1,25 @@
1
+ require 'spec_helper'
2
+
3
+ main = self
4
+
5
+ describe "The RSpec DSL" do
6
+ methods = [
7
+ :describe,
8
+ :share_examples_for,
9
+ :shared_examples_for,
10
+ :shared_examples,
11
+ :shared_context,
12
+ :share_as
13
+ ]
14
+
15
+ methods.each do |method_name|
16
+ describe "##{method_name}" do
17
+ it "is not added to every object in the system" do
18
+ expect(main).to respond_to(method_name)
19
+ expect(Module.new).to respond_to(method_name)
20
+ expect(Object.new).not_to respond_to(method_name)
21
+ end
22
+ end
23
+ end
24
+ end
25
+
@@ -0,0 +1,1187 @@
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
+ expect(group.description).to 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
+ expect(group.description).to 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
+ expect(group.description).to 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
+ expect(group.metadata).not_to include(:symbol)
56
+ end
57
+
58
+ it 'treats the first argument as part of the description when it is a symbol' do
59
+ expect(group.description).to 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
+ expect(examples_run).to 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
+ expect(examples_run).to 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
+ expect(group.descendants.size).to 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
+ expect(parent.children).to 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
+ expect(world.example_groups).to 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
+ expect(group.filtered_examples).to 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
+ expect(group.filtered_examples).to 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
+ expect(group.filtered_examples).to 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
+ expect(group.filtered_examples).to 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
+ expect(group.filtered_examples).to 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
+ expect(group.filtered_examples).to 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
+ expect(ExampleGroup.describe(Object) { }.described_class).to eq(Object)
281
+ end
282
+ end
283
+
284
+ context "with a string as the first parameter" do
285
+ it "is nil" do
286
+ expect(ExampleGroup.describe("i'm a computer") { }.described_class).to 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
+ expect(described_class).to eq(String)
297
+ end
298
+ end
299
+ end
300
+
301
+ expect(group.run).to 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
+ expect(described_class).to eq(Object)
313
+ end
314
+ end
315
+ end
316
+
317
+ expect(group.run).to 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 "describes is String" do
327
+ expect(described_class).to eq(String)
328
+ end
329
+ end
330
+ end
331
+
332
+ expect(group.run).to be_true, "expected examples in group to pass"
333
+ end
334
+ end
335
+
336
+ context "for `describe(SomeClass)` within a `describe 'some string' group" do
337
+ def define_and_run_group(define_outer_example = false)
338
+ outer_described_class = inner_described_class = nil
339
+
340
+ ExampleGroup.describe("some string") do
341
+ example { outer_described_class = described_class } if define_outer_example
342
+
343
+ describe Array do
344
+ example { inner_described_class = described_class }
345
+ end
346
+ end.run
347
+
348
+ return outer_described_class, inner_described_class
349
+ end
350
+
351
+ it "has a `nil` described_class in the outer group" do
352
+ outer_described_class, _ = define_and_run_group(:define_outer_example)
353
+ expect(outer_described_class).to be(nil)
354
+ end
355
+
356
+ it "has the inner described class as the described_class of the inner group" do
357
+ _, inner_described_class = define_and_run_group
358
+ expect(inner_described_class).to be(Array)
359
+
360
+ # This is weird, but in RSpec 2.12 (and before, presumably),
361
+ # the `described_class` value would be incorrect if there was an
362
+ # example in the outer group, and correct if there was not one.
363
+ _, inner_described_class = define_and_run_group(:define_outer_example)
364
+ expect(inner_described_class).to be(Array)
365
+ end
366
+ end
367
+ end
368
+
369
+ describe '#described_class' do
370
+ it "is the same as described_class" do
371
+ expect(self.class.described_class).to eq(self.class.described_class)
372
+ end
373
+ end
374
+
375
+ describe '#description' do
376
+ it "grabs the description from the metadata" do
377
+ group = ExampleGroup.describe(Object, "my desc") { }
378
+ expect(group.description).to eq(group.metadata[:example_group][:description])
379
+ end
380
+ end
381
+
382
+ describe '#metadata' do
383
+ it "adds the third parameter to the metadata" do
384
+ expect(ExampleGroup.describe(Object, nil, 'foo' => 'bar') { }.metadata).to include({ "foo" => 'bar' })
385
+ end
386
+
387
+ it "adds the the file_path to metadata" do
388
+ expect(ExampleGroup.describe(Object) { }.metadata[:example_group][:file_path]).to eq(relative_path(__FILE__))
389
+ end
390
+
391
+ it "has a reader for file_path" do
392
+ expect(ExampleGroup.describe(Object) { }.file_path).to eq(relative_path(__FILE__))
393
+ end
394
+
395
+ it "adds the line_number to metadata" do
396
+ expect(ExampleGroup.describe(Object) { }.metadata[:example_group][:line_number]).to eq(__LINE__)
397
+ end
398
+ end
399
+
400
+ [:focus, :focused, :fit].each do |example_alias|
401
+ describe "##{example_alias}" do
402
+ let(:focused_example) { ExampleGroup.describe.send example_alias, "a focused example" }
403
+
404
+ it 'defines an example that can be filtered with :focused => true' do
405
+ expect(focused_example.metadata[:focused]).to be_true
406
+ end
407
+
408
+ it 'defines an example that can be filtered with :focus => true' do
409
+ expect(focused_example.metadata[:focus]).to be_true
410
+ end
411
+ end
412
+ end
413
+
414
+ describe "#before, after, and around hooks" do
415
+ it "runs the before alls in order" do
416
+ group = ExampleGroup.describe
417
+ order = []
418
+ group.before(:all) { order << 1 }
419
+ group.before(:all) { order << 2 }
420
+ group.before(:all) { order << 3 }
421
+ group.example("example") {}
422
+
423
+ group.run
424
+
425
+ expect(order).to eq([1,2,3])
426
+ end
427
+
428
+ it "does not set RSpec.wants_to_quit in case of an error in before all (without fail_fast?)" do
429
+ group = ExampleGroup.describe
430
+ group.before(:all) { raise "error in before all" }
431
+ group.example("example") {}
432
+
433
+ group.run
434
+ expect(RSpec.wants_to_quit).to be_false
435
+ end
436
+
437
+ it "runs the before eachs in order" do
438
+ group = ExampleGroup.describe
439
+ order = []
440
+ group.before(:each) { order << 1 }
441
+ group.before(:each) { order << 2 }
442
+ group.before(:each) { order << 3 }
443
+ group.example("example") {}
444
+
445
+ group.run
446
+
447
+ expect(order).to eq([1,2,3])
448
+ end
449
+
450
+ it "runs the after eachs in reverse order" do
451
+ group = ExampleGroup.describe
452
+ order = []
453
+ group.after(:each) { order << 1 }
454
+ group.after(:each) { order << 2 }
455
+ group.after(:each) { order << 3 }
456
+ group.example("example") {}
457
+
458
+ group.run
459
+
460
+ expect(order).to eq([3,2,1])
461
+ end
462
+
463
+ it "runs the after alls in reverse order" do
464
+ group = ExampleGroup.describe
465
+ order = []
466
+ group.after(:all) { order << 1 }
467
+ group.after(:all) { order << 2 }
468
+ group.after(:all) { order << 3 }
469
+ group.example("example") {}
470
+
471
+ group.run
472
+
473
+ expect(order).to eq([3,2,1])
474
+ end
475
+
476
+ it "only runs before/after(:all) hooks from example groups that have specs that run" do
477
+ hooks_run = []
478
+
479
+ RSpec.configure do |c|
480
+ c.filter_run :focus => true
481
+ end
482
+
483
+ unfiltered_group = ExampleGroup.describe "unfiltered" do
484
+ before(:all) { hooks_run << :unfiltered_before_all }
485
+ after(:all) { hooks_run << :unfiltered_after_all }
486
+
487
+ context "a subcontext" do
488
+ it("has an example") { }
489
+ end
490
+ end
491
+
492
+ filtered_group = ExampleGroup.describe "filtered", :focus => true do
493
+ before(:all) { hooks_run << :filtered_before_all }
494
+ after(:all) { hooks_run << :filtered_after_all }
495
+
496
+ context "a subcontext" do
497
+ it("has an example") { }
498
+ end
499
+ end
500
+
501
+ unfiltered_group.run
502
+ filtered_group.run
503
+
504
+ expect(hooks_run).to eq([:filtered_before_all, :filtered_after_all])
505
+ end
506
+
507
+ 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
508
+ order = []
509
+
510
+ RSpec.configure do |c|
511
+ c.before(:all) { order << :before_all_defined_in_config }
512
+ c.after(:all) { order << :after_all_defined_in_config }
513
+ end
514
+
515
+ group = ExampleGroup.describe
516
+ group.before(:all) { order << :top_level_before_all }
517
+ group.before(:each) { order << :before_each }
518
+ group.after(:each) { order << :after_each }
519
+ group.after(:all) { order << :top_level_after_all }
520
+ group.example("top level example") { order << :top_level_example }
521
+
522
+ context1 = group.describe("context 1")
523
+ context1.before(:all) { order << :nested_before_all }
524
+ context1.example("nested example 1") { order << :nested_example_1 }
525
+
526
+ context2 = group.describe("context 2")
527
+ context2.after(:all) { order << :nested_after_all }
528
+ context2.example("nested example 2") { order << :nested_example_2 }
529
+
530
+ group.run
531
+
532
+ expect(order).to eq([
533
+ :before_all_defined_in_config,
534
+ :top_level_before_all,
535
+ :before_each,
536
+ :top_level_example,
537
+ :after_each,
538
+ :nested_before_all,
539
+ :before_each,
540
+ :nested_example_1,
541
+ :after_each,
542
+ :before_each,
543
+ :nested_example_2,
544
+ :after_each,
545
+ :nested_after_all,
546
+ :top_level_after_all,
547
+ :after_all_defined_in_config
548
+ ])
549
+ end
550
+
551
+ context "after(:all)" do
552
+ let(:outer) { ExampleGroup.describe }
553
+ let(:inner) { outer.describe }
554
+
555
+ it "has access to state defined before(:all)" do
556
+ outer.before(:all) { @outer = "outer" }
557
+ inner.before(:all) { @inner = "inner" }
558
+
559
+ outer.after(:all) do
560
+ expect(@outer).to eq("outer")
561
+ expect(@inner).to eq("inner")
562
+ end
563
+ inner.after(:all) do
564
+ expect(@inner).to eq("inner")
565
+ expect(@outer).to eq("outer")
566
+ end
567
+
568
+ outer.run
569
+ end
570
+
571
+ it "cleans up ivars in after(:all)" do
572
+ outer.before(:all) { @outer = "outer" }
573
+ inner.before(:all) { @inner = "inner" }
574
+
575
+ outer.run
576
+
577
+ expect(inner.before_all_ivars[:@inner]).to be_nil
578
+ expect(inner.before_all_ivars[:@outer]).to be_nil
579
+ expect(outer.before_all_ivars[:@inner]).to be_nil
580
+ expect(outer.before_all_ivars[:@outer]).to be_nil
581
+ end
582
+ end
583
+
584
+ it "treats an error in before(:each) as a failure" do
585
+ group = ExampleGroup.describe
586
+ group.before(:each) { raise "error in before each" }
587
+ example = group.example("equality") { expect(1).to eq(2) }
588
+ expect(group.run).to be(false)
589
+
590
+ expect(example.metadata[:execution_result][:exception].message).to eq("error in before each")
591
+ end
592
+
593
+ it "treats an error in before(:all) as a failure" do
594
+ group = ExampleGroup.describe
595
+ group.before(:all) { raise "error in before all" }
596
+ example = group.example("equality") { expect(1).to eq(2) }
597
+ expect(group.run).to be_false
598
+
599
+ expect(example.metadata).not_to be_nil
600
+ expect(example.metadata[:execution_result]).not_to be_nil
601
+ expect(example.metadata[:execution_result][:exception]).not_to be_nil
602
+ expect(example.metadata[:execution_result][:exception].message).to eq("error in before all")
603
+ end
604
+
605
+ it "exposes instance variables set in before(:all) from after(:all) even if a before(:all) error occurs" do
606
+ ivar_value_in_after_hook = nil
607
+
608
+ group = ExampleGroup.describe do
609
+ before(:all) do
610
+ @an_ivar = :set_in_before_all
611
+ raise "fail"
612
+ end
613
+
614
+ after(:all) { ivar_value_in_after_hook = @an_ivar }
615
+
616
+ it("has a spec") { }
617
+ end
618
+
619
+ group.run
620
+ expect(ivar_value_in_after_hook).to eq(:set_in_before_all)
621
+ end
622
+
623
+ it "treats an error in before(:all) as a failure for a spec in a nested group" do
624
+ example = nil
625
+ group = ExampleGroup.describe do
626
+ before(:all) { raise "error in before all" }
627
+
628
+ describe "nested" do
629
+ example = it("equality") { expect(1).to eq(2) }
630
+ end
631
+ end
632
+ group.run
633
+
634
+ expect(example.metadata).not_to be_nil
635
+ expect(example.metadata[:execution_result]).not_to be_nil
636
+ expect(example.metadata[:execution_result][:exception]).not_to be_nil
637
+ expect(example.metadata[:execution_result][:exception].message).to eq("error in before all")
638
+ end
639
+
640
+ context "when an error occurs in an after(:all) hook" do
641
+ hooks_run = []
642
+
643
+ before(:each) do
644
+ hooks_run = []
645
+ RSpec.configuration.reporter.stub(:message)
646
+ end
647
+
648
+ let(:group) do
649
+ ExampleGroup.describe do
650
+ after(:all) { hooks_run << :one; raise "An error in an after(:all) hook" }
651
+ after(:all) { hooks_run << :two; raise "A different hook raising an error" }
652
+ it("equality") { expect(1).to eq(1) }
653
+ end
654
+ end
655
+
656
+ it "allows the example to pass" do
657
+ group.run
658
+ example = group.examples.first
659
+ expect(example.metadata).not_to be_nil
660
+ expect(example.metadata[:execution_result]).not_to be_nil
661
+ expect(example.metadata[:execution_result][:status]).to eq("passed")
662
+ end
663
+
664
+ it "rescues any error(s) and prints them out" do
665
+ RSpec.configuration.reporter.should_receive(:message).with(/An error in an after\(:all\) hook/)
666
+ RSpec.configuration.reporter.should_receive(:message).with(/A different hook raising an error/)
667
+ group.run
668
+ end
669
+
670
+ it "still runs both after blocks" do
671
+ group.run
672
+ expect(hooks_run).to eq [:two,:one]
673
+ end
674
+ end
675
+
676
+ it "has no 'running example' within before(:all)" do
677
+ group = ExampleGroup.describe
678
+ running_example = :none
679
+ group.before(:all) { running_example = example }
680
+ group.example("no-op") { }
681
+ group.run
682
+ expect(running_example).to be(nil)
683
+ end
684
+
685
+ it "has access to example options within before(:each)" do
686
+ group = ExampleGroup.describe
687
+ option = nil
688
+ group.before(:each) { option = example.options[:data] }
689
+ group.example("no-op", :data => :sample) { }
690
+ group.run
691
+ expect(option).to eq(:sample)
692
+ end
693
+
694
+ it "has access to example options within after(:each)" do
695
+ group = ExampleGroup.describe
696
+ option = nil
697
+ group.after(:each) { option = example.options[:data] }
698
+ group.example("no-op", :data => :sample) { }
699
+ group.run
700
+ expect(option).to eq(:sample)
701
+ end
702
+
703
+ it "has no 'running example' within after(:all)" do
704
+ group = ExampleGroup.describe
705
+ running_example = :none
706
+ group.after(:all) { running_example = example }
707
+ group.example("no-op") { }
708
+ group.run
709
+ expect(running_example).to be(nil)
710
+ end
711
+ end
712
+
713
+ %w[pending xit xspecify xexample].each do |method_name|
714
+ describe "::#{method_name}" do
715
+ before do
716
+ @group = ExampleGroup.describe
717
+ @group.send(method_name, "is pending") { }
718
+ end
719
+
720
+ it "generates a pending example" do
721
+ @group.run
722
+ expect(@group.examples.first).to be_pending
723
+ end
724
+
725
+ it "sets the pending message", :if => method_name == 'pending' do
726
+ @group.run
727
+ expect(@group.examples.first.metadata[:execution_result][:pending_message]).to eq(RSpec::Core::Pending::NO_REASON_GIVEN)
728
+ end
729
+
730
+ it "sets the pending message", :unless => method_name == 'pending' do
731
+ @group.run
732
+ expect(@group.examples.first.metadata[:execution_result][:pending_message]).to eq("Temporarily disabled with #{method_name}")
733
+ end
734
+ end
735
+ end
736
+
737
+ describe "adding examples" do
738
+
739
+ it "allows adding an example using 'it'" do
740
+ group = ExampleGroup.describe
741
+ group.it("should do something") { }
742
+ expect(group.examples.size).to eq(1)
743
+ end
744
+
745
+ it "exposes all examples at examples" do
746
+ group = ExampleGroup.describe
747
+ group.it("should do something 1") { }
748
+ group.it("should do something 2") { }
749
+ group.it("should do something 3") { }
750
+ expect(group).to have(3).examples
751
+ end
752
+
753
+ it "maintains the example order" do
754
+ group = ExampleGroup.describe
755
+ group.it("should 1") { }
756
+ group.it("should 2") { }
757
+ group.it("should 3") { }
758
+ expect(group.examples[0].description).to eq('should 1')
759
+ expect(group.examples[1].description).to eq('should 2')
760
+ expect(group.examples[2].description).to eq('should 3')
761
+ end
762
+
763
+ end
764
+
765
+ describe Object, "describing nested example_groups", :little_less_nested => 'yep' do
766
+
767
+ describe "A sample nested group", :nested_describe => "yep" do
768
+ it "sets the described class to the described class of the outer most group" do
769
+ expect(example.example_group.described_class).to eq(ExampleGroup)
770
+ end
771
+
772
+ it "sets the description to 'A sample nested describe'" do
773
+ expect(example.example_group.description).to eq('A sample nested group')
774
+ end
775
+
776
+ it "has top level metadata from the example_group and its parent groups" do
777
+ expect(example.example_group.metadata).to include(:little_less_nested => 'yep', :nested_describe => 'yep')
778
+ end
779
+
780
+ it "exposes the parent metadata to the contained examples" do
781
+ expect(example.metadata).to include(:little_less_nested => 'yep', :nested_describe => 'yep')
782
+ end
783
+ end
784
+
785
+ end
786
+
787
+ describe "#run_examples" do
788
+
789
+ let(:reporter) { double("reporter").as_null_object }
790
+
791
+ it "returns true if all examples pass" do
792
+ group = ExampleGroup.describe('group') do
793
+ example('ex 1') { expect(1).to eq(1) }
794
+ example('ex 2') { expect(1).to eq(1) }
795
+ end
796
+ group.stub(:filtered_examples) { group.examples.extend(Extensions::Ordered::Examples) }
797
+ expect(group.run(reporter)).to be_true
798
+ end
799
+
800
+ it "returns false if any of the examples fail" do
801
+ group = ExampleGroup.describe('group') do
802
+ example('ex 1') { expect(1).to eq(1) }
803
+ example('ex 2') { expect(1).to eq(2) }
804
+ end
805
+ group.stub(:filtered_examples) { group.examples.extend(Extensions::Ordered::Examples) }
806
+ expect(group.run(reporter)).to be_false
807
+ end
808
+
809
+ it "runs all examples, regardless of any of them failing" do
810
+ group = ExampleGroup.describe('group') do
811
+ example('ex 1') { expect(1).to eq(2) }
812
+ example('ex 2') { expect(1).to eq(1) }
813
+ end
814
+ group.stub(:filtered_examples) { group.examples.extend(Extensions::Ordered::Examples) }
815
+ group.filtered_examples.each do |example|
816
+ example.should_receive(:run)
817
+ end
818
+ expect(group.run(reporter)).to be_false
819
+ end
820
+ end
821
+
822
+ describe "how instance variables are inherited" do
823
+ before(:all) do
824
+ @before_all_top_level = 'before_all_top_level'
825
+ end
826
+
827
+ before(:each) do
828
+ @before_each_top_level = 'before_each_top_level'
829
+ end
830
+
831
+ it "can access a before each ivar at the same level" do
832
+ expect(@before_each_top_level).to eq('before_each_top_level')
833
+ end
834
+
835
+ it "can access a before all ivar at the same level" do
836
+ expect(@before_all_top_level).to eq('before_all_top_level')
837
+ end
838
+
839
+ it "can access the before all ivars in the before_all_ivars hash", :ruby => 1.8 do
840
+ expect(example.example_group.before_all_ivars).to include('@before_all_top_level' => 'before_all_top_level')
841
+ end
842
+
843
+ it "can access the before all ivars in the before_all_ivars hash", :ruby => 1.9 do
844
+ expect(example.example_group.before_all_ivars).to include(:@before_all_top_level => 'before_all_top_level')
845
+ end
846
+
847
+ describe "but now I am nested" do
848
+ it "can access a parent example groups before each ivar at a nested level" do
849
+ expect(@before_each_top_level).to eq('before_each_top_level')
850
+ end
851
+
852
+ it "can access a parent example groups before all ivar at a nested level" do
853
+ expect(@before_all_top_level).to eq("before_all_top_level")
854
+ end
855
+
856
+ it "changes to before all ivars from within an example do not persist outside the current describe" do
857
+ @before_all_top_level = "ive been changed"
858
+ end
859
+
860
+ describe "accessing a before_all ivar that was changed in a parent example_group" do
861
+ it "does not have access to the modified version" do
862
+ expect(@before_all_top_level).to eq('before_all_top_level')
863
+ end
864
+ end
865
+ end
866
+
867
+ end
868
+
869
+ describe "ivars are not shared across examples" do
870
+ it "(first example)" do
871
+ @a = 1
872
+ expect(defined?(@b)).to be_false
873
+ end
874
+
875
+ it "(second example)" do
876
+ @b = 2
877
+ expect(defined?(@a)).to be_false
878
+ end
879
+ end
880
+
881
+
882
+ describe "#top_level_description" do
883
+ it "returns the description from the outermost example group" do
884
+ group = nil
885
+ ExampleGroup.describe("top") do
886
+ context "middle" do
887
+ group = describe "bottom" do
888
+ end
889
+ end
890
+ end
891
+
892
+ expect(group.top_level_description).to eq("top")
893
+ end
894
+ end
895
+
896
+ describe "#run" do
897
+ let(:reporter) { double("reporter").as_null_object }
898
+
899
+ context "with fail_fast? => true" do
900
+ let(:group) do
901
+ group = RSpec::Core::ExampleGroup.describe
902
+ group.stub(:fail_fast?) { true }
903
+ group
904
+ end
905
+
906
+ it "does not run examples after the failed example" do
907
+ examples_run = []
908
+ group.example('example 1') { examples_run << self }
909
+ group.example('example 2') { examples_run << self; fail; }
910
+ group.example('example 3') { examples_run << self }
911
+
912
+ group.run
913
+
914
+ expect(examples_run.length).to eq(2)
915
+ end
916
+
917
+ it "sets RSpec.wants_to_quit flag if encountering an exception in before(:all)" do
918
+ group.before(:all) { raise "error in before all" }
919
+ group.example("equality") { expect(1).to eq(2) }
920
+ expect(group.run).to be_false
921
+ expect(RSpec.wants_to_quit).to be_true
922
+ end
923
+ end
924
+
925
+ context "with RSpec.wants_to_quit=true" do
926
+ let(:group) { RSpec::Core::ExampleGroup.describe }
927
+
928
+ before do
929
+ RSpec.stub(:wants_to_quit) { true }
930
+ RSpec.stub(:clear_remaining_example_groups)
931
+ end
932
+
933
+ it "returns without starting the group" do
934
+ reporter.should_not_receive(:example_group_started)
935
+ group.run(reporter)
936
+ end
937
+
938
+ context "at top level" do
939
+ it "purges remaining groups" do
940
+ RSpec.should_receive(:clear_remaining_example_groups)
941
+ group.run(reporter)
942
+ end
943
+ end
944
+
945
+ context "in a nested group" do
946
+ it "does not purge remaining groups" do
947
+ nested_group = group.describe
948
+ RSpec.should_not_receive(:clear_remaining_example_groups)
949
+ nested_group.run(reporter)
950
+ end
951
+ end
952
+ end
953
+
954
+ context "with all examples passing" do
955
+ it "returns true" do
956
+ group = RSpec::Core::ExampleGroup.describe("something") do
957
+ it "does something" do
958
+ # pass
959
+ end
960
+ describe "nested" do
961
+ it "does something else" do
962
+ # pass
963
+ end
964
+ end
965
+ end
966
+
967
+ expect(group.run(reporter)).to be_true
968
+ end
969
+ end
970
+
971
+ context "with top level example failing" do
972
+ it "returns false" do
973
+ group = RSpec::Core::ExampleGroup.describe("something") do
974
+ it "does something (wrong - fail)" do
975
+ raise "fail"
976
+ end
977
+ describe "nested" do
978
+ it "does something else" do
979
+ # pass
980
+ end
981
+ end
982
+ end
983
+
984
+ expect(group.run(reporter)).to be_false
985
+ end
986
+ end
987
+
988
+ context "with nested example failing" do
989
+ it "returns true" do
990
+ group = RSpec::Core::ExampleGroup.describe("something") do
991
+ it "does something" do
992
+ # pass
993
+ end
994
+ describe "nested" do
995
+ it "does something else (wrong -fail)" do
996
+ raise "fail"
997
+ end
998
+ end
999
+ end
1000
+
1001
+ expect(group.run(reporter)).to be_false
1002
+ end
1003
+ end
1004
+ end
1005
+
1006
+ %w[include_examples include_context].each do |name|
1007
+ describe "##{name}" do
1008
+ let(:group) { ExampleGroup.describe }
1009
+ before do
1010
+ group.shared_examples "named this" do
1011
+ example("does something") {}
1012
+ end
1013
+ end
1014
+
1015
+ it "includes the named examples" do
1016
+ group.send(name, "named this")
1017
+ expect(group.examples.first.description).to eq("does something")
1018
+ end
1019
+
1020
+ it "raises a helpful error message when shared content is not found" do
1021
+ expect do
1022
+ group.send(name, "shared stuff")
1023
+ end.to raise_error(ArgumentError, /Could not find .* "shared stuff"/)
1024
+ end
1025
+
1026
+ it "passes parameters to the shared content" do
1027
+ passed_params = {}
1028
+ group = ExampleGroup.describe
1029
+
1030
+ group.shared_examples "named this with params" do |param1, param2|
1031
+ it("has access to the given parameters") do
1032
+ passed_params[:param1] = param1
1033
+ passed_params[:param2] = param2
1034
+ end
1035
+ end
1036
+
1037
+ group.send(name, "named this with params", :value1, :value2)
1038
+ group.run
1039
+
1040
+ expect(passed_params).to eq({ :param1 => :value1, :param2 => :value2 })
1041
+ end
1042
+
1043
+ it "adds shared instance methods to the group" do
1044
+ group = ExampleGroup.describe('fake group')
1045
+ group.shared_examples "named this with params" do |param1|
1046
+ def foo; end
1047
+ end
1048
+ group.send(name, "named this with params", :a)
1049
+ expect(group.public_instance_methods.map{|m| m.to_s}).to include("foo")
1050
+ end
1051
+
1052
+ it "evals the shared example group only once" do
1053
+ eval_count = 0
1054
+ group = ExampleGroup.describe('fake group')
1055
+ group.shared_examples("named this with params") { |p| eval_count += 1 }
1056
+ group.send(name, "named this with params", :a)
1057
+ expect(eval_count).to eq(1)
1058
+ end
1059
+
1060
+ it "evals the block when given" do
1061
+ key = "#{__FILE__}:#{__LINE__}"
1062
+ group = ExampleGroup.describe do
1063
+ shared_examples(key) do
1064
+ it("does something") do
1065
+ expect(foo).to eq("bar")
1066
+ end
1067
+ end
1068
+
1069
+ send name, key do
1070
+ def foo; "bar"; end
1071
+ end
1072
+ end
1073
+ expect(group.run).to be_true
1074
+ end
1075
+ end
1076
+ end
1077
+
1078
+ describe "#it_should_behave_like" do
1079
+ it "creates a nested group" do
1080
+ group = ExampleGroup.describe('fake group')
1081
+ group.shared_examples_for("thing") {}
1082
+ group.it_should_behave_like("thing")
1083
+ expect(group).to have(1).children
1084
+ end
1085
+
1086
+ it "creates a nested group for a class" do
1087
+ klass = Class.new
1088
+ group = ExampleGroup.describe('fake group')
1089
+ group.shared_examples_for(klass) {}
1090
+ group.it_should_behave_like(klass)
1091
+ expect(group).to have(1).children
1092
+ end
1093
+
1094
+ it "adds shared examples to nested group" do
1095
+ group = ExampleGroup.describe('fake group')
1096
+ group.shared_examples_for("thing") do
1097
+ it("does something")
1098
+ end
1099
+ shared_group = group.it_should_behave_like("thing")
1100
+ expect(shared_group).to have(1).examples
1101
+ end
1102
+
1103
+ it "adds shared instance methods to nested group" do
1104
+ group = ExampleGroup.describe('fake group')
1105
+ group.shared_examples_for("thing") do
1106
+ def foo; end
1107
+ end
1108
+ shared_group = group.it_should_behave_like("thing")
1109
+ expect(shared_group.public_instance_methods.map{|m| m.to_s}).to include("foo")
1110
+ end
1111
+
1112
+ it "adds shared class methods to nested group" do
1113
+ group = ExampleGroup.describe('fake group')
1114
+ group.shared_examples_for("thing") do
1115
+ def self.foo; end
1116
+ end
1117
+ shared_group = group.it_should_behave_like("thing")
1118
+ expect(shared_group.methods.map{|m| m.to_s}).to include("foo")
1119
+ end
1120
+
1121
+ it "passes parameters to the shared example group" do
1122
+ passed_params = {}
1123
+
1124
+ group = ExampleGroup.describe("group") do
1125
+ shared_examples_for("thing") do |param1, param2|
1126
+ it("has access to the given parameters") do
1127
+ passed_params[:param1] = param1
1128
+ passed_params[:param2] = param2
1129
+ end
1130
+ end
1131
+
1132
+ it_should_behave_like "thing", :value1, :value2
1133
+ end
1134
+
1135
+ group.run
1136
+
1137
+ expect(passed_params).to eq({ :param1 => :value1, :param2 => :value2 })
1138
+ end
1139
+
1140
+ it "adds shared instance methods to nested group" do
1141
+ group = ExampleGroup.describe('fake group')
1142
+ group.shared_examples_for("thing") do |param1|
1143
+ def foo; end
1144
+ end
1145
+ shared_group = group.it_should_behave_like("thing", :a)
1146
+ expect(shared_group.public_instance_methods.map{|m| m.to_s}).to include("foo")
1147
+ end
1148
+
1149
+ it "evals the shared example group only once" do
1150
+ eval_count = 0
1151
+ group = ExampleGroup.describe('fake group')
1152
+ group.shared_examples_for("thing") { |p| eval_count += 1 }
1153
+ group.it_should_behave_like("thing", :a)
1154
+ expect(eval_count).to eq(1)
1155
+ end
1156
+
1157
+ context "given a block" do
1158
+ it "evaluates the block in nested group" do
1159
+ scopes = []
1160
+ group = ExampleGroup.describe("group") do
1161
+ shared_examples_for("thing") do
1162
+ it("gets run in the nested group") do
1163
+ scopes << self.class
1164
+ end
1165
+ end
1166
+ it_should_behave_like "thing" do
1167
+ it("gets run in the same nested group") do
1168
+ scopes << self.class
1169
+ end
1170
+ end
1171
+ end
1172
+ group.run
1173
+
1174
+ expect(scopes[0]).to be(scopes[1])
1175
+ end
1176
+ end
1177
+
1178
+ it "raises a helpful error message when shared context is not found" do
1179
+ expect do
1180
+ ExampleGroup.describe do
1181
+ it_should_behave_like "shared stuff"
1182
+ end
1183
+ end.to raise_error(ArgumentError,%q|Could not find shared examples "shared stuff"|)
1184
+ end
1185
+ end
1186
+ end
1187
+ end