nutshell-crm 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (692) hide show
  1. data/.gitignore +21 -0
  2. data/.rspec +2 -0
  3. data/Gemfile +4 -0
  4. data/README +0 -0
  5. data/Rakefile +2 -0
  6. data/lib/nutshell-crm.rb +78 -0
  7. data/lib/nutshell-crm/version.rb +3 -0
  8. data/nutshell-crm.gemspec +28 -0
  9. data/spec/nutshell-crm_spec.rb +212 -0
  10. data/spec/spec_helper.rb +8 -0
  11. data/vendor/bundle/bin/autospec +19 -0
  12. data/vendor/bundle/bin/htmldiff +21 -0
  13. data/vendor/bundle/bin/httparty +19 -0
  14. data/vendor/bundle/bin/ldiff +21 -0
  15. data/vendor/bundle/bin/rspec +19 -0
  16. data/vendor/bundle/gems/diff-lcs-1.1.3/.gemtest +0 -0
  17. data/vendor/bundle/gems/diff-lcs-1.1.3/History.rdoc +54 -0
  18. data/vendor/bundle/gems/diff-lcs-1.1.3/License.rdoc +38 -0
  19. data/vendor/bundle/gems/diff-lcs-1.1.3/Manifest.txt +27 -0
  20. data/vendor/bundle/gems/diff-lcs-1.1.3/README.rdoc +72 -0
  21. data/vendor/bundle/gems/diff-lcs-1.1.3/Rakefile +26 -0
  22. data/vendor/bundle/gems/diff-lcs-1.1.3/bin/htmldiff +32 -0
  23. data/vendor/bundle/gems/diff-lcs-1.1.3/bin/ldiff +6 -0
  24. data/vendor/bundle/gems/diff-lcs-1.1.3/diff-lcs.gemspec +51 -0
  25. data/vendor/bundle/gems/diff-lcs-1.1.3/docs/COPYING.txt +340 -0
  26. data/vendor/bundle/gems/diff-lcs-1.1.3/docs/artistic.html +289 -0
  27. data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff-lcs.rb +5 -0
  28. data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs.rb +1105 -0
  29. data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/array.rb +21 -0
  30. data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/block.rb +51 -0
  31. data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/callbacks.rb +322 -0
  32. data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/change.rb +169 -0
  33. data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/htmldiff.rb +151 -0
  34. data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/hunk.rb +242 -0
  35. data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/ldiff.rb +210 -0
  36. data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/string.rb +19 -0
  37. data/vendor/bundle/gems/diff-lcs-1.1.3/spec/diff_spec.rb +35 -0
  38. data/vendor/bundle/gems/diff-lcs-1.1.3/spec/lcs_spec.rb +36 -0
  39. data/vendor/bundle/gems/diff-lcs-1.1.3/spec/patch_spec.rb +390 -0
  40. data/vendor/bundle/gems/diff-lcs-1.1.3/spec/sdiff_spec.rb +204 -0
  41. data/vendor/bundle/gems/diff-lcs-1.1.3/spec/spec_helper.rb +284 -0
  42. data/vendor/bundle/gems/diff-lcs-1.1.3/spec/traverse_balanced_spec.rb +286 -0
  43. data/vendor/bundle/gems/diff-lcs-1.1.3/spec/traverse_sequences_spec.rb +83 -0
  44. data/vendor/bundle/gems/httparty-0.8.1/.gitignore +9 -0
  45. data/vendor/bundle/gems/httparty-0.8.1/Gemfile +8 -0
  46. data/vendor/bundle/gems/httparty-0.8.1/History +259 -0
  47. data/vendor/bundle/gems/httparty-0.8.1/MIT-LICENSE +20 -0
  48. data/vendor/bundle/gems/httparty-0.8.1/README.rdoc +54 -0
  49. data/vendor/bundle/gems/httparty-0.8.1/Rakefile +15 -0
  50. data/vendor/bundle/gems/httparty-0.8.1/bin/httparty +108 -0
  51. data/vendor/bundle/gems/httparty-0.8.1/cucumber.yml +1 -0
  52. data/vendor/bundle/gems/httparty-0.8.1/examples/aaws.rb +32 -0
  53. data/vendor/bundle/gems/httparty-0.8.1/examples/basic.rb +32 -0
  54. data/vendor/bundle/gems/httparty-0.8.1/examples/crack.rb +19 -0
  55. data/vendor/bundle/gems/httparty-0.8.1/examples/custom_parsers.rb +67 -0
  56. data/vendor/bundle/gems/httparty-0.8.1/examples/delicious.rb +37 -0
  57. data/vendor/bundle/gems/httparty-0.8.1/examples/google.rb +16 -0
  58. data/vendor/bundle/gems/httparty-0.8.1/examples/rubyurl.rb +14 -0
  59. data/vendor/bundle/gems/httparty-0.8.1/examples/tripit_sign_in.rb +33 -0
  60. data/vendor/bundle/gems/httparty-0.8.1/examples/twitter.rb +31 -0
  61. data/vendor/bundle/gems/httparty-0.8.1/examples/whoismyrep.rb +10 -0
  62. data/vendor/bundle/gems/httparty-0.8.1/features/basic_authentication.feature +20 -0
  63. data/vendor/bundle/gems/httparty-0.8.1/features/command_line.feature +7 -0
  64. data/vendor/bundle/gems/httparty-0.8.1/features/deals_with_http_error_codes.feature +26 -0
  65. data/vendor/bundle/gems/httparty-0.8.1/features/digest_authentication.feature +20 -0
  66. data/vendor/bundle/gems/httparty-0.8.1/features/handles_compressed_responses.feature +19 -0
  67. data/vendor/bundle/gems/httparty-0.8.1/features/handles_multiple_formats.feature +34 -0
  68. data/vendor/bundle/gems/httparty-0.8.1/features/steps/env.rb +22 -0
  69. data/vendor/bundle/gems/httparty-0.8.1/features/steps/httparty_response_steps.rb +26 -0
  70. data/vendor/bundle/gems/httparty-0.8.1/features/steps/httparty_steps.rb +27 -0
  71. data/vendor/bundle/gems/httparty-0.8.1/features/steps/mongrel_helper.rb +94 -0
  72. data/vendor/bundle/gems/httparty-0.8.1/features/steps/remote_service_steps.rb +69 -0
  73. data/vendor/bundle/gems/httparty-0.8.1/features/supports_redirection.feature +22 -0
  74. data/vendor/bundle/gems/httparty-0.8.1/features/supports_timeout_option.feature +13 -0
  75. data/vendor/bundle/gems/httparty-0.8.1/httparty.gemspec +24 -0
  76. data/vendor/bundle/gems/httparty-0.8.1/lib/httparty.rb +452 -0
  77. data/vendor/bundle/gems/httparty-0.8.1/lib/httparty/cookie_hash.rb +22 -0
  78. data/vendor/bundle/gems/httparty-0.8.1/lib/httparty/core_extensions.rb +9 -0
  79. data/vendor/bundle/gems/httparty-0.8.1/lib/httparty/exceptions.rb +26 -0
  80. data/vendor/bundle/gems/httparty-0.8.1/lib/httparty/hash_conversions.rb +51 -0
  81. data/vendor/bundle/gems/httparty-0.8.1/lib/httparty/module_inheritable_attributes.rb +34 -0
  82. data/vendor/bundle/gems/httparty-0.8.1/lib/httparty/net_digest_auth.rb +71 -0
  83. data/vendor/bundle/gems/httparty-0.8.1/lib/httparty/parser.rb +141 -0
  84. data/vendor/bundle/gems/httparty-0.8.1/lib/httparty/request.rb +257 -0
  85. data/vendor/bundle/gems/httparty-0.8.1/lib/httparty/response.rb +85 -0
  86. data/vendor/bundle/gems/httparty-0.8.1/lib/httparty/version.rb +3 -0
  87. data/vendor/bundle/gems/httparty-0.8.1/spec/fixtures/delicious.xml +23 -0
  88. data/vendor/bundle/gems/httparty-0.8.1/spec/fixtures/empty.xml +0 -0
  89. data/vendor/bundle/gems/httparty-0.8.1/spec/fixtures/google.html +3 -0
  90. data/vendor/bundle/gems/httparty-0.8.1/spec/fixtures/ssl/generate.sh +29 -0
  91. data/vendor/bundle/gems/httparty-0.8.1/spec/fixtures/ssl/generated/1fe462c2.0 +16 -0
  92. data/vendor/bundle/gems/httparty-0.8.1/spec/fixtures/ssl/generated/bogushost.crt +13 -0
  93. data/vendor/bundle/gems/httparty-0.8.1/spec/fixtures/ssl/generated/ca.crt +16 -0
  94. data/vendor/bundle/gems/httparty-0.8.1/spec/fixtures/ssl/generated/ca.key +15 -0
  95. data/vendor/bundle/gems/httparty-0.8.1/spec/fixtures/ssl/generated/selfsigned.crt +14 -0
  96. data/vendor/bundle/gems/httparty-0.8.1/spec/fixtures/ssl/generated/server.crt +13 -0
  97. data/vendor/bundle/gems/httparty-0.8.1/spec/fixtures/ssl/generated/server.key +15 -0
  98. data/vendor/bundle/gems/httparty-0.8.1/spec/fixtures/ssl/openssl-exts.cnf +9 -0
  99. data/vendor/bundle/gems/httparty-0.8.1/spec/fixtures/twitter.json +1 -0
  100. data/vendor/bundle/gems/httparty-0.8.1/spec/fixtures/twitter.xml +403 -0
  101. data/vendor/bundle/gems/httparty-0.8.1/spec/fixtures/undefined_method_add_node_for_nil.xml +2 -0
  102. data/vendor/bundle/gems/httparty-0.8.1/spec/httparty/cookie_hash_spec.rb +71 -0
  103. data/vendor/bundle/gems/httparty-0.8.1/spec/httparty/net_digest_auth_spec.rb +93 -0
  104. data/vendor/bundle/gems/httparty-0.8.1/spec/httparty/parser_spec.rb +155 -0
  105. data/vendor/bundle/gems/httparty-0.8.1/spec/httparty/request_spec.rb +544 -0
  106. data/vendor/bundle/gems/httparty-0.8.1/spec/httparty/response_spec.rb +193 -0
  107. data/vendor/bundle/gems/httparty-0.8.1/spec/httparty/ssl_spec.rb +54 -0
  108. data/vendor/bundle/gems/httparty-0.8.1/spec/httparty_spec.rb +621 -0
  109. data/vendor/bundle/gems/httparty-0.8.1/spec/spec.opts +3 -0
  110. data/vendor/bundle/gems/httparty-0.8.1/spec/spec_helper.rb +22 -0
  111. data/vendor/bundle/gems/httparty-0.8.1/spec/support/ssl_test_helper.rb +25 -0
  112. data/vendor/bundle/gems/httparty-0.8.1/spec/support/ssl_test_server.rb +69 -0
  113. data/vendor/bundle/gems/httparty-0.8.1/spec/support/stub_response.rb +30 -0
  114. data/vendor/bundle/gems/httparty-0.8.1/website/css/common.css +47 -0
  115. data/vendor/bundle/gems/httparty-0.8.1/website/index.html +73 -0
  116. data/vendor/bundle/gems/json-1.6.3/.gitignore +8 -0
  117. data/vendor/bundle/gems/json-1.6.3/.travis.yml +15 -0
  118. data/vendor/bundle/gems/json-1.6.3/CHANGES +223 -0
  119. data/vendor/bundle/gems/json-1.6.3/COPYING +58 -0
  120. data/vendor/bundle/gems/json-1.6.3/COPYING-json-jruby +57 -0
  121. data/vendor/bundle/gems/json-1.6.3/GPL +340 -0
  122. data/vendor/bundle/gems/json-1.6.3/Gemfile +11 -0
  123. data/vendor/bundle/gems/json-1.6.3/README-json-jruby.markdown +33 -0
  124. data/vendor/bundle/gems/json-1.6.3/README.rdoc +358 -0
  125. data/vendor/bundle/gems/json-1.6.3/Rakefile +408 -0
  126. data/vendor/bundle/gems/json-1.6.3/TODO +1 -0
  127. data/vendor/bundle/gems/json-1.6.3/VERSION +1 -0
  128. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/.keep +0 -0
  129. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log +52 -0
  130. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast-autocorrelation.dat +1000 -0
  131. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast.dat +1001 -0
  132. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty-autocorrelation.dat +900 -0
  133. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty.dat +901 -0
  134. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe-autocorrelation.dat +1000 -0
  135. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe.dat +1001 -0
  136. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log +261 -0
  137. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast-autocorrelation.dat +1000 -0
  138. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast.dat +1001 -0
  139. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty-autocorrelation.dat +1000 -0
  140. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty.dat +1001 -0
  141. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe-autocorrelation.dat +1000 -0
  142. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe.dat +1001 -0
  143. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log +262 -0
  144. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator-autocorrelation.dat +1000 -0
  145. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator.dat +1001 -0
  146. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log +82 -0
  147. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log +34 -0
  148. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser-autocorrelation.dat +900 -0
  149. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser.dat +901 -0
  150. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log +81 -0
  151. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser-autocorrelation.dat +1000 -0
  152. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser.dat +1001 -0
  153. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log +82 -0
  154. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser-autocorrelation.dat +1000 -0
  155. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser.dat +1001 -0
  156. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log +82 -0
  157. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser-autocorrelation.dat +1000 -0
  158. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser.dat +1001 -0
  159. data/vendor/bundle/gems/json-1.6.3/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log +82 -0
  160. data/vendor/bundle/gems/json-1.6.3/benchmarks/data/.keep +0 -0
  161. data/vendor/bundle/gems/json-1.6.3/benchmarks/generator2_benchmark.rb +222 -0
  162. data/vendor/bundle/gems/json-1.6.3/benchmarks/generator_benchmark.rb +224 -0
  163. data/vendor/bundle/gems/json-1.6.3/benchmarks/ohai.json +1216 -0
  164. data/vendor/bundle/gems/json-1.6.3/benchmarks/ohai.ruby +1 -0
  165. data/vendor/bundle/gems/json-1.6.3/benchmarks/parser2_benchmark.rb +251 -0
  166. data/vendor/bundle/gems/json-1.6.3/benchmarks/parser_benchmark.rb +259 -0
  167. data/vendor/bundle/gems/json-1.6.3/data/example.json +1 -0
  168. data/vendor/bundle/gems/json-1.6.3/data/index.html +38 -0
  169. data/vendor/bundle/gems/json-1.6.3/data/prototype.js +4184 -0
  170. data/vendor/bundle/gems/json-1.6.3/diagrams/.keep +0 -0
  171. data/vendor/bundle/gems/json-1.6.3/ext/json/ext/fbuffer/fbuffer.h +156 -0
  172. data/vendor/bundle/gems/json-1.6.3/ext/json/ext/generator/Makefile +187 -0
  173. data/vendor/bundle/gems/json-1.6.3/ext/json/ext/generator/extconf.rb +13 -0
  174. data/vendor/bundle/gems/json-1.6.3/ext/json/ext/generator/generator.bundle +0 -0
  175. data/vendor/bundle/gems/json-1.6.3/ext/json/ext/generator/generator.c +1384 -0
  176. data/vendor/bundle/gems/json-1.6.3/ext/json/ext/generator/generator.h +161 -0
  177. data/vendor/bundle/gems/json-1.6.3/ext/json/ext/generator/generator.o +0 -0
  178. data/vendor/bundle/gems/json-1.6.3/ext/json/ext/json/ext/generator.bundle +0 -0
  179. data/vendor/bundle/gems/json-1.6.3/ext/json/ext/json/ext/parser.bundle +0 -0
  180. data/vendor/bundle/gems/json-1.6.3/ext/json/ext/parser/Makefile +187 -0
  181. data/vendor/bundle/gems/json-1.6.3/ext/json/ext/parser/extconf.rb +13 -0
  182. data/vendor/bundle/gems/json-1.6.3/ext/json/ext/parser/parser.bundle +0 -0
  183. data/vendor/bundle/gems/json-1.6.3/ext/json/ext/parser/parser.c +2197 -0
  184. data/vendor/bundle/gems/json-1.6.3/ext/json/ext/parser/parser.h +77 -0
  185. data/vendor/bundle/gems/json-1.6.3/ext/json/ext/parser/parser.o +0 -0
  186. data/vendor/bundle/gems/json-1.6.3/ext/json/ext/parser/parser.rl +920 -0
  187. data/vendor/bundle/gems/json-1.6.3/install.rb +19 -0
  188. data/vendor/bundle/gems/json-1.6.3/java/lib/bytelist-1.0.6.jar +0 -0
  189. data/vendor/bundle/gems/json-1.6.3/java/lib/jcodings.jar +0 -0
  190. data/vendor/bundle/gems/json-1.6.3/java/src/json/ext/ByteListTranscoder.java +167 -0
  191. data/vendor/bundle/gems/json-1.6.3/java/src/json/ext/Generator.java +437 -0
  192. data/vendor/bundle/gems/json-1.6.3/java/src/json/ext/GeneratorMethods.java +232 -0
  193. data/vendor/bundle/gems/json-1.6.3/java/src/json/ext/GeneratorService.java +43 -0
  194. data/vendor/bundle/gems/json-1.6.3/java/src/json/ext/GeneratorState.java +522 -0
  195. data/vendor/bundle/gems/json-1.6.3/java/src/json/ext/OptionsReader.java +119 -0
  196. data/vendor/bundle/gems/json-1.6.3/java/src/json/ext/Parser.java +2589 -0
  197. data/vendor/bundle/gems/json-1.6.3/java/src/json/ext/Parser.rl +913 -0
  198. data/vendor/bundle/gems/json-1.6.3/java/src/json/ext/ParserService.java +35 -0
  199. data/vendor/bundle/gems/json-1.6.3/java/src/json/ext/RuntimeInfo.java +121 -0
  200. data/vendor/bundle/gems/json-1.6.3/java/src/json/ext/StringDecoder.java +166 -0
  201. data/vendor/bundle/gems/json-1.6.3/java/src/json/ext/StringEncoder.java +106 -0
  202. data/vendor/bundle/gems/json-1.6.3/java/src/json/ext/Utils.java +89 -0
  203. data/vendor/bundle/gems/json-1.6.3/json-java.gemspec +22 -0
  204. data/vendor/bundle/gems/json-1.6.3/json.gemspec +40 -0
  205. data/vendor/bundle/gems/json-1.6.3/json_pure.gemspec +42 -0
  206. data/vendor/bundle/gems/json-1.6.3/lib/json.rb +62 -0
  207. data/vendor/bundle/gems/json-1.6.3/lib/json/add/bigdecimal.rb +21 -0
  208. data/vendor/bundle/gems/json-1.6.3/lib/json/add/complex.rb +22 -0
  209. data/vendor/bundle/gems/json-1.6.3/lib/json/add/core.rb +11 -0
  210. data/vendor/bundle/gems/json-1.6.3/lib/json/add/date.rb +34 -0
  211. data/vendor/bundle/gems/json-1.6.3/lib/json/add/date_time.rb +50 -0
  212. data/vendor/bundle/gems/json-1.6.3/lib/json/add/exception.rb +31 -0
  213. data/vendor/bundle/gems/json-1.6.3/lib/json/add/ostruct.rb +31 -0
  214. data/vendor/bundle/gems/json-1.6.3/lib/json/add/range.rb +29 -0
  215. data/vendor/bundle/gems/json-1.6.3/lib/json/add/rational.rb +22 -0
  216. data/vendor/bundle/gems/json-1.6.3/lib/json/add/regexp.rb +30 -0
  217. data/vendor/bundle/gems/json-1.6.3/lib/json/add/struct.rb +30 -0
  218. data/vendor/bundle/gems/json-1.6.3/lib/json/add/symbol.rb +25 -0
  219. data/vendor/bundle/gems/json-1.6.3/lib/json/add/time.rb +35 -0
  220. data/vendor/bundle/gems/json-1.6.3/lib/json/common.rb +470 -0
  221. data/vendor/bundle/gems/json-1.6.3/lib/json/ext.rb +21 -0
  222. data/vendor/bundle/gems/json-1.6.3/lib/json/ext/.keep +0 -0
  223. data/vendor/bundle/gems/json-1.6.3/lib/json/pure.rb +21 -0
  224. data/vendor/bundle/gems/json-1.6.3/lib/json/pure/generator.rb +468 -0
  225. data/vendor/bundle/gems/json-1.6.3/lib/json/pure/parser.rb +359 -0
  226. data/vendor/bundle/gems/json-1.6.3/lib/json/version.rb +8 -0
  227. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail1.json +1 -0
  228. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail10.json +1 -0
  229. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail11.json +1 -0
  230. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail12.json +1 -0
  231. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail13.json +1 -0
  232. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail14.json +1 -0
  233. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail18.json +1 -0
  234. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail19.json +1 -0
  235. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail2.json +1 -0
  236. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail20.json +1 -0
  237. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail21.json +1 -0
  238. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail22.json +1 -0
  239. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail23.json +1 -0
  240. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail24.json +1 -0
  241. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail25.json +1 -0
  242. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail27.json +2 -0
  243. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail28.json +2 -0
  244. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail3.json +1 -0
  245. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail4.json +1 -0
  246. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail5.json +1 -0
  247. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail6.json +1 -0
  248. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail7.json +1 -0
  249. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail8.json +1 -0
  250. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/fail9.json +1 -0
  251. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/pass1.json +56 -0
  252. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/pass15.json +1 -0
  253. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/pass16.json +1 -0
  254. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/pass17.json +1 -0
  255. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/pass2.json +1 -0
  256. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/pass26.json +1 -0
  257. data/vendor/bundle/gems/json-1.6.3/tests/fixtures/pass3.json +6 -0
  258. data/vendor/bundle/gems/json-1.6.3/tests/setup_variant.rb +11 -0
  259. data/vendor/bundle/gems/json-1.6.3/tests/test_json.rb +476 -0
  260. data/vendor/bundle/gems/json-1.6.3/tests/test_json_addition.rb +188 -0
  261. data/vendor/bundle/gems/json-1.6.3/tests/test_json_encoding.rb +65 -0
  262. data/vendor/bundle/gems/json-1.6.3/tests/test_json_fixtures.rb +35 -0
  263. data/vendor/bundle/gems/json-1.6.3/tests/test_json_generate.rb +249 -0
  264. data/vendor/bundle/gems/json-1.6.3/tests/test_json_string_matching.rb +40 -0
  265. data/vendor/bundle/gems/json-1.6.3/tests/test_json_unicode.rb +72 -0
  266. data/vendor/bundle/gems/json-1.6.3/tools/fuzz.rb +139 -0
  267. data/vendor/bundle/gems/json-1.6.3/tools/server.rb +62 -0
  268. data/vendor/bundle/gems/multi_json-1.0.4/.document +5 -0
  269. data/vendor/bundle/gems/multi_json-1.0.4/.rspec +3 -0
  270. data/vendor/bundle/gems/multi_json-1.0.4/.travis.yml +7 -0
  271. data/vendor/bundle/gems/multi_json-1.0.4/Gemfile +6 -0
  272. data/vendor/bundle/gems/multi_json-1.0.4/LICENSE.md +20 -0
  273. data/vendor/bundle/gems/multi_json-1.0.4/README.md +94 -0
  274. data/vendor/bundle/gems/multi_json-1.0.4/Rakefile +25 -0
  275. data/vendor/bundle/gems/multi_json-1.0.4/lib/multi_json.rb +85 -0
  276. data/vendor/bundle/gems/multi_json-1.0.4/lib/multi_json/engines/json_common.rb +27 -0
  277. data/vendor/bundle/gems/multi_json-1.0.4/lib/multi_json/engines/json_gem.rb +12 -0
  278. data/vendor/bundle/gems/multi_json-1.0.4/lib/multi_json/engines/json_pure.rb +12 -0
  279. data/vendor/bundle/gems/multi_json-1.0.4/lib/multi_json/engines/ok_json.rb +48 -0
  280. data/vendor/bundle/gems/multi_json-1.0.4/lib/multi_json/engines/yajl.rb +18 -0
  281. data/vendor/bundle/gems/multi_json-1.0.4/lib/multi_json/vendor/ok_json.rb +587 -0
  282. data/vendor/bundle/gems/multi_json-1.0.4/lib/multi_json/version.rb +3 -0
  283. data/vendor/bundle/gems/multi_json-1.0.4/multi_json.gemspec +22 -0
  284. data/vendor/bundle/gems/multi_json-1.0.4/spec/helper.rb +35 -0
  285. data/vendor/bundle/gems/multi_json-1.0.4/spec/multi_json_spec.rb +178 -0
  286. data/vendor/bundle/gems/multi_xml-0.4.1/.gemtest +0 -0
  287. data/vendor/bundle/gems/multi_xml-0.4.1/.gitignore +10 -0
  288. data/vendor/bundle/gems/multi_xml-0.4.1/.rspec +3 -0
  289. data/vendor/bundle/gems/multi_xml-0.4.1/.travis.yml +7 -0
  290. data/vendor/bundle/gems/multi_xml-0.4.1/.yardopts +5 -0
  291. data/vendor/bundle/gems/multi_xml-0.4.1/Gemfile +9 -0
  292. data/vendor/bundle/gems/multi_xml-0.4.1/LICENSE.md +20 -0
  293. data/vendor/bundle/gems/multi_xml-0.4.1/README.md +113 -0
  294. data/vendor/bundle/gems/multi_xml-0.4.1/Rakefile +23 -0
  295. data/vendor/bundle/gems/multi_xml-0.4.1/lib/multi_xml.rb +237 -0
  296. data/vendor/bundle/gems/multi_xml-0.4.1/lib/multi_xml/parsers/libxml.rb +30 -0
  297. data/vendor/bundle/gems/multi_xml-0.4.1/lib/multi_xml/parsers/libxml2_parser.rb +66 -0
  298. data/vendor/bundle/gems/multi_xml-0.4.1/lib/multi_xml/parsers/nokogiri.rb +32 -0
  299. data/vendor/bundle/gems/multi_xml-0.4.1/lib/multi_xml/parsers/ox.rb +97 -0
  300. data/vendor/bundle/gems/multi_xml-0.4.1/lib/multi_xml/parsers/rexml.rb +113 -0
  301. data/vendor/bundle/gems/multi_xml-0.4.1/lib/multi_xml/version.rb +3 -0
  302. data/vendor/bundle/gems/multi_xml-0.4.1/multi_xml.gemspec +24 -0
  303. data/vendor/bundle/gems/multi_xml-0.4.1/spec/helper.rb +3 -0
  304. data/vendor/bundle/gems/multi_xml-0.4.1/spec/multi_xml_spec.rb +41 -0
  305. data/vendor/bundle/gems/multi_xml-0.4.1/spec/parser_shared_example.rb +552 -0
  306. data/vendor/bundle/gems/multi_xml-0.4.1/spec/speed.rb +63 -0
  307. data/vendor/bundle/gems/rspec-2.7.0/.document +2 -0
  308. data/vendor/bundle/gems/rspec-2.7.0/.gitignore +8 -0
  309. data/vendor/bundle/gems/rspec-2.7.0/Gemfile +7 -0
  310. data/vendor/bundle/gems/rspec-2.7.0/License.txt +22 -0
  311. data/vendor/bundle/gems/rspec-2.7.0/README.markdown +47 -0
  312. data/vendor/bundle/gems/rspec-2.7.0/Rakefile +30 -0
  313. data/vendor/bundle/gems/rspec-2.7.0/lib/rspec.rb +4 -0
  314. data/vendor/bundle/gems/rspec-2.7.0/lib/rspec/version.rb +5 -0
  315. data/vendor/bundle/gems/rspec-2.7.0/rspec.gemspec +33 -0
  316. data/vendor/bundle/gems/rspec-core-2.7.1/README.md +68 -0
  317. data/vendor/bundle/gems/rspec-core-2.7.1/exe/autospec +13 -0
  318. data/vendor/bundle/gems/rspec-core-2.7.1/exe/rspec +25 -0
  319. data/vendor/bundle/gems/rspec-core-2.7.1/features/Autotest.md +38 -0
  320. data/vendor/bundle/gems/rspec-core-2.7.1/features/README.md +17 -0
  321. data/vendor/bundle/gems/rspec-core-2.7.1/features/Upgrade.md +364 -0
  322. data/vendor/bundle/gems/rspec-core-2.7.1/features/command_line/README.md +28 -0
  323. data/vendor/bundle/gems/rspec-core-2.7.1/features/command_line/configure.feature +22 -0
  324. data/vendor/bundle/gems/rspec-core-2.7.1/features/command_line/example_name_option.feature +86 -0
  325. data/vendor/bundle/gems/rspec-core-2.7.1/features/command_line/exit_status.feature +83 -0
  326. data/vendor/bundle/gems/rspec-core-2.7.1/features/command_line/format_option.feature +81 -0
  327. data/vendor/bundle/gems/rspec-core-2.7.1/features/command_line/line_number_appended_to_path.feature +140 -0
  328. data/vendor/bundle/gems/rspec-core-2.7.1/features/command_line/line_number_option.feature +58 -0
  329. data/vendor/bundle/gems/rspec-core-2.7.1/features/command_line/pattern_option.feature +31 -0
  330. data/vendor/bundle/gems/rspec-core-2.7.1/features/command_line/rake_task.feature +68 -0
  331. data/vendor/bundle/gems/rspec-core-2.7.1/features/command_line/ruby.feature +22 -0
  332. data/vendor/bundle/gems/rspec-core-2.7.1/features/command_line/tag.feature +90 -0
  333. data/vendor/bundle/gems/rspec-core-2.7.1/features/configuration/alias_example_to.feature +48 -0
  334. data/vendor/bundle/gems/rspec-core-2.7.1/features/configuration/custom_settings.feature +84 -0
  335. data/vendor/bundle/gems/rspec-core-2.7.1/features/configuration/default_path.feature +38 -0
  336. data/vendor/bundle/gems/rspec-core-2.7.1/features/configuration/fail_fast.feature +77 -0
  337. data/vendor/bundle/gems/rspec-core-2.7.1/features/configuration/read_options_from_file.feature +87 -0
  338. data/vendor/bundle/gems/rspec-core-2.7.1/features/example_groups/basic_structure.feature +55 -0
  339. data/vendor/bundle/gems/rspec-core-2.7.1/features/example_groups/shared_context.feature +74 -0
  340. data/vendor/bundle/gems/rspec-core-2.7.1/features/example_groups/shared_examples.feature +204 -0
  341. data/vendor/bundle/gems/rspec-core-2.7.1/features/expectation_framework_integration/configure_expectation_framework.feature +73 -0
  342. data/vendor/bundle/gems/rspec-core-2.7.1/features/filtering/exclusion_filters.feature +139 -0
  343. data/vendor/bundle/gems/rspec-core-2.7.1/features/filtering/if_and_unless.feature +168 -0
  344. data/vendor/bundle/gems/rspec-core-2.7.1/features/filtering/inclusion_filters.feature +105 -0
  345. data/vendor/bundle/gems/rspec-core-2.7.1/features/filtering/run_all_when_everything_filtered.feature +46 -0
  346. data/vendor/bundle/gems/rspec-core-2.7.1/features/formatters/custom_formatter.feature +36 -0
  347. data/vendor/bundle/gems/rspec-core-2.7.1/features/formatters/text_formatter.feature +46 -0
  348. data/vendor/bundle/gems/rspec-core-2.7.1/features/helper_methods/arbitrary_methods.feature +40 -0
  349. data/vendor/bundle/gems/rspec-core-2.7.1/features/helper_methods/let.feature +50 -0
  350. data/vendor/bundle/gems/rspec-core-2.7.1/features/helper_methods/modules.feature +149 -0
  351. data/vendor/bundle/gems/rspec-core-2.7.1/features/hooks/around_hooks.feature +343 -0
  352. data/vendor/bundle/gems/rspec-core-2.7.1/features/hooks/before_and_after_hooks.feature +423 -0
  353. data/vendor/bundle/gems/rspec-core-2.7.1/features/hooks/filtering.feature +234 -0
  354. data/vendor/bundle/gems/rspec-core-2.7.1/features/metadata/current_example.feature +17 -0
  355. data/vendor/bundle/gems/rspec-core-2.7.1/features/metadata/described_class.feature +17 -0
  356. data/vendor/bundle/gems/rspec-core-2.7.1/features/metadata/user_defined.feature +113 -0
  357. data/vendor/bundle/gems/rspec-core-2.7.1/features/mock_framework_integration/use_any_framework.feature +106 -0
  358. data/vendor/bundle/gems/rspec-core-2.7.1/features/mock_framework_integration/use_flexmock.feature +96 -0
  359. data/vendor/bundle/gems/rspec-core-2.7.1/features/mock_framework_integration/use_mocha.feature +97 -0
  360. data/vendor/bundle/gems/rspec-core-2.7.1/features/mock_framework_integration/use_rr.feature +98 -0
  361. data/vendor/bundle/gems/rspec-core-2.7.1/features/mock_framework_integration/use_rspec.feature +97 -0
  362. data/vendor/bundle/gems/rspec-core-2.7.1/features/pending/pending_examples.feature +229 -0
  363. data/vendor/bundle/gems/rspec-core-2.7.1/features/spec_files/arbitrary_file_suffix.feature +13 -0
  364. data/vendor/bundle/gems/rspec-core-2.7.1/features/step_definitions/additional_cli_steps.rb +30 -0
  365. data/vendor/bundle/gems/rspec-core-2.7.1/features/subject/attribute_of_subject.feature +122 -0
  366. data/vendor/bundle/gems/rspec-core-2.7.1/features/subject/explicit_subject.feature +78 -0
  367. data/vendor/bundle/gems/rspec-core-2.7.1/features/subject/implicit_receiver.feature +29 -0
  368. data/vendor/bundle/gems/rspec-core-2.7.1/features/subject/implicit_subject.feature +30 -0
  369. data/vendor/bundle/gems/rspec-core-2.7.1/features/support/env.rb +5 -0
  370. data/vendor/bundle/gems/rspec-core-2.7.1/lib/autotest/discover.rb +1 -0
  371. data/vendor/bundle/gems/rspec-core-2.7.1/lib/autotest/rspec2.rb +73 -0
  372. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/autorun.rb +2 -0
  373. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core.rb +81 -0
  374. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/backward_compatibility.rb +63 -0
  375. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/command_line.rb +32 -0
  376. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/command_line_configuration.rb +62 -0
  377. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb +558 -0
  378. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/configuration_options.rb +139 -0
  379. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/deprecation.rb +48 -0
  380. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/drb_command_line.rb +23 -0
  381. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/dsl.rb +11 -0
  382. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/errors.rb +13 -0
  383. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/example.rb +178 -0
  384. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/example_group.rb +348 -0
  385. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/expecting/with_rspec.rb +9 -0
  386. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/expecting/with_stdlib.rb +9 -0
  387. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/extensions.rb +3 -0
  388. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/extensions/instance_eval_with_args.rb +39 -0
  389. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/extensions/kernel.rb +9 -0
  390. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/extensions/module_eval_with_args.rb +34 -0
  391. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/formatters/base_formatter.rb +172 -0
  392. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/formatters/base_text_formatter.rb +185 -0
  393. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/formatters/documentation_formatter.rb +71 -0
  394. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/formatters/helpers.rb +24 -0
  395. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/formatters/html_formatter.rb +458 -0
  396. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/formatters/progress_formatter.rb +32 -0
  397. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/formatters/snippet_extractor.rb +58 -0
  398. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/formatters/text_mate_formatter.rb +34 -0
  399. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/hooks.rb +160 -0
  400. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/let.rb +101 -0
  401. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/load_path.rb +3 -0
  402. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/metadata.rb +229 -0
  403. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/metadata_hash_builder.rb +93 -0
  404. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/mocking/with_absolutely_nothing.rb +11 -0
  405. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/mocking/with_flexmock.rb +27 -0
  406. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/mocking/with_mocha.rb +23 -0
  407. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/mocking/with_rr.rb +27 -0
  408. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/mocking/with_rspec.rb +23 -0
  409. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/option_parser.rb +147 -0
  410. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/pending.rb +38 -0
  411. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/rake_task.rb +201 -0
  412. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/reporter.rb +78 -0
  413. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/ruby_project.rb +44 -0
  414. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/runner.rb +86 -0
  415. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/shared_context.rb +16 -0
  416. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/shared_example_group.rb +67 -0
  417. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/subject.rb +175 -0
  418. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/version.rb +7 -0
  419. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/world.rb +150 -0
  420. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/monkey.rb +1 -0
  421. data/vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/monkey/spork/test_framework/rspec.rb +8 -0
  422. data/vendor/bundle/gems/rspec-core-2.7.1/spec/autotest/discover_spec.rb +19 -0
  423. data/vendor/bundle/gems/rspec-core-2.7.1/spec/autotest/failed_results_re_spec.rb +45 -0
  424. data/vendor/bundle/gems/rspec-core-2.7.1/spec/autotest/rspec_spec.rb +123 -0
  425. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/command_line_configuration_spec.rb +26 -0
  426. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/command_line_spec.rb +169 -0
  427. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/command_line_spec_output.txt +0 -0
  428. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/configuration_options_spec.rb +437 -0
  429. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/configuration_spec.rb +920 -0
  430. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/deprecations_spec.rb +66 -0
  431. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/drb_command_line_spec.rb +124 -0
  432. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/example_group_spec.rb +1046 -0
  433. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/example_spec.rb +289 -0
  434. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/formatters/base_formatter_spec.rb +80 -0
  435. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/formatters/base_text_formatter_spec.rb +344 -0
  436. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/formatters/documentation_formatter_spec.rb +66 -0
  437. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/formatters/helpers_spec.rb +46 -0
  438. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/formatters/html_formatted-1.8.7-jruby.html +462 -0
  439. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/formatters/html_formatted-1.8.7.html +399 -0
  440. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/formatters/html_formatted-1.9.2.html +406 -0
  441. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/formatters/html_formatted-1.9.3.html +406 -0
  442. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/formatters/html_formatter_spec.rb +81 -0
  443. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/formatters/progress_formatter_spec.rb +30 -0
  444. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/formatters/snippet_extractor_spec.rb +18 -0
  445. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/formatters/text_mate_formatted-1.8.7-jruby.html +462 -0
  446. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/formatters/text_mate_formatted-1.8.7.html +399 -0
  447. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/formatters/text_mate_formatted-1.9.2.html +406 -0
  448. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/formatters/text_mate_formatted-1.9.3.html +406 -0
  449. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/formatters/text_mate_formatter_spec.rb +84 -0
  450. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/hooks_filtering_spec.rb +227 -0
  451. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/hooks_spec.rb +143 -0
  452. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/kernel_extensions_spec.rb +9 -0
  453. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/let_spec.rb +55 -0
  454. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/metadata_spec.rb +383 -0
  455. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/option_parser_spec.rb +86 -0
  456. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/pending_example_spec.rb +187 -0
  457. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/rake_task_spec.rb +138 -0
  458. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/reporter_spec.rb +86 -0
  459. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/resources/a_bar.rb +0 -0
  460. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/resources/a_foo.rb +0 -0
  461. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/resources/a_spec.rb +1 -0
  462. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/resources/custom_example_group_runner.rb +14 -0
  463. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/resources/formatter_specs.rb +60 -0
  464. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/resources/utf8_encoded.rb +8 -0
  465. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/rspec_matchers_spec.rb +45 -0
  466. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/ruby_project_spec.rb +24 -0
  467. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/runner_spec.rb +82 -0
  468. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/shared_context_spec.rb +30 -0
  469. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/shared_example_group_spec.rb +84 -0
  470. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/subject_spec.rb +199 -0
  471. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core/world_spec.rb +315 -0
  472. data/vendor/bundle/gems/rspec-core-2.7.1/spec/rspec/core_spec.rb +31 -0
  473. data/vendor/bundle/gems/rspec-core-2.7.1/spec/spec_helper.rb +92 -0
  474. data/vendor/bundle/gems/rspec-core-2.7.1/spec/support/matchers.rb +75 -0
  475. data/vendor/bundle/gems/rspec-core-2.7.1/spec/support/shared_example_groups.rb +41 -0
  476. data/vendor/bundle/gems/rspec-core-2.7.1/spec/support/spec_files.rb +44 -0
  477. data/vendor/bundle/gems/rspec-expectations-2.7.0/README.md +24 -0
  478. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/README.markdown +49 -0
  479. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/Upgrade.md +53 -0
  480. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/built_in_matchers/README.md +73 -0
  481. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/built_in_matchers/be.feature +135 -0
  482. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/built_in_matchers/be_within.feature +43 -0
  483. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/built_in_matchers/cover.feature +45 -0
  484. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/built_in_matchers/equality.feature +145 -0
  485. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/built_in_matchers/exist.feature +43 -0
  486. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/built_in_matchers/expect_change.feature +59 -0
  487. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/built_in_matchers/expect_error.feature +138 -0
  488. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/built_in_matchers/have.feature +103 -0
  489. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/built_in_matchers/include.feature +121 -0
  490. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/built_in_matchers/match.feature +50 -0
  491. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/built_in_matchers/operators.feature +221 -0
  492. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/built_in_matchers/predicates.feature +128 -0
  493. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/built_in_matchers/respond_to.feature +78 -0
  494. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/built_in_matchers/satisfy.feature +31 -0
  495. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/built_in_matchers/throw_symbol.feature +85 -0
  496. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/built_in_matchers/types.feature +114 -0
  497. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/custom_matchers/access_running_example.feature +53 -0
  498. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/custom_matchers/define_diffable_matcher.feature +27 -0
  499. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/custom_matchers/define_matcher.feature +340 -0
  500. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/custom_matchers/define_matcher_outside_rspec.feature +38 -0
  501. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/custom_matchers/define_matcher_with_fluent_interface.feature +24 -0
  502. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/customized_message.feature +22 -0
  503. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/diffing.feature +85 -0
  504. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/implicit_docstrings.feature +52 -0
  505. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/step_definitions/additional_cli_steps.rb +22 -0
  506. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/support/env.rb +5 -0
  507. data/vendor/bundle/gems/rspec-expectations-2.7.0/features/test_frameworks/test_unit.feature +46 -0
  508. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec-expectations.rb +1 -0
  509. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/expectations.rb +37 -0
  510. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/expectations/deprecation.rb +38 -0
  511. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/expectations/differ.rb +62 -0
  512. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/expectations/errors.rb +9 -0
  513. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/expectations/extensions.rb +3 -0
  514. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/expectations/extensions/array.rb +9 -0
  515. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/expectations/extensions/kernel.rb +26 -0
  516. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/expectations/extensions/object.rb +39 -0
  517. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/expectations/fail_with.rb +54 -0
  518. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/expectations/handler.rb +50 -0
  519. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/expectations/version.rb +8 -0
  520. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers.rb +206 -0
  521. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/be.rb +213 -0
  522. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/be_close.rb +9 -0
  523. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/be_instance_of.rb +26 -0
  524. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/be_kind_of.rb +26 -0
  525. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/be_within.rb +37 -0
  526. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/block_aliases.rb +19 -0
  527. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/change.rb +197 -0
  528. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/compatibility.rb +14 -0
  529. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/cover.rb +35 -0
  530. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/dsl.rb +22 -0
  531. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/eq.rb +46 -0
  532. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/eql.rb +41 -0
  533. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/equal.rb +48 -0
  534. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/errors.rb +5 -0
  535. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/exist.rb +26 -0
  536. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/extensions/instance_eval_with_args.rb +39 -0
  537. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/generated_descriptions.rb +36 -0
  538. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/has.rb +44 -0
  539. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/have.rb +168 -0
  540. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/include.rb +54 -0
  541. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/match.rb +21 -0
  542. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/match_array.rb +71 -0
  543. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/matcher.rb +165 -0
  544. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/method_missing.rb +12 -0
  545. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/operator_matcher.rb +87 -0
  546. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/pretty.rb +37 -0
  547. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/raise_error.rb +130 -0
  548. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/respond_to.rb +85 -0
  549. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/satisfy.rb +51 -0
  550. data/vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/throw_symbol.rb +121 -0
  551. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/expectations/differ_spec.rb +96 -0
  552. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/expectations/extensions/kernel_spec.rb +45 -0
  553. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/expectations/fail_with_spec.rb +70 -0
  554. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/expectations/handler_spec.rb +206 -0
  555. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/be_close_spec.rb +22 -0
  556. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/be_instance_of_spec.rb +36 -0
  557. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/be_kind_of_spec.rb +33 -0
  558. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/be_spec.rb +452 -0
  559. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/be_within_spec.rb +64 -0
  560. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/change_spec.rb +522 -0
  561. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/compatibility_spec.rb +28 -0
  562. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/cover_spec.rb +65 -0
  563. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/description_generation_spec.rb +176 -0
  564. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/dsl_spec.rb +25 -0
  565. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/eq_spec.rb +38 -0
  566. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/eql_spec.rb +37 -0
  567. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/equal_spec.rb +57 -0
  568. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/exist_spec.rb +104 -0
  569. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/has_spec.rb +113 -0
  570. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/have_spec.rb +458 -0
  571. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/include_spec.rb +341 -0
  572. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/match_array_spec.rb +108 -0
  573. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/match_spec.rb +57 -0
  574. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/matcher_spec.rb +420 -0
  575. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/matchers_spec.rb +31 -0
  576. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/method_missing_spec.rb +23 -0
  577. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/operator_matcher_spec.rb +221 -0
  578. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/raise_error_spec.rb +339 -0
  579. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/respond_to_spec.rb +292 -0
  580. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/satisfy_spec.rb +40 -0
  581. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/throw_symbol_spec.rb +113 -0
  582. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/spec_helper.rb +26 -0
  583. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/support/classes.rb +56 -0
  584. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/support/matchers.rb +22 -0
  585. data/vendor/bundle/gems/rspec-expectations-2.7.0/spec/support/ruby_version.rb +10 -0
  586. data/vendor/bundle/gems/rspec-mocks-2.7.0/README.md +40 -0
  587. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/README.markdown +67 -0
  588. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/Scope.md +17 -0
  589. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/Upgrade.md +22 -0
  590. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/argument_matchers/README.md +27 -0
  591. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/argument_matchers/explicit.feature +60 -0
  592. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/argument_matchers/general_matchers.feature +85 -0
  593. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/argument_matchers/type_matchers.feature +25 -0
  594. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/message_expectations/README.md +58 -0
  595. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/message_expectations/any_instance.feature +21 -0
  596. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/message_expectations/block_local_expectations.feature.pending +55 -0
  597. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/message_expectations/expect_message.feature +94 -0
  598. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/message_expectations/receive_counts.feature +209 -0
  599. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/message_expectations/warn_when_expectation_is_set_on_nil.feature +50 -0
  600. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/method_stubs/README.md +43 -0
  601. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/method_stubs/any_instance.feature +133 -0
  602. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/method_stubs/as_null_object.feature +36 -0
  603. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/method_stubs/simple_return_value.feature +64 -0
  604. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/method_stubs/stub_chain.feature +51 -0
  605. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/method_stubs/stub_implementation.feature +26 -0
  606. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/method_stubs/to_ary.feature +47 -0
  607. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/outside_rspec/configuration.feature +82 -0
  608. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/outside_rspec/standalone.feature +32 -0
  609. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/step_definitions/additional_cli_steps.rb +4 -0
  610. data/vendor/bundle/gems/rspec-mocks-2.7.0/features/support/env.rb +6 -0
  611. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks.rb +196 -0
  612. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/any_instance.rb +29 -0
  613. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/any_instance/chain.rb +49 -0
  614. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/any_instance/expectation_chain.rb +33 -0
  615. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/any_instance/message_chains.rb +48 -0
  616. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/any_instance/recorder.rb +168 -0
  617. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/any_instance/stub_chain.rb +35 -0
  618. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/any_instance/stub_chain_chain.rb +34 -0
  619. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/argument_expectation.rb +54 -0
  620. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/argument_matchers.rb +227 -0
  621. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/error_generator.rb +97 -0
  622. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/errors.rb +10 -0
  623. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/extensions/instance_exec.rb +31 -0
  624. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/extensions/marshal.rb +23 -0
  625. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/extensions/psych.rb +23 -0
  626. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/framework.rb +18 -0
  627. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/message_expectation.rb +357 -0
  628. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/method_double.rb +165 -0
  629. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/methods.rb +98 -0
  630. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/mock.rb +79 -0
  631. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/order_group.rb +29 -0
  632. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/proxy.rb +158 -0
  633. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/serialization.rb +28 -0
  634. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/space.rb +28 -0
  635. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/spec_methods.rb +53 -0
  636. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/standalone.rb +3 -0
  637. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/rspec/mocks/version.rb +7 -0
  638. data/vendor/bundle/gems/rspec-mocks-2.7.0/lib/spec/mocks.rb +2 -0
  639. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/and_yield_spec.rb +114 -0
  640. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/any_instance/message_chains_spec.rb +40 -0
  641. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/any_instance_spec.rb +785 -0
  642. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/any_number_of_times_spec.rb +30 -0
  643. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/argument_expectation_spec.rb +37 -0
  644. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/at_least_spec.rb +103 -0
  645. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/at_most_spec.rb +99 -0
  646. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/block_return_value_spec.rb +45 -0
  647. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/bug_report_10260_spec.rb +8 -0
  648. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/bug_report_10263_spec.rb +25 -0
  649. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/bug_report_11545_spec.rb +32 -0
  650. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/bug_report_496_spec.rb +17 -0
  651. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/bug_report_600_spec.rb +22 -0
  652. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/bug_report_7611_spec.rb +16 -0
  653. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/bug_report_8165_spec.rb +31 -0
  654. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/bug_report_830_spec.rb +21 -0
  655. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/bug_report_957_spec.rb +22 -0
  656. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/double_spec.rb +12 -0
  657. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/failing_argument_matchers_spec.rb +95 -0
  658. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/hash_including_matcher_spec.rb +90 -0
  659. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/hash_not_including_matcher_spec.rb +67 -0
  660. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/mock_ordering_spec.rb +94 -0
  661. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/mock_space_spec.rb +54 -0
  662. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/mock_spec.rb +702 -0
  663. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/multiple_return_value_spec.rb +191 -0
  664. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/nil_expectation_warning_spec.rb +62 -0
  665. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/null_object_mock_spec.rb +78 -0
  666. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/once_counts_spec.rb +53 -0
  667. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/options_hash_spec.rb +35 -0
  668. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/partial_mock_spec.rb +156 -0
  669. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/partial_mock_using_mocks_directly_spec.rb +95 -0
  670. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/passing_argument_matchers_spec.rb +142 -0
  671. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/precise_counts_spec.rb +58 -0
  672. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/record_messages_spec.rb +26 -0
  673. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/serialization_spec.rb +111 -0
  674. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/stash_spec.rb +27 -0
  675. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/stub_chain_spec.rb +149 -0
  676. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/stub_implementation_spec.rb +68 -0
  677. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/stub_spec.rb +235 -0
  678. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/stubbed_message_expectations_spec.rb +26 -0
  679. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/to_ary_spec.rb +40 -0
  680. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks/twice_counts_spec.rb +67 -0
  681. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/rspec/mocks_spec.rb +51 -0
  682. data/vendor/bundle/gems/rspec-mocks-2.7.0/spec/spec_helper.rb +52 -0
  683. data/vendor/bundle/specifications/diff-lcs-1.1.3.gemspec +35 -0
  684. data/vendor/bundle/specifications/httparty-0.8.1.gemspec +34 -0
  685. data/vendor/bundle/specifications/json-1.6.3.gemspec +39 -0
  686. data/vendor/bundle/specifications/multi_json-1.0.4.gemspec +40 -0
  687. data/vendor/bundle/specifications/multi_xml-0.4.1.gemspec +49 -0
  688. data/vendor/bundle/specifications/rspec-2.7.0.gemspec +38 -0
  689. data/vendor/bundle/specifications/rspec-core-2.7.1.gemspec +31 -0
  690. data/vendor/bundle/specifications/rspec-expectations-2.7.0.gemspec +32 -0
  691. data/vendor/bundle/specifications/rspec-mocks-2.7.0.gemspec +29 -0
  692. metadata +771 -0
@@ -0,0 +1,437 @@
1
+ require 'spec_helper'
2
+ require 'ostruct'
3
+ require 'tmpdir'
4
+
5
+ describe RSpec::Core::ConfigurationOptions do
6
+
7
+ def config_options_object(*args)
8
+ coo = RSpec::Core::ConfigurationOptions.new(args)
9
+ coo.parse_options
10
+ coo
11
+ end
12
+
13
+ def parse_options(*args)
14
+ config_options_object(*args).options
15
+ end
16
+
17
+ it "warns when HOME env var is not set", :unless => (RUBY_PLATFORM == 'java') do
18
+ begin
19
+ orig_home = ENV.delete("HOME")
20
+ coo = RSpec::Core::ConfigurationOptions.new([])
21
+ coo.should_receive(:warn)
22
+ coo.parse_options
23
+ ensure
24
+ ENV["HOME"] = orig_home
25
+ end
26
+ end
27
+
28
+ describe "#configure" do
29
+ it "sends libs before requires" do
30
+ opts = config_options_object(*%w[--require a/path -I a/lib])
31
+ config = double("config").as_null_object
32
+ config.should_receive(:libs=).ordered
33
+ config.should_receive(:requires=).ordered
34
+ opts.configure(config)
35
+ end
36
+
37
+ it "sends requires before formatter" do
38
+ opts = config_options_object(*%w[--require a/path -f a/formatter])
39
+ config = double("config").as_null_object
40
+ config.should_receive(:requires=).ordered
41
+ config.should_receive(:add_formatter).ordered
42
+ opts.configure(config)
43
+ end
44
+
45
+ it "sends default_path before files_or_directories_to_run" do
46
+ opts = config_options_object(*%w[--default_path spec])
47
+ config = double("config").as_null_object
48
+ config.should_receive(:default_path=).ordered
49
+ config.should_receive(:files_or_directories_to_run=).ordered
50
+ opts.configure(config)
51
+ end
52
+
53
+ it "sends pattern before files_or_directories_to_run" do
54
+ opts = config_options_object(*%w[--pattern **/*.spec])
55
+ config = double("config").as_null_object
56
+ config.should_receive(:pattern=).ordered
57
+ config.should_receive(:files_or_directories_to_run=).ordered
58
+ opts.configure(config)
59
+ end
60
+
61
+ it "merges the :exclusion_filter option with the default exclusion_filter" do
62
+ opts = config_options_object(*%w[--tag ~slow])
63
+ config = RSpec::Core::Configuration.new
64
+ opts.configure(config)
65
+ config.exclusion_filter.should have_key(:slow)
66
+ end
67
+ end
68
+
69
+ describe "-c, --color, and --colour" do
70
+ it "sets :color_enabled => true" do
71
+ parse_options('-c').should include(:color_enabled => true)
72
+ parse_options('--color').should include(:color_enabled => true)
73
+ parse_options('--colour').should include(:color_enabled => true)
74
+ end
75
+ end
76
+
77
+ describe "--no-color" do
78
+ it "sets :color_enabled => false" do
79
+ parse_options('--no-color').should include(:color_enabled => false)
80
+ end
81
+
82
+ it "overrides previous :color_enabled => true" do
83
+ parse_options('--color', '--no-color').should include(:color_enabled => false)
84
+ end
85
+
86
+ it "gets overriden by a subsequent :color_enabled => true" do
87
+ parse_options('--no-color', '--color').should include(:color_enabled => true)
88
+ end
89
+ end
90
+
91
+ describe "-I" do
92
+ example "adds to :libs" do
93
+ parse_options('-I', 'a_dir').should include(:libs => ['a_dir'])
94
+ end
95
+ example "can be used more than once" do
96
+ parse_options('-I', 'dir_1', '-I', 'dir_2').should include(:libs => ['dir_1','dir_2'])
97
+ end
98
+ end
99
+
100
+ describe '--require' do
101
+ example "requires files" do
102
+ parse_options('--require', 'a/path').should include(:requires => ['a/path'])
103
+ end
104
+ example "can be used more than once" do
105
+ parse_options('--require', 'path/1', '--require', 'path/2').should include(:requires => ['path/1','path/2'])
106
+ end
107
+ end
108
+
109
+ describe "--format, -f" do
110
+ it "sets :formatter" do
111
+ parse_options('--format', 'd').should include(:formatters => [['d']])
112
+ parse_options('-f', 'd').should include(:formatters => [['d']])
113
+ parse_options('-fd').should include(:formatters => [['d']])
114
+ end
115
+
116
+ example "can accept a class name" do
117
+ parse_options('-fSome::Formatter::Class').should include(:formatters => [['Some::Formatter::Class']])
118
+ end
119
+ end
120
+
121
+ describe "--profile, -p" do
122
+ it "sets :profile_examples => true" do
123
+ parse_options('-p').should include(:profile_examples => true)
124
+ parse_options('--profile').should include(:profile_examples => true)
125
+ end
126
+ end
127
+
128
+ describe '--line_number' do
129
+ it "sets :line_number" do
130
+ parse_options('-l','3').should include(:line_numbers => ['3'])
131
+ parse_options('--line_number','3').should include(:line_numbers => ['3'])
132
+ end
133
+
134
+ it "can be specified multiple times" do
135
+ parse_options('-l','3', '-l', '6').should include(:line_numbers => ['3', '6'])
136
+ parse_options('--line_number','3', '--line_number', '6').should include(:line_numbers => ['3', '6'])
137
+ end
138
+ end
139
+
140
+ describe "--example" do
141
+ it "sets :full_description" do
142
+ parse_options('--example','foo').should include(:full_description => /foo/)
143
+ parse_options('-e','bar').should include(:full_description => /bar/)
144
+ end
145
+ end
146
+
147
+ describe "--backtrace, -b" do
148
+ it "sets full_backtrace on config" do
149
+ parse_options("--backtrace").should include(:full_backtrace => true)
150
+ parse_options("-b").should include(:full_backtrace => true)
151
+ end
152
+ end
153
+
154
+ describe "--debug, -d" do
155
+ it "sets :debug => true" do
156
+ parse_options("--debug").should include(:debug => true)
157
+ parse_options("-d").should include(:debug => true)
158
+ end
159
+ end
160
+
161
+ describe "--fail-fast" do
162
+ it "defaults to false" do
163
+ parse_options[:fail_fast].should be_false
164
+ end
165
+
166
+ it "sets fail_fast on config" do
167
+ parse_options("--fail-fast")[:fail_fast].should be_true
168
+ end
169
+ end
170
+
171
+ describe "--failure-exit-code" do
172
+ it "sets :failure_exit_code" do
173
+ parse_options('--failure-exit-code', '0').should include(:failure_exit_code => 0)
174
+ parse_options('--failure-exit-code', '1').should include(:failure_exit_code => 1)
175
+ parse_options('--failure-exit-code', '2').should include(:failure_exit_code => 2)
176
+ end
177
+
178
+ it "overrides previous :failure_exit_code" do
179
+ parse_options('--failure-exit-code', '2', '--failure-exit-code', '3').should include(:failure_exit_code => 3)
180
+ end
181
+ end
182
+
183
+ describe "--options" do
184
+ it "sets :custom_options_file" do
185
+ parse_options(*%w[-O my.opts]).should include(:custom_options_file => "my.opts")
186
+ parse_options(*%w[--options my.opts]).should include(:custom_options_file => "my.opts")
187
+ end
188
+ end
189
+
190
+ describe "--drb, -X" do
191
+ context "combined with --debug" do
192
+ it "turns off the debugger if --drb is specified first" do
193
+ config_options_object("--drb", "--debug").drb_argv.should_not include("--debug")
194
+ config_options_object("--drb", "-d" ).drb_argv.should_not include("--debug")
195
+ config_options_object("-X", "--debug").drb_argv.should_not include("--debug")
196
+ config_options_object("-X", "-d" ).drb_argv.should_not include("--debug")
197
+ end
198
+
199
+ it "turns off the debugger option if --drb is specified later" do
200
+ config_options_object("--debug", "--drb").drb_argv.should_not include("--debug")
201
+ config_options_object("-d", "--drb").drb_argv.should_not include("--debug")
202
+ config_options_object("--debug", "-X" ).drb_argv.should_not include("--debug")
203
+ config_options_object("-d", "-X" ).drb_argv.should_not include("--debug")
204
+ end
205
+
206
+ it "turns off the debugger option if --drb is specified in the options file" do
207
+ File.stub(:exist?) { true }
208
+ IO.stub(:read) { "--drb" }
209
+ config_options_object("--debug").drb_argv.should_not include("--debug")
210
+ config_options_object("-d" ).drb_argv.should_not include("--debug")
211
+ end
212
+
213
+ it "turns off the debugger option if --debug is specified in the options file" do
214
+ File.stub(:exist?) { true }
215
+ IO.stub(:read) { "--debug" }
216
+ config_options_object("--drb").drb_argv.should_not include("--debug")
217
+ config_options_object("-X" ).drb_argv.should_not include("--debug")
218
+ end
219
+ end
220
+
221
+ it "does not send --drb back to the parser after parsing options" do
222
+ config_options_object("--drb", "--color").drb_argv.should_not include("--drb")
223
+ end
224
+
225
+ end
226
+
227
+ describe "--no-drb" do
228
+ it "disables drb" do
229
+ parse_options("--no-drb").should include(:drb => false)
230
+ end
231
+
232
+ it "overrides a previous drb => true" do
233
+ parse_options("--drb", "--no-drb").should include(:drb => false)
234
+ end
235
+
236
+ it "gets overriden by a subsquent drb => true" do
237
+ parse_options("--no-drb", "--drb").should include(:drb => true)
238
+ end
239
+ end
240
+
241
+
242
+ describe "files_or_directories_to_run" do
243
+ it "parses files from '-c file.rb dir/file.rb'" do
244
+ parse_options("-c", "file.rb", "dir/file.rb").should include(:files_or_directories_to_run => ["file.rb", "dir/file.rb"])
245
+ end
246
+
247
+ it "parses dir from 'dir'" do
248
+ parse_options("dir").should include(:files_or_directories_to_run => ["dir"])
249
+ end
250
+
251
+ it "parses dir and files from 'spec/file1_spec.rb, spec/file2_spec.rb'" do
252
+ parse_options("dir", "spec/file1_spec.rb", "spec/file2_spec.rb").should include(:files_or_directories_to_run => ["dir", "spec/file1_spec.rb", "spec/file2_spec.rb"])
253
+ end
254
+
255
+ it "provides no files or directories if spec directory does not exist" do
256
+ FileTest.stub(:directory?).with("spec").and_return false
257
+ parse_options().should include(:files_or_directories_to_run => [])
258
+ end
259
+
260
+ it "parses dir and files from 'spec/file1_spec.rb, spec/file2_spec.rb'" do
261
+ parse_options("dir", "spec/file1_spec.rb", "spec/file2_spec.rb").should include(:files_or_directories_to_run => ["dir", "spec/file1_spec.rb", "spec/file2_spec.rb"])
262
+ end
263
+ end
264
+
265
+ describe "default_path" do
266
+ it "gets set before files_or_directories_to_run" do
267
+ config = double("config").as_null_object
268
+ config.should_receive(:default_path=).ordered
269
+ config.should_receive(:files_or_directories_to_run=).ordered
270
+ opts = config_options_object("--default_path", "foo")
271
+ opts.configure(config)
272
+ end
273
+ end
274
+
275
+ # TODO ensure all options are output
276
+ describe "#drb_argv" do
277
+ it "preserves extra arguments" do
278
+ File.stub(:exist?) { false }
279
+ config_options_object(*%w[ a --drb b --color c ]).drb_argv.should =~ %w[ --color a b c ]
280
+ end
281
+
282
+ it "includes --fail-fast" do
283
+ config_options_object(*%w[--fail-fast]).drb_argv.should include("--fail-fast")
284
+ end
285
+
286
+ it "includes --options" do
287
+ config_options_object(*%w[--options custom.opts]).drb_argv.should include("--options", "custom.opts")
288
+ end
289
+
290
+ context "with --example" do
291
+ it "includes --example" do
292
+ config_options_object(*%w[--example foo]).drb_argv.should include("--example", "foo")
293
+ end
294
+
295
+ it "unescapes characters which were escaped upon storing --example originally" do
296
+ config_options_object("--example", "foo\\ bar").drb_argv.should include("--example", "foo bar")
297
+ end
298
+ end
299
+
300
+ context "with tags" do
301
+ it "includes the inclusion tags" do
302
+ coo = config_options_object("--tag", "tag")
303
+ coo.drb_argv.should eq(["--tag", "tag"])
304
+ end
305
+
306
+ it "leaves inclusion tags intact" do
307
+ coo = config_options_object("--tag", "tag")
308
+ coo.drb_argv
309
+ coo.options[:filter].should eq( {:tag=>true} )
310
+ end
311
+
312
+ it "includes the exclusion tags" do
313
+ coo = config_options_object("--tag", "~tag")
314
+ coo.drb_argv.should eq(["--tag", "~tag"])
315
+ end
316
+
317
+ it "leaves exclusion tags intact" do
318
+ coo = config_options_object("--tag", "~tag")
319
+ coo.drb_argv
320
+ coo.options[:exclusion_filter].should eq( {:tag=>true} )
321
+ end
322
+ end
323
+
324
+ context "with formatters" do
325
+ it "includes the formatters" do
326
+ coo = config_options_object("--format", "d")
327
+ coo.drb_argv.should eq(["--format", "d"])
328
+ end
329
+
330
+ it "leaves formatters intact" do
331
+ coo = config_options_object("--format", "d")
332
+ coo.drb_argv
333
+ coo.options[:formatters].should eq([["d"]])
334
+ end
335
+
336
+ it "leaves output intact" do
337
+ coo = config_options_object("--format", "p", "--out", "foo.txt", "--format", "d")
338
+ coo.drb_argv
339
+ coo.options[:formatters].should eq([["p","foo.txt"],["d"]])
340
+ end
341
+ end
342
+
343
+ context "--drb specified in ARGV" do
344
+ it "renders all the original arguments except --drb" do
345
+ config_options_object(*%w[ --drb --color --format s --example pattern --line_number 1 --profile --backtrace -I path/a -I path/b --require path/c --require path/d]).
346
+ drb_argv.should eq(%w[ --color --profile --backtrace --example pattern --line_number 1 --format s -I path/a -I path/b --require path/c --require path/d])
347
+ end
348
+ end
349
+
350
+ context "--drb specified in the options file" do
351
+ it "renders all the original arguments except --drb" do
352
+ File.stub(:exist?) { true }
353
+ IO.stub(:read) { "--drb --color" }
354
+ config_options_object(*%w[ --tty --format s --example pattern --line_number 1 --profile --backtrace ]).
355
+ drb_argv.should eq(%w[ --color --profile --backtrace --tty --example pattern --line_number 1 --format s])
356
+ end
357
+ end
358
+
359
+ context "--drb specified in ARGV and the options file" do
360
+ it "renders all the original arguments except --drb" do
361
+ File.stub(:exist?) { true }
362
+ IO.stub(:read) { "--drb --color" }
363
+ config_options_object(*%w[ --drb --format s --example pattern --line_number 1 --profile --backtrace]).
364
+ drb_argv.should eq(%w[ --color --profile --backtrace --example pattern --line_number 1 --format s])
365
+ end
366
+ end
367
+
368
+ context "--drb specified in ARGV and in as ARGV-specified --options file" do
369
+ it "renders all the original arguments except --drb and --options" do
370
+ File.stub(:exist?) { true }
371
+ IO.stub(:read) { "--drb --color" }
372
+ config_options_object(*%w[ --drb --format s --example pattern --line_number 1 --profile --backtrace]).
373
+ drb_argv.should eq(%w[ --color --profile --backtrace --example pattern --line_number 1 --format s ])
374
+ end
375
+ end
376
+ end
377
+
378
+ describe "sources: ~/.rspec, ./.rspec, custom, CLI, and SPEC_OPTS" do
379
+ let(:local_options_file) { File.join(Dir.tmpdir, ".rspec-local") }
380
+ let(:global_options_file) { File.join(Dir.tmpdir, ".rspec-global") }
381
+ let(:custom_options_file) { File.join(Dir.tmpdir, "custom.options") }
382
+
383
+ before do
384
+ @orig_spec_opts = ENV["SPEC_OPTS"]
385
+ RSpec::Core::ConfigurationOptions::send :public, :global_options_file
386
+ RSpec::Core::ConfigurationOptions::send :public, :local_options_file
387
+ RSpec::Core::ConfigurationOptions::any_instance.stub(:global_options_file) { global_options_file }
388
+ RSpec::Core::ConfigurationOptions::any_instance.stub(:local_options_file) { local_options_file }
389
+ end
390
+
391
+ after do
392
+ ENV["SPEC_OPTS"] = @orig_spec_opts
393
+ RSpec::Core::ConfigurationOptions::send :private, :global_options_file
394
+ RSpec::Core::ConfigurationOptions::send :private, :local_options_file
395
+ end
396
+
397
+ def write_options(scope, options)
398
+ File.open(send("#{scope}_options_file"), 'w') { |f| f.write(options) }
399
+ end
400
+
401
+ it "merges global, local, SPEC_OPTS, and CLI" do
402
+ write_options(:global, "--color")
403
+ write_options(:local, "--line 37")
404
+ ENV["SPEC_OPTS"] = "--debug"
405
+ options = parse_options("--drb")
406
+ options[:color_enabled].should be_true
407
+ options[:line_numbers].should eq(["37"])
408
+ options[:debug].should be_true
409
+ options[:drb].should be_true
410
+ end
411
+
412
+ it "prefers SPEC_OPTS over CLI" do
413
+ ENV["SPEC_OPTS"] = "--format spec_opts"
414
+ parse_options("--format", "cli")[:formatters].should eq([['spec_opts']])
415
+ end
416
+
417
+ it "prefers CLI over file options" do
418
+ write_options(:local, "--format local")
419
+ write_options(:global, "--format global")
420
+ parse_options("--format", "cli")[:formatters].should eq([['cli']])
421
+ end
422
+
423
+ it "prefers local file options over global" do
424
+ write_options(:local, "--format local")
425
+ write_options(:global, "--format global")
426
+ parse_options[:formatters].should eq([['local']])
427
+ end
428
+
429
+ context "with custom options file" do
430
+ it "ignores local and global options files" do
431
+ write_options(:local, "--color")
432
+ write_options(:global, "--color")
433
+ parse_options("-O", custom_options_file)[:color_enabled].should be_false
434
+ end
435
+ end
436
+ end
437
+ end
@@ -0,0 +1,920 @@
1
+ require 'spec_helper'
2
+ require 'tmpdir'
3
+
4
+ module RSpec::Core
5
+
6
+ describe Configuration do
7
+
8
+ let(:config) { Configuration.new }
9
+
10
+ describe "#load_spec_files" do
11
+
12
+ it "loads files using load" do
13
+ config.files_to_run = ["foo.bar", "blah_spec.rb"]
14
+ config.should_receive(:load).twice
15
+ config.load_spec_files
16
+ end
17
+
18
+ context "with rspec-1 loaded" do
19
+ before do
20
+ Object.const_set(:Spec, Module.new)
21
+ ::Spec::const_set(:VERSION, Module.new)
22
+ ::Spec::VERSION::const_set(:MAJOR, 1)
23
+ end
24
+ after { Object.__send__(:remove_const, :Spec) }
25
+ it "raises with a helpful message" do
26
+ expect {
27
+ config.load_spec_files
28
+ }.to raise_error(/rspec-1 has been loaded/)
29
+ end
30
+ end
31
+ end
32
+
33
+ describe "#treat_symbols_as_metadata_keys_with_true_values?" do
34
+ it 'defaults to false' do
35
+ config.treat_symbols_as_metadata_keys_with_true_values?.should be_false
36
+ end
37
+
38
+ it 'can be set to true' do
39
+ config.treat_symbols_as_metadata_keys_with_true_values = true
40
+ config.treat_symbols_as_metadata_keys_with_true_values?.should be_true
41
+ end
42
+ end
43
+
44
+ describe "#mock_framework" do
45
+ it "defaults to :rspec" do
46
+ config.should_receive(:require).with('rspec/core/mocking/with_rspec')
47
+ config.mock_framework
48
+ end
49
+ end
50
+
51
+ describe "#mock_framework=" do
52
+ [:rspec, :mocha, :rr, :flexmock].each do |framework|
53
+ context "with #{framework}" do
54
+ it "requires the adapter for #{framework.inspect}" do
55
+ config.should_receive(:require).with("rspec/core/mocking/with_#{framework}")
56
+ config.mock_framework = framework
57
+ end
58
+ end
59
+ end
60
+
61
+ context "with a module" do
62
+ it "sets the mock_framework_adapter to that module" do
63
+ config.stub(:require)
64
+ mod = Module.new
65
+ config.mock_framework = mod
66
+ config.mock_framework.should eq(mod)
67
+ end
68
+ end
69
+
70
+ it "uses the null adapter when set to any unknown key" do
71
+ config.should_receive(:require).with('rspec/core/mocking/with_absolutely_nothing')
72
+ config.mock_framework = :crazy_new_mocking_framework_ive_not_yet_heard_of
73
+ end
74
+
75
+ context 'when there are already some example groups defined' do
76
+ before(:each) do
77
+ RSpec.world.stub(:example_groups).and_return([double.as_null_object])
78
+ end
79
+
80
+ it 'raises an error since this setting must be applied before any groups are defined' do
81
+ expect {
82
+ config.mock_framework = :rspec
83
+ }.to raise_error(/must be configured before any example groups are defined/)
84
+ end
85
+ end
86
+ end
87
+
88
+ describe "#mock_with" do
89
+ it "delegates to mock_framework=" do
90
+ config.should_receive(:mock_framework=).with(:rspec)
91
+ config.mock_with :rspec
92
+ end
93
+ end
94
+
95
+ describe "#expectation_framework" do
96
+ it "defaults to :rspec" do
97
+ config.should_receive(:require).with('rspec/core/expecting/with_rspec')
98
+ config.expectation_frameworks
99
+ end
100
+ end
101
+
102
+ describe "#expectation_framework=" do
103
+ it "delegates to expect_with=" do
104
+ config.should_receive(:expect_with).with([:rspec])
105
+ config.expectation_framework = :rspec
106
+ end
107
+ end
108
+
109
+ describe "#expect_with" do
110
+ [:rspec, :stdlib].each do |framework|
111
+ context "with #{framework}" do
112
+ it "requires the adapter for #{framework.inspect}" do
113
+ config.should_receive(:require).with("rspec/core/expecting/with_#{framework}")
114
+ config.expect_with framework
115
+ end
116
+ end
117
+ end
118
+
119
+ it "raises ArgumentError if framework is not supported" do
120
+ expect do
121
+ config.expect_with :not_supported
122
+ end.to raise_error(ArgumentError)
123
+ end
124
+
125
+ context 'when there are already some example groups defined' do
126
+ before(:each) do
127
+ RSpec.world.stub(:example_groups).and_return([double.as_null_object])
128
+ end
129
+
130
+ it 'raises an error since this setting must be applied before any groups are defined' do
131
+ expect {
132
+ config.expect_with :rspec
133
+ }.to raise_error(/must be configured before any example groups are defined/)
134
+ end
135
+ end
136
+ end
137
+
138
+ describe "#expecting_with_rspec?" do
139
+ before(:each) do
140
+ # prevent minitest assertions from being required and included,
141
+ # as that causes problems in some of our specs.
142
+ config.stub(:require)
143
+ end
144
+
145
+ it "returns false by default" do
146
+ config.should_not be_expecting_with_rspec
147
+ end
148
+
149
+ it "returns true when `expect_with :rspec` has been configured" do
150
+ config.expect_with :rspec
151
+ config.should be_expecting_with_rspec
152
+ end
153
+
154
+ it "returns true when `expect_with :rspec, :stdlib` has been configured" do
155
+ config.expect_with :rspec, :stdlib
156
+ config.should be_expecting_with_rspec
157
+ end
158
+
159
+ it "returns true when `expect_with :stdlib, :rspec` has been configured" do
160
+ config.expect_with :stdlib, :rspec
161
+ config.should be_expecting_with_rspec
162
+ end
163
+
164
+ it "returns false when `expect_with :stdlib` has been configured" do
165
+ config.expect_with :stdlib
166
+ config.should_not be_expecting_with_rspec
167
+ end
168
+ end
169
+
170
+ describe "#files_to_run" do
171
+ it "loads files not following pattern if named explicitly" do
172
+ config.files_or_directories_to_run = "spec/rspec/core/resources/a_bar.rb"
173
+ config.files_to_run.should eq([ "spec/rspec/core/resources/a_bar.rb"])
174
+ end
175
+
176
+ it "prevents repitition of dir when start of the pattern" do
177
+ config.pattern = "spec/**/a_spec.rb"
178
+ config.files_or_directories_to_run = "spec"
179
+ config.files_to_run.should eq(["spec/rspec/core/resources/a_spec.rb"])
180
+ end
181
+
182
+ it "does not prevent repitition of dir when later of the pattern" do
183
+ config.pattern = "rspec/**/a_spec.rb"
184
+ config.files_or_directories_to_run = "spec"
185
+ config.files_to_run.should eq(["spec/rspec/core/resources/a_spec.rb"])
186
+ end
187
+
188
+ context "with default pattern" do
189
+ it "loads files named _spec.rb" do
190
+ dir = "spec/rspec/core/resources"
191
+ config.files_or_directories_to_run = "spec/rspec/core/resources"
192
+ config.files_to_run.should eq([ "spec/rspec/core/resources/a_spec.rb"])
193
+ end
194
+
195
+ it "loads files in Windows" do
196
+ file = "C:\\path\\to\\project\\spec\\sub\\foo_spec.rb"
197
+ config.files_or_directories_to_run = file
198
+ config.files_to_run.should eq([file])
199
+ end
200
+ end
201
+
202
+ context "with default default_path" do
203
+ it "loads files in the default path when run by rspec" do
204
+ config.stub(:command) { 'rspec' }
205
+ config.files_or_directories_to_run = []
206
+ config.files_to_run.should_not be_empty
207
+ end
208
+
209
+ it "does not load files in the default path when run by ruby" do
210
+ config.stub(:command) { 'ruby' }
211
+ config.files_or_directories_to_run = []
212
+ config.files_to_run.should be_empty
213
+ end
214
+ end
215
+ end
216
+
217
+ %w[pattern= filename_pattern=].each do |setter|
218
+ describe "##{setter}" do
219
+ context "with single pattern" do
220
+ before { config.send(setter, "**/*_foo.rb") }
221
+ it "loads files following pattern" do
222
+ file = File.expand_path(File.dirname(__FILE__) + "/resources/a_foo.rb")
223
+ config.files_or_directories_to_run = file
224
+ config.files_to_run.should include(file)
225
+ end
226
+
227
+ it "loads files in directories following pattern" do
228
+ dir = File.expand_path(File.dirname(__FILE__) + "/resources")
229
+ config.files_or_directories_to_run = dir
230
+ config.files_to_run.should include("#{dir}/a_foo.rb")
231
+ end
232
+
233
+ it "does not load files in directories not following pattern" do
234
+ dir = File.expand_path(File.dirname(__FILE__) + "/resources")
235
+ config.files_or_directories_to_run = dir
236
+ config.files_to_run.should_not include("#{dir}/a_bar.rb")
237
+ end
238
+ end
239
+
240
+ context "with multiple patterns" do
241
+ it "supports comma separated values" do
242
+ config.send(setter, "**/*_foo.rb,**/*_bar.rb")
243
+ dir = File.expand_path(File.dirname(__FILE__) + "/resources")
244
+ config.files_or_directories_to_run = dir
245
+ config.files_to_run.should include("#{dir}/a_foo.rb")
246
+ config.files_to_run.should include("#{dir}/a_bar.rb")
247
+ end
248
+
249
+ it "supports comma separated values with spaces" do
250
+ config.send(setter, "**/*_foo.rb, **/*_bar.rb")
251
+ dir = File.expand_path(File.dirname(__FILE__) + "/resources")
252
+ config.files_or_directories_to_run = dir
253
+ config.files_to_run.should include("#{dir}/a_foo.rb")
254
+ config.files_to_run.should include("#{dir}/a_bar.rb")
255
+ end
256
+ end
257
+ end
258
+ end
259
+
260
+ describe "path with line number" do
261
+ it "assigns the line number as a location filter" do
262
+ config.files_or_directories_to_run = "path/to/a_spec.rb:37"
263
+ config.filter.should eq({:locations => {File.expand_path("path/to/a_spec.rb") => [37]}})
264
+ end
265
+ end
266
+
267
+ context "with full_description" do
268
+ it "overrides :focused" do
269
+ config.filter_run :focused => true
270
+ config.full_description = "foo"
271
+ config.filter.should_not have_key(:focused)
272
+ end
273
+ end
274
+
275
+ context "with line number" do
276
+
277
+ it "assigns the file and line number as a location filter" do
278
+ config.files_or_directories_to_run = "path/to/a_spec.rb:37"
279
+ config.filter.should eq({:locations => {File.expand_path("path/to/a_spec.rb") => [37]}})
280
+ end
281
+
282
+ it "assigns multiple files with line numbers as location filters" do
283
+ config.files_or_directories_to_run = "path/to/a_spec.rb:37", "other_spec.rb:44"
284
+ config.filter.should eq({:locations => {File.expand_path("path/to/a_spec.rb") => [37],
285
+ File.expand_path("other_spec.rb") => [44]}})
286
+ end
287
+
288
+ it "assigns files with multiple line numbers as location filters" do
289
+ config.files_or_directories_to_run = "path/to/a_spec.rb:37", "path/to/a_spec.rb:44"
290
+ config.filter.should eq({:locations => {File.expand_path("path/to/a_spec.rb") => [37, 44]}})
291
+ end
292
+ end
293
+
294
+ context "with multiple line numbers" do
295
+ it "assigns the file and line numbers as a location filter" do
296
+ config.files_or_directories_to_run = "path/to/a_spec.rb:1:3:5:7"
297
+ config.filter.should eq({:locations => {File.expand_path("path/to/a_spec.rb") => [1,3,5,7]}})
298
+ end
299
+ end
300
+
301
+ it "assigns the example name as the filter on description" do
302
+ config.full_description = "foo"
303
+ config.filter.should eq({:full_description => /foo/})
304
+ end
305
+
306
+ describe "#default_path" do
307
+ it 'defaults to "spec"' do
308
+ config.default_path.should eq('spec')
309
+ end
310
+ end
311
+
312
+ describe "#include" do
313
+
314
+ module InstanceLevelMethods
315
+ def you_call_this_a_blt?
316
+ "egad man, where's the mayo?!?!?"
317
+ end
318
+ end
319
+
320
+ it_behaves_like "metadata hash builder" do
321
+ def metadata_hash(*args)
322
+ config.include(InstanceLevelMethods, *args)
323
+ config.include_or_extend_modules.last.last
324
+ end
325
+ end
326
+
327
+ context "with no filter" do
328
+ it "includes the given module into each example group" do
329
+ RSpec.configure do |c|
330
+ c.include(InstanceLevelMethods)
331
+ end
332
+
333
+ group = ExampleGroup.describe('does like, stuff and junk', :magic_key => :include) { }
334
+ group.should_not respond_to(:you_call_this_a_blt?)
335
+ group.new.you_call_this_a_blt?.should eq("egad man, where's the mayo?!?!?")
336
+ end
337
+ end
338
+
339
+ context "with a filter" do
340
+ it "includes the given module into each matching example group" do
341
+ RSpec.configure do |c|
342
+ c.include(InstanceLevelMethods, :magic_key => :include)
343
+ end
344
+
345
+ group = ExampleGroup.describe('does like, stuff and junk', :magic_key => :include) { }
346
+ group.should_not respond_to(:you_call_this_a_blt?)
347
+ group.new.you_call_this_a_blt?.should eq("egad man, where's the mayo?!?!?")
348
+ end
349
+ end
350
+
351
+ end
352
+
353
+ describe "#extend" do
354
+
355
+ module ThatThingISentYou
356
+ def that_thing
357
+ end
358
+ end
359
+
360
+ it_behaves_like "metadata hash builder" do
361
+ def metadata_hash(*args)
362
+ config.extend(ThatThingISentYou, *args)
363
+ config.include_or_extend_modules.last.last
364
+ end
365
+ end
366
+
367
+ it "extends the given module into each matching example group" do
368
+ RSpec.configure do |c|
369
+ c.extend(ThatThingISentYou, :magic_key => :extend)
370
+ end
371
+
372
+ group = ExampleGroup.describe(ThatThingISentYou, :magic_key => :extend) { }
373
+ group.should respond_to(:that_thing)
374
+ end
375
+
376
+ end
377
+
378
+ describe "#run_all_when_everything_filtered?" do
379
+
380
+ it "defaults to false" do
381
+ config.run_all_when_everything_filtered?.should be_false
382
+ end
383
+
384
+ it "can be queried with question method" do
385
+ config.run_all_when_everything_filtered = true
386
+ config.run_all_when_everything_filtered?.should be_true
387
+ end
388
+ end
389
+
390
+ describe "#color_enabled=" do
391
+ context "given true" do
392
+ context "with non-tty output and no autotest" do
393
+ it "does not set color_enabled" do
394
+ config.output_stream = StringIO.new
395
+ config.output_stream.stub(:tty?) { false }
396
+ config.tty = false
397
+ config.color_enabled = true
398
+ config.color_enabled.should be_false
399
+ end
400
+ end
401
+
402
+ context "with tty output" do
403
+ it "does not set color_enabled" do
404
+ config.output_stream = StringIO.new
405
+ config.output_stream.stub(:tty?) { true }
406
+ config.tty = false
407
+ config.color_enabled = true
408
+ config.color_enabled.should be_true
409
+ end
410
+ end
411
+
412
+ context "with tty set" do
413
+ it "does not set color_enabled" do
414
+ config.output_stream = StringIO.new
415
+ config.output_stream.stub(:tty?) { false }
416
+ config.tty = true
417
+ config.color_enabled = true
418
+ config.color_enabled.should be_true
419
+ end
420
+ end
421
+
422
+ context "on windows" do
423
+ before do
424
+ @original_host = RbConfig::CONFIG['host_os']
425
+ RbConfig::CONFIG['host_os'] = 'mingw'
426
+ config.stub(:require)
427
+ config.stub(:warn)
428
+ end
429
+
430
+ after do
431
+ RbConfig::CONFIG['host_os'] = @original_host
432
+ end
433
+
434
+ context "with ANSICON available" do
435
+ before(:all) do
436
+ @original_ansicon = ENV['ANSICON']
437
+ ENV['ANSICON'] = 'ANSICON'
438
+ end
439
+
440
+ after(:all) do
441
+ ENV['ANSICON'] = @original_ansicon
442
+ end
443
+
444
+ it "enables colors" do
445
+ config.output_stream = StringIO.new
446
+ config.output_stream.stub(:tty?) { true }
447
+ config.color_enabled = true
448
+ config.color_enabled.should be_true
449
+ end
450
+
451
+ it "leaves output stream intact" do
452
+ config.output_stream = $stdout
453
+ config.stub(:require) do |what|
454
+ config.output_stream = 'foo' if what =~ /Win32/
455
+ end
456
+ config.color_enabled = true
457
+ config.output_stream.should eq($stdout)
458
+ end
459
+ end
460
+
461
+ context "with ANSICON NOT available" do
462
+ it "warns to install ANSICON" do
463
+ config.stub(:require) { raise LoadError }
464
+ config.should_receive(:warn).
465
+ with(/You must use ANSICON/)
466
+ config.color_enabled = true
467
+ end
468
+
469
+ it "sets color_enabled to false" do
470
+ config.stub(:require) { raise LoadError }
471
+ config.color_enabled = true
472
+ config.color_enabled.should be_false
473
+ end
474
+ end
475
+ end
476
+ end
477
+ end
478
+
479
+ describe '#formatter=' do
480
+ it "delegates to add_formatter (better API for user-facing configuration)" do
481
+ config.should_receive(:add_formatter).with('these','options')
482
+ config.add_formatter('these','options')
483
+ end
484
+ end
485
+
486
+ describe "#add_formatter" do
487
+
488
+ it "adds to the list of formatters" do
489
+ config.add_formatter :documentation
490
+ config.formatters.first.should be_an_instance_of(Formatters::DocumentationFormatter)
491
+ end
492
+
493
+ it "finds a formatter by name (w/ Symbol)" do
494
+ config.add_formatter :documentation
495
+ config.formatters.first.should be_an_instance_of(Formatters::DocumentationFormatter)
496
+ end
497
+
498
+ it "finds a formatter by name (w/ String)" do
499
+ config.add_formatter 'documentation'
500
+ config.formatters.first.should be_an_instance_of(Formatters::DocumentationFormatter)
501
+ end
502
+
503
+ it "finds a formatter by class" do
504
+ formatter_class = Class.new(Formatters::BaseTextFormatter)
505
+ config.add_formatter formatter_class
506
+ config.formatters.first.should be_an_instance_of(formatter_class)
507
+ end
508
+
509
+ it "finds a formatter by class name" do
510
+ Object.const_set("CustomFormatter", Class.new(Formatters::BaseFormatter))
511
+ config.add_formatter "CustomFormatter"
512
+ config.formatters.first.should be_an_instance_of(CustomFormatter)
513
+ end
514
+
515
+ it "finds a formatter by class fully qualified name" do
516
+ RSpec.const_set("CustomFormatter", Class.new(Formatters::BaseFormatter))
517
+ config.add_formatter "RSpec::CustomFormatter"
518
+ config.formatters.first.should be_an_instance_of(RSpec::CustomFormatter)
519
+ end
520
+
521
+ it "requires a formatter file based on its fully qualified name" do
522
+ config.should_receive(:require).with('rspec/custom_formatter2') do
523
+ RSpec.const_set("CustomFormatter2", Class.new(Formatters::BaseFormatter))
524
+ end
525
+ config.add_formatter "RSpec::CustomFormatter2"
526
+ config.formatters.first.should be_an_instance_of(RSpec::CustomFormatter2)
527
+ end
528
+
529
+ it "raises NameError if class is unresolvable" do
530
+ config.should_receive(:require).with('rspec/custom_formatter3')
531
+ lambda { config.add_formatter "RSpec::CustomFormatter3" }.should raise_error(NameError)
532
+ end
533
+
534
+ it "raises ArgumentError if formatter is unknown" do
535
+ lambda { config.add_formatter :progresss }.should raise_error(ArgumentError)
536
+ end
537
+
538
+ context "with a 2nd arg defining the output" do
539
+ it "creates a file at that path and sets it as the output" do
540
+ path = File.join(Dir.tmpdir, 'output.txt')
541
+ config.add_formatter('doc', path)
542
+ config.formatters.first.output.should be_a(File)
543
+ config.formatters.first.output.path.should eq(path)
544
+ end
545
+ end
546
+
547
+ end
548
+
549
+ describe "#filter_run" do
550
+ it_behaves_like "metadata hash builder" do
551
+ def metadata_hash(*args)
552
+ config.filter_run(*args)
553
+ config.filter
554
+ end
555
+ end
556
+
557
+ it "sets the filter" do
558
+ config.filter_run :focus => true
559
+ config.filter[:focus].should be(true)
560
+ end
561
+
562
+ it "merges with existing filters" do
563
+ config.filter_run :filter1 => true
564
+ config.filter_run :filter2 => false
565
+
566
+ config.filter[:filter1].should be(true)
567
+ config.filter[:filter2].should be(false)
568
+ end
569
+
570
+ it "warns if :line_numbers is already a filter" do
571
+ config.filter_run :line_numbers => [100]
572
+ config.should_receive(:warn).with(
573
+ "Filtering by {:focus=>true} is not possible since you " \
574
+ "are already filtering by {:line_numbers=>[100]}"
575
+ )
576
+ config.filter_run :focus => true
577
+ end
578
+
579
+ it "warns if :full_description is already a filter" do
580
+ config.filter_run :full_description => 'foo'
581
+ config.should_receive(:warn).with(
582
+ "Filtering by {:focus=>true} is not possible since you " \
583
+ "are already filtering by {:full_description=>\"foo\"}"
584
+ )
585
+ config.filter_run :focus => true
586
+ end
587
+ end
588
+
589
+ describe "#filter_run_excluding" do
590
+ it_behaves_like "metadata hash builder" do
591
+ def metadata_hash(*args)
592
+ config.filter_run_excluding(*args)
593
+ config.exclusion_filter
594
+ end
595
+ end
596
+
597
+ it "sets the filter" do
598
+ config.filter_run_excluding :slow => true
599
+ config.exclusion_filter[:slow].should be(true)
600
+ end
601
+
602
+ it "merges with existing filters" do
603
+ config.filter_run_excluding :filter1 => true
604
+ config.filter_run_excluding :filter2 => false
605
+
606
+ config.exclusion_filter[:filter1].should be(true)
607
+ config.exclusion_filter[:filter2].should be(false)
608
+ end
609
+ end
610
+
611
+ describe "#inclusion_filter" do
612
+ it "returns {} even if set to nil" do
613
+ config.inclusion_filter = nil
614
+ config.inclusion_filter.should eq({})
615
+ end
616
+ end
617
+
618
+
619
+ describe "#exclusion_filter" do
620
+ it "returns {} even if set to nil" do
621
+ config.exclusion_filter = nil
622
+ config.exclusion_filter.should eq({})
623
+ end
624
+
625
+ describe "the default :if filter" do
626
+ it "does not exclude a spec with no :if metadata" do
627
+ config.exclusion_filter[:if].call(nil, {}).should be_false
628
+ end
629
+
630
+ it "does not exclude a spec with { :if => true } metadata" do
631
+ config.exclusion_filter[:if].call(true, {:if => true}).should be_false
632
+ end
633
+
634
+ it "excludes a spec with { :if => false } metadata" do
635
+ config.exclusion_filter[:if].call(false, {:if => false}).should be_true
636
+ end
637
+
638
+ it "excludes a spec with { :if => nil } metadata" do
639
+ config.exclusion_filter[:if].call(false, {:if => nil}).should be_true
640
+ end
641
+ end
642
+
643
+ describe "the default :unless filter" do
644
+ it "excludes a spec with { :unless => true } metadata" do
645
+ config.exclusion_filter[:unless].call(true).should be_true
646
+ end
647
+
648
+ it "does not exclude a spec with { :unless => false } metadata" do
649
+ config.exclusion_filter[:unless].call(false).should be_false
650
+ end
651
+
652
+ it "does not exclude a spec with { :unless => nil } metadata" do
653
+ config.exclusion_filter[:unless].call(nil).should be_false
654
+ end
655
+ end
656
+ end
657
+
658
+ describe "line_numbers=" do
659
+ before { config.stub(:warn) }
660
+
661
+ it "sets the line numbers" do
662
+ config.line_numbers = ['37']
663
+ config.filter.should eq({:line_numbers => [37]})
664
+ end
665
+
666
+ it "overrides :focused" do
667
+ config.filter_run :focused => true
668
+ config.line_numbers = ['37']
669
+ config.filter.should eq({:line_numbers => [37]})
670
+ end
671
+
672
+ it "prevents :focused" do
673
+ config.line_numbers = ['37']
674
+ config.filter_run :focused => true
675
+ config.filter.should eq({:line_numbers => [37]})
676
+ end
677
+ end
678
+
679
+ describe "#full_backtrace=" do
680
+ context "given true" do
681
+ it "clears the backtrace clean patterns" do
682
+ config.full_backtrace = true
683
+ config.backtrace_clean_patterns.should eq([])
684
+ end
685
+ end
686
+
687
+ context "given false" do
688
+ it "restores backtrace clean patterns" do
689
+ config.full_backtrace = false
690
+ config.backtrace_clean_patterns.should eq(RSpec::Core::Configuration::DEFAULT_BACKTRACE_PATTERNS)
691
+ end
692
+ end
693
+
694
+ it "doesn't impact other instances of config" do
695
+ config_1 = Configuration.new
696
+ config_2 = Configuration.new
697
+
698
+ config_1.full_backtrace = true
699
+ config_2.backtrace_clean_patterns.should_not be_empty
700
+ end
701
+ end
702
+
703
+ describe "#cleaned_from_backtrace? defaults" do
704
+ it "returns true for rspec files" do
705
+ config.cleaned_from_backtrace?("lib/rspec/core.rb").
706
+ should be_true
707
+ end
708
+
709
+ it "returns true for spec_helper" do
710
+ config.cleaned_from_backtrace?("spec/spec_helper.rb").
711
+ should be_true
712
+ end
713
+
714
+ it "returns true for java files (for JRuby)" do
715
+ config.cleaned_from_backtrace?("org/jruby/RubyArray.java:2336").
716
+ should be_true
717
+ end
718
+ end
719
+
720
+ describe "#debug=true" do
721
+ before do
722
+ if defined?(Debugger)
723
+ @orig_debugger = Debugger
724
+ Object.send(:remove_const, :Debugger)
725
+ else
726
+ @orig_debugger = nil
727
+ end
728
+ Object.const_set("Debugger", debugger)
729
+ end
730
+
731
+ after do
732
+ Object.send(:remove_const, :Debugger)
733
+ Object.const_set("Debugger", @orig_debugger) if @orig_debugger
734
+ end
735
+
736
+ let(:debugger) { double('Debugger').as_null_object }
737
+
738
+ it "requires 'ruby-debug'" do
739
+ config.should_receive(:require).with('ruby-debug')
740
+ config.debug = true
741
+ end
742
+
743
+ it "starts the debugger" do
744
+ config.stub(:require)
745
+ debugger.should_receive(:start)
746
+ config.debug = true
747
+ end
748
+ end
749
+
750
+ describe "#debug=false" do
751
+ it "does not require 'ruby-debug'" do
752
+ config.should_not_receive(:require).with('ruby-debug')
753
+ config.debug = false
754
+ end
755
+ end
756
+
757
+ describe "#output=" do
758
+ it "sets the output" do
759
+ output = mock("output")
760
+ config.output = output
761
+ config.output.should equal(output)
762
+ end
763
+ end
764
+
765
+ describe "#libs=" do
766
+ it "adds directories to the LOAD_PATH" do
767
+ $LOAD_PATH.should_receive(:unshift).with("a/dir")
768
+ config.libs = ["a/dir"]
769
+ end
770
+ end
771
+
772
+ describe "#requires=" do
773
+ it "requires paths" do
774
+ config.should_receive(:require).with("a/path")
775
+ config.requires = ["a/path"]
776
+ end
777
+ end
778
+
779
+ describe "#add_setting" do
780
+ describe "with no modifiers" do
781
+ context "with no additional options" do
782
+ before { config.add_setting :custom_option }
783
+
784
+ it "defaults to nil" do
785
+ config.custom_option.should be_nil
786
+ end
787
+
788
+ it "adds a predicate" do
789
+ config.custom_option?.should be_false
790
+ end
791
+
792
+ it "can be overridden" do
793
+ config.custom_option = "a value"
794
+ config.custom_option.should eq("a value")
795
+ end
796
+ end
797
+
798
+ context "with :default => 'a value'" do
799
+ before { config.add_setting :custom_option, :default => 'a value' }
800
+
801
+ it "defaults to 'a value'" do
802
+ config.custom_option.should eq("a value")
803
+ end
804
+
805
+ it "returns true for the predicate" do
806
+ config.custom_option?.should be_true
807
+ end
808
+
809
+ it "can be overridden with a truthy value" do
810
+ config.custom_option = "a new value"
811
+ config.custom_option.should eq("a new value")
812
+ end
813
+
814
+ it "can be overridden with nil" do
815
+ config.custom_option = nil
816
+ config.custom_option.should eq(nil)
817
+ end
818
+
819
+ it "can be overridden with false" do
820
+ config.custom_option = false
821
+ config.custom_option.should eq(false)
822
+ end
823
+ end
824
+ end
825
+
826
+ context "with :alias => " do
827
+ before do
828
+ config.add_setting :custom_option
829
+ config.add_setting :another_custom_option, :alias => :custom_option
830
+ end
831
+
832
+ it "delegates the getter to the other option" do
833
+ config.another_custom_option = "this value"
834
+ config.custom_option.should eq("this value")
835
+ end
836
+
837
+ it "delegates the setter to the other option" do
838
+ config.custom_option = "this value"
839
+ config.another_custom_option.should eq("this value")
840
+ end
841
+
842
+ it "delegates the predicate to the other option" do
843
+ config.custom_option = true
844
+ config.another_custom_option?.should be_true
845
+ end
846
+ end
847
+ end
848
+
849
+ describe "#configure_group" do
850
+ it "extends with 'extend'" do
851
+ mod = Module.new
852
+ group = ExampleGroup.describe("group", :foo => :bar)
853
+
854
+ config.extend(mod, :foo => :bar)
855
+ config.configure_group(group)
856
+ group.should be_a(mod)
857
+ end
858
+
859
+ it "extends with 'module'" do
860
+ mod = Module.new
861
+ group = ExampleGroup.describe("group", :foo => :bar)
862
+
863
+ config.include(mod, :foo => :bar)
864
+ config.configure_group(group)
865
+ group.included_modules.should include(mod)
866
+ end
867
+
868
+ it "requires only one matching filter" do
869
+ mod = Module.new
870
+ group = ExampleGroup.describe("group", :foo => :bar)
871
+
872
+ config.include(mod, :foo => :bar, :baz => :bam)
873
+ config.configure_group(group)
874
+ group.included_modules.should include(mod)
875
+ end
876
+
877
+ it "includes each one before deciding whether to include the next" do
878
+ mod1 = Module.new do
879
+ def self.included(host)
880
+ host.metadata[:foo] = :bar
881
+ end
882
+ end
883
+ mod2 = Module.new
884
+
885
+ group = ExampleGroup.describe("group")
886
+
887
+ config.include(mod1)
888
+ config.include(mod2, :foo => :bar)
889
+ config.configure_group(group)
890
+ group.included_modules.should include(mod1)
891
+ group.included_modules.should include(mod2)
892
+ end
893
+ end
894
+
895
+ describe "#alias_example_to" do
896
+ it_behaves_like "metadata hash builder" do
897
+ def metadata_hash(*args)
898
+ config.alias_example_to :my_example, *args
899
+ group = ExampleGroup.describe("group")
900
+ example = group.my_example("description")
901
+ example.metadata
902
+ end
903
+ end
904
+ end
905
+
906
+ describe "#reset" do
907
+ it "clears the reporter" do
908
+ config.reporter.should_not be_nil
909
+ config.reset
910
+ config.instance_variable_get("@reporter").should be_nil
911
+ end
912
+
913
+ it "clears the formatters" do
914
+ config.add_formatter "doc"
915
+ config.reset
916
+ config.formatters.should be_empty
917
+ end
918
+ end
919
+ end
920
+ end