remq 0.0.1a → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +8 -0
- data/Readme.md +31 -17
- data/lib/remq/version.rb +1 -1
- data/lib/remq.rb +130 -28
- data/remq.gemspec +2 -4
- data/spec/remq_spec.rb +68 -42
- data/vendor/bundle/bin/autospec +23 -0
- data/vendor/bundle/bin/htmldiff +25 -0
- data/vendor/bundle/bin/ldiff +25 -0
- data/vendor/bundle/bin/rake +23 -0
- data/vendor/bundle/bin/rspec +23 -0
- data/vendor/bundle/cache/diff-lcs-1.1.3.gem +0 -0
- data/vendor/bundle/cache/hiredis-0.4.5.gem +0 -0
- data/vendor/bundle/cache/multi_json-1.6.1.gem +0 -0
- data/vendor/bundle/cache/rake-10.0.3.gem +0 -0
- data/vendor/bundle/cache/redis-3.0.2.gem +0 -0
- data/vendor/bundle/cache/rspec-2.12.0.gem +0 -0
- data/vendor/bundle/cache/rspec-core-2.12.2.gem +0 -0
- data/vendor/bundle/cache/rspec-expectations-2.12.1.gem +0 -0
- data/vendor/bundle/cache/rspec-mocks-2.12.2.gem +0 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/History.rdoc +54 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/License.rdoc +38 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/Manifest.txt +27 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/README.rdoc +72 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/Rakefile +26 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/bin/htmldiff +32 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/bin/ldiff +6 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/diff-lcs.gemspec +51 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/docs/COPYING.txt +340 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/docs/artistic.html +289 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/array.rb +21 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/block.rb +51 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/callbacks.rb +322 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/change.rb +169 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/htmldiff.rb +151 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/hunk.rb +242 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/ldiff.rb +210 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs/string.rb +19 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff/lcs.rb +1105 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/lib/diff-lcs.rb +5 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/spec/diff_spec.rb +35 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/spec/lcs_spec.rb +36 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/spec/patch_spec.rb +390 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/spec/sdiff_spec.rb +204 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/spec/spec_helper.rb +284 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/spec/traverse_balanced_spec.rb +286 -0
- data/vendor/bundle/gems/diff-lcs-1.1.3/spec/traverse_sequences_spec.rb +83 -0
- data/vendor/bundle/gems/hiredis-0.4.5/COPYING +28 -0
- data/vendor/bundle/gems/hiredis-0.4.5/Rakefile +45 -0
- data/vendor/bundle/gems/hiredis-0.4.5/ext/hiredis_ext/Makefile +213 -0
- data/vendor/bundle/gems/hiredis-0.4.5/ext/hiredis_ext/connection.c +472 -0
- data/vendor/bundle/gems/hiredis-0.4.5/ext/hiredis_ext/connection.o +0 -0
- data/vendor/bundle/gems/hiredis-0.4.5/ext/hiredis_ext/extconf.rb +17 -0
- data/vendor/bundle/gems/hiredis-0.4.5/ext/hiredis_ext/hiredis_ext.bundle +0 -0
- data/vendor/bundle/gems/hiredis-0.4.5/ext/hiredis_ext/hiredis_ext.c +13 -0
- data/vendor/bundle/gems/hiredis-0.4.5/ext/hiredis_ext/hiredis_ext.h +37 -0
- data/vendor/bundle/gems/hiredis-0.4.5/ext/hiredis_ext/hiredis_ext.o +0 -0
- data/vendor/bundle/gems/hiredis-0.4.5/ext/hiredis_ext/reader.c +114 -0
- data/vendor/bundle/gems/hiredis-0.4.5/ext/hiredis_ext/reader.o +0 -0
- data/vendor/bundle/gems/hiredis-0.4.5/lib/hiredis/connection.rb +10 -0
- data/vendor/bundle/gems/hiredis-0.4.5/lib/hiredis/errors.rb +5 -0
- data/vendor/bundle/gems/hiredis-0.4.5/lib/hiredis/ext/connection.rb +29 -0
- data/vendor/bundle/gems/hiredis-0.4.5/lib/hiredis/ext/hiredis_ext.bundle +0 -0
- data/vendor/bundle/gems/hiredis-0.4.5/lib/hiredis/ext/reader.rb +2 -0
- data/vendor/bundle/gems/hiredis-0.4.5/lib/hiredis/reader.rb +10 -0
- data/vendor/bundle/gems/hiredis-0.4.5/lib/hiredis/ruby/connection.rb +298 -0
- data/vendor/bundle/gems/hiredis-0.4.5/lib/hiredis/ruby/reader.rb +183 -0
- data/vendor/bundle/gems/hiredis-0.4.5/lib/hiredis/version.rb +3 -0
- data/vendor/bundle/gems/hiredis-0.4.5/lib/hiredis.rb +2 -0
- data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/COPYING +29 -0
- data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/Makefile +148 -0
- data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/async.c +604 -0
- data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/async.h +125 -0
- data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/async.o +0 -0
- data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/dict.c +338 -0
- data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/dict.h +126 -0
- data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/fmacros.h +16 -0
- data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/hiredis.c +1283 -0
- data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/hiredis.h +204 -0
- data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/hiredis.o +0 -0
- data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/libhiredis.a +0 -0
- data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/net.c +279 -0
- data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/net.h +47 -0
- data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/net.o +0 -0
- data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/sds.c +605 -0
- data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/sds.h +88 -0
- data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/sds.o +0 -0
- data/vendor/bundle/gems/hiredis-0.4.5/vendor/hiredis/test.c +653 -0
- data/vendor/bundle/gems/multi_json-1.6.1/CHANGELOG.md +121 -0
- data/vendor/bundle/gems/multi_json-1.6.1/CONTRIBUTING.md +46 -0
- data/vendor/bundle/gems/multi_json-1.6.1/Gemfile +31 -0
- data/vendor/bundle/gems/multi_json-1.6.1/LICENSE.md +20 -0
- data/vendor/bundle/gems/multi_json-1.6.1/README.md +105 -0
- data/vendor/bundle/gems/multi_json-1.6.1/Rakefile +12 -0
- data/vendor/bundle/gems/multi_json-1.6.1/lib/multi_json/adapters/gson.rb +20 -0
- data/vendor/bundle/gems/multi_json-1.6.1/lib/multi_json/adapters/json_common.rb +35 -0
- data/vendor/bundle/gems/multi_json-1.6.1/lib/multi_json/adapters/json_gem.rb +12 -0
- data/vendor/bundle/gems/multi_json-1.6.1/lib/multi_json/adapters/json_pure.rb +12 -0
- data/vendor/bundle/gems/multi_json-1.6.1/lib/multi_json/adapters/nsjsonserialization.rb +35 -0
- data/vendor/bundle/gems/multi_json-1.6.1/lib/multi_json/adapters/oj.rb +29 -0
- data/vendor/bundle/gems/multi_json-1.6.1/lib/multi_json/adapters/ok_json.rb +58 -0
- data/vendor/bundle/gems/multi_json-1.6.1/lib/multi_json/adapters/yajl.rb +20 -0
- data/vendor/bundle/gems/multi_json-1.6.1/lib/multi_json/vendor/okjson.rb +602 -0
- data/vendor/bundle/gems/multi_json-1.6.1/lib/multi_json/version.rb +3 -0
- data/vendor/bundle/gems/multi_json-1.6.1/lib/multi_json.rb +137 -0
- data/vendor/bundle/gems/multi_json-1.6.1/multi_json.gemspec +22 -0
- data/vendor/bundle/gems/multi_json-1.6.1/spec/adapter_shared_example.rb +162 -0
- data/vendor/bundle/gems/multi_json-1.6.1/spec/helper.rb +45 -0
- data/vendor/bundle/gems/multi_json-1.6.1/spec/json_common_shared_example.rb +36 -0
- data/vendor/bundle/gems/multi_json-1.6.1/spec/multi_json_spec.rb +151 -0
- data/vendor/bundle/gems/rake-10.0.3/CHANGES +526 -0
- data/vendor/bundle/gems/rake-10.0.3/MIT-LICENSE +21 -0
- data/vendor/bundle/gems/rake-10.0.3/README.rdoc +187 -0
- data/vendor/bundle/gems/rake-10.0.3/Rakefile +374 -0
- data/vendor/bundle/gems/rake-10.0.3/TODO +21 -0
- data/vendor/bundle/gems/rake-10.0.3/bin/rake +33 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/command_line_usage.rdoc +152 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/example/Rakefile1 +38 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/example/Rakefile2 +35 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/example/a.c +6 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/example/b.c +6 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/example/main.c +11 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/glossary.rdoc +51 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/jamis.rb +591 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/proto_rake.rdoc +127 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/rake.1.gz +0 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/rakefile.rdoc +557 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/rational.rdoc +151 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.4.14.rdoc +23 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.4.15.rdoc +35 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.5.0.rdoc +53 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.5.3.rdoc +78 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.5.4.rdoc +46 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.6.0.rdoc +141 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.7.0.rdoc +119 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.7.1.rdoc +59 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.7.2.rdoc +121 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.7.3.rdoc +47 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.8.0.rdoc +114 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.8.2.rdoc +165 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.8.3.rdoc +112 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.8.4.rdoc +147 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.8.5.rdoc +53 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.8.6.rdoc +55 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.8.7.rdoc +55 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.9.0.rdoc +112 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.9.1.rdoc +52 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.9.2.rdoc +49 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.9.3.rdoc +102 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.9.4.rdoc +110 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.9.5.rdoc +114 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-0.9.6.rdoc +127 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-10.0.0.rdoc +178 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-10.0.1.rdoc +187 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-10.0.2.rdoc +191 -0
- data/vendor/bundle/gems/rake-10.0.3/doc/release_notes/rake-10.0.3.rdoc +191 -0
- data/vendor/bundle/gems/rake-10.0.3/install.rb +90 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/alt_system.rb +109 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/application.rb +669 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/backtrace.rb +18 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/clean.rb +32 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/cloneable.rb +16 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/contrib/compositepublisher.rb +21 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/contrib/ftptools.rb +151 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/contrib/publisher.rb +73 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/contrib/rubyforgepublisher.rb +16 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/contrib/sshpublisher.rb +50 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/contrib/sys.rb +1 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/default_loader.rb +10 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/dsl_definition.rb +156 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/early_time.rb +18 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/ext/core.rb +27 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/ext/module.rb +0 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/ext/string.rb +168 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/ext/time.rb +15 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/file_creation_task.rb +24 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/file_list.rb +410 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/file_task.rb +47 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/file_utils.rb +114 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/file_utils_ext.rb +146 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/gempackagetask.rb +1 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/invocation_chain.rb +51 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/invocation_exception_mixin.rb +16 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/loaders/makefile.rb +40 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/multi_task.rb +13 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/name_space.rb +25 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/packagetask.rb +185 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/pathmap.rb +1 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/phony.rb +15 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/private_reader.rb +20 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/promise.rb +99 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/pseudo_status.rb +24 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/rake_module.rb +37 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/rake_test_loader.rb +22 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/rdoctask.rb +1 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/ruby182_test_unit_fix.rb +25 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/runtest.rb +22 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/task.rb +350 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/task_argument_error.rb +7 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/task_arguments.rb +78 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/task_manager.rb +296 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/tasklib.rb +22 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/testtask.rb +198 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/thread_history_display.rb +48 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/thread_pool.rb +155 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/trace_output.rb +19 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/version.rb +13 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake/win32.rb +55 -0
- data/vendor/bundle/gems/rake-10.0.3/lib/rake.rb +71 -0
- data/vendor/bundle/gems/rake-10.0.3/test/file_creation.rb +34 -0
- data/vendor/bundle/gems/rake-10.0.3/test/helper.rb +562 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_private_reader.rb +42 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake.rb +40 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_application.rb +515 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_application_options.rb +443 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_backtrace.rb +89 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_clean.rb +14 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_definitions.rb +80 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_directory_task.rb +57 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_dsl.rb +40 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_early_time.rb +31 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_extension.rb +59 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_file_creation_task.rb +56 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_file_list.rb +628 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_file_list_path_map.rb +8 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_file_task.rb +122 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_file_utils.rb +305 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_ftp_file.rb +59 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_functional.rb +496 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_invocation_chain.rb +52 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_makefile_loader.rb +44 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_multi_task.rb +59 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_name_space.rb +43 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_package_task.rb +79 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_path_map.rb +157 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_path_map_explode.rb +34 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_path_map_partial.rb +18 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_pseudo_status.rb +21 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_rake_test_loader.rb +21 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_reduce_compat.rb +30 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_require.rb +40 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_rules.rb +327 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_task.rb +316 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_task_argument_parsing.rb +103 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_task_arguments.rb +88 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_task_lib.rb +9 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_task_manager.rb +157 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_task_manager_argument_resolution.rb +19 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_task_with_arguments.rb +171 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_test_task.rb +120 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_thread_pool.rb +123 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_top_level_functions.rb +71 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_rake_win32.rb +72 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_thread_history_display.rb +91 -0
- data/vendor/bundle/gems/rake-10.0.3/test/test_trace_output.rb +43 -0
- data/vendor/bundle/gems/redis-3.0.2/CHANGELOG.md +238 -0
- data/vendor/bundle/gems/redis-3.0.2/LICENSE +20 -0
- data/vendor/bundle/gems/redis-3.0.2/README.md +232 -0
- data/vendor/bundle/gems/redis-3.0.2/Rakefile +392 -0
- data/vendor/bundle/gems/redis-3.0.2/benchmarking/logging.rb +62 -0
- data/vendor/bundle/gems/redis-3.0.2/benchmarking/pipeline.rb +51 -0
- data/vendor/bundle/gems/redis-3.0.2/benchmarking/speed.rb +21 -0
- data/vendor/bundle/gems/redis-3.0.2/benchmarking/suite.rb +24 -0
- data/vendor/bundle/gems/redis-3.0.2/benchmarking/worker.rb +71 -0
- data/vendor/bundle/gems/redis-3.0.2/examples/basic.rb +15 -0
- data/vendor/bundle/gems/redis-3.0.2/examples/dist_redis.rb +43 -0
- data/vendor/bundle/gems/redis-3.0.2/examples/incr-decr.rb +17 -0
- data/vendor/bundle/gems/redis-3.0.2/examples/list.rb +26 -0
- data/vendor/bundle/gems/redis-3.0.2/examples/pubsub.rb +37 -0
- data/vendor/bundle/gems/redis-3.0.2/examples/sets.rb +36 -0
- data/vendor/bundle/gems/redis-3.0.2/examples/unicorn/config.ru +3 -0
- data/vendor/bundle/gems/redis-3.0.2/examples/unicorn/unicorn.rb +20 -0
- data/vendor/bundle/gems/redis-3.0.2/lib/redis/client.rb +401 -0
- data/vendor/bundle/gems/redis-3.0.2/lib/redis/connection/command_helper.rb +44 -0
- data/vendor/bundle/gems/redis-3.0.2/lib/redis/connection/hiredis.rb +63 -0
- data/vendor/bundle/gems/redis-3.0.2/lib/redis/connection/registry.rb +12 -0
- data/vendor/bundle/gems/redis-3.0.2/lib/redis/connection/ruby.rb +285 -0
- data/vendor/bundle/gems/redis-3.0.2/lib/redis/connection/synchrony.rb +124 -0
- data/vendor/bundle/gems/redis-3.0.2/lib/redis/connection.rb +9 -0
- data/vendor/bundle/gems/redis-3.0.2/lib/redis/distributed.rb +816 -0
- data/vendor/bundle/gems/redis-3.0.2/lib/redis/errors.rb +40 -0
- data/vendor/bundle/gems/redis-3.0.2/lib/redis/hash_ring.rb +131 -0
- data/vendor/bundle/gems/redis-3.0.2/lib/redis/pipeline.rb +130 -0
- data/vendor/bundle/gems/redis-3.0.2/lib/redis/subscribe.rb +79 -0
- data/vendor/bundle/gems/redis-3.0.2/lib/redis/version.rb +3 -0
- data/vendor/bundle/gems/redis-3.0.2/lib/redis.rb +2233 -0
- data/vendor/bundle/gems/redis-3.0.2/redis.gemspec +41 -0
- data/vendor/bundle/gems/redis-3.0.2/test/blocking_commands_test.rb +42 -0
- data/vendor/bundle/gems/redis-3.0.2/test/command_map_test.rb +30 -0
- data/vendor/bundle/gems/redis-3.0.2/test/commands_on_hashes_test.rb +21 -0
- data/vendor/bundle/gems/redis-3.0.2/test/commands_on_lists_test.rb +20 -0
- data/vendor/bundle/gems/redis-3.0.2/test/commands_on_sets_test.rb +77 -0
- data/vendor/bundle/gems/redis-3.0.2/test/commands_on_sorted_sets_test.rb +109 -0
- data/vendor/bundle/gems/redis-3.0.2/test/commands_on_strings_test.rb +83 -0
- data/vendor/bundle/gems/redis-3.0.2/test/commands_on_value_types_test.rb +99 -0
- data/vendor/bundle/gems/redis-3.0.2/test/connection_handling_test.rb +189 -0
- data/vendor/bundle/gems/redis-3.0.2/test/distributed_blocking_commands_test.rb +46 -0
- data/vendor/bundle/gems/redis-3.0.2/test/distributed_commands_on_hashes_test.rb +10 -0
- data/vendor/bundle/gems/redis-3.0.2/test/distributed_commands_on_lists_test.rb +22 -0
- data/vendor/bundle/gems/redis-3.0.2/test/distributed_commands_on_sets_test.rb +83 -0
- data/vendor/bundle/gems/redis-3.0.2/test/distributed_commands_on_sorted_sets_test.rb +18 -0
- data/vendor/bundle/gems/redis-3.0.2/test/distributed_commands_on_strings_test.rb +48 -0
- data/vendor/bundle/gems/redis-3.0.2/test/distributed_commands_on_value_types_test.rb +87 -0
- data/vendor/bundle/gems/redis-3.0.2/test/distributed_commands_requiring_clustering_test.rb +148 -0
- data/vendor/bundle/gems/redis-3.0.2/test/distributed_connection_handling_test.rb +23 -0
- data/vendor/bundle/gems/redis-3.0.2/test/distributed_internals_test.rb +41 -0
- data/vendor/bundle/gems/redis-3.0.2/test/distributed_key_tags_test.rb +52 -0
- data/vendor/bundle/gems/redis-3.0.2/test/distributed_persistence_control_commands_test.rb +26 -0
- data/vendor/bundle/gems/redis-3.0.2/test/distributed_publish_subscribe_test.rb +92 -0
- data/vendor/bundle/gems/redis-3.0.2/test/distributed_remote_server_control_commands_test.rb +66 -0
- data/vendor/bundle/gems/redis-3.0.2/test/distributed_scripting_test.rb +102 -0
- data/vendor/bundle/gems/redis-3.0.2/test/distributed_sorting_test.rb +20 -0
- data/vendor/bundle/gems/redis-3.0.2/test/distributed_test.rb +58 -0
- data/vendor/bundle/gems/redis-3.0.2/test/distributed_transactions_test.rb +32 -0
- data/vendor/bundle/gems/redis-3.0.2/test/encoding_test.rb +18 -0
- data/vendor/bundle/gems/redis-3.0.2/test/error_replies_test.rb +59 -0
- data/vendor/bundle/gems/redis-3.0.2/test/helper.rb +194 -0
- data/vendor/bundle/gems/redis-3.0.2/test/helper_test.rb +22 -0
- data/vendor/bundle/gems/redis-3.0.2/test/internals_test.rb +301 -0
- data/vendor/bundle/gems/redis-3.0.2/test/lint/blocking_commands.rb +124 -0
- data/vendor/bundle/gems/redis-3.0.2/test/lint/hashes.rb +162 -0
- data/vendor/bundle/gems/redis-3.0.2/test/lint/lists.rb +143 -0
- data/vendor/bundle/gems/redis-3.0.2/test/lint/sets.rb +96 -0
- data/vendor/bundle/gems/redis-3.0.2/test/lint/sorted_sets.rb +238 -0
- data/vendor/bundle/gems/redis-3.0.2/test/lint/strings.rb +157 -0
- data/vendor/bundle/gems/redis-3.0.2/test/lint/value_types.rb +106 -0
- data/vendor/bundle/gems/redis-3.0.2/test/persistence_control_commands_test.rb +26 -0
- data/vendor/bundle/gems/redis-3.0.2/test/pipelining_commands_test.rb +195 -0
- data/vendor/bundle/gems/redis-3.0.2/test/publish_subscribe_test.rb +153 -0
- data/vendor/bundle/gems/redis-3.0.2/test/remote_server_control_commands_test.rb +117 -0
- data/vendor/bundle/gems/redis-3.0.2/test/scripting_test.rb +78 -0
- data/vendor/bundle/gems/redis-3.0.2/test/sorting_test.rb +45 -0
- data/vendor/bundle/gems/redis-3.0.2/test/support/connection/hiredis.rb +1 -0
- data/vendor/bundle/gems/redis-3.0.2/test/support/connection/ruby.rb +1 -0
- data/vendor/bundle/gems/redis-3.0.2/test/support/connection/synchrony.rb +17 -0
- data/vendor/bundle/gems/redis-3.0.2/test/support/redis_mock.rb +110 -0
- data/vendor/bundle/gems/redis-3.0.2/test/support/wire/synchrony.rb +24 -0
- data/vendor/bundle/gems/redis-3.0.2/test/support/wire/thread.rb +5 -0
- data/vendor/bundle/gems/redis-3.0.2/test/synchrony_driver.rb +88 -0
- data/vendor/bundle/gems/redis-3.0.2/test/test.conf +9 -0
- data/vendor/bundle/gems/redis-3.0.2/test/thread_safety_test.rb +32 -0
- data/vendor/bundle/gems/redis-3.0.2/test/transactions_test.rb +260 -0
- data/vendor/bundle/gems/redis-3.0.2/test/unknown_commands_test.rb +14 -0
- data/vendor/bundle/gems/redis-3.0.2/test/url_param_test.rb +132 -0
- data/vendor/bundle/gems/rspec-2.12.0/License.txt +24 -0
- data/vendor/bundle/gems/rspec-2.12.0/README.md +47 -0
- data/vendor/bundle/gems/rspec-2.12.0/lib/rspec/version.rb +5 -0
- data/vendor/bundle/gems/rspec-2.12.0/lib/rspec.rb +4 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/Changelog.md +655 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/License.txt +24 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/README.md +257 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/exe/autospec +13 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/exe/rspec +25 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/Autotest.md +38 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/README.md +17 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/Upgrade.md +364 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/README.md +28 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/example_name_option.feature +101 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/exit_status.feature +82 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/format_option.feature +81 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/init.feature +18 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/line_number_appended_to_path.feature +140 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/line_number_option.feature +58 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/order.feature +29 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/pattern_option.feature +31 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/rake_task.feature +122 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/ruby.feature +22 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/command_line/tag.feature +91 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/configuration/alias_example_to.feature +48 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/configuration/custom_settings.feature +84 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/configuration/default_path.feature +38 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/configuration/fail_fast.feature +77 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/configuration/read_options_from_file.feature +87 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/example_groups/basic_structure.feature +55 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/example_groups/shared_context.feature +74 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/example_groups/shared_examples.feature +222 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/expectation_framework_integration/configure_expectation_framework.feature +102 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/filtering/exclusion_filters.feature +139 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/filtering/if_and_unless.feature +168 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/filtering/inclusion_filters.feature +105 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/filtering/run_all_when_everything_filtered.feature +46 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/formatters/custom_formatter.feature +36 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/formatters/json_formatter.feature +30 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/formatters/text_formatter.feature +46 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/helper_methods/arbitrary_methods.feature +40 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/helper_methods/let.feature +50 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/helper_methods/modules.feature +149 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/hooks/around_hooks.feature +343 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/hooks/before_and_after_hooks.feature +427 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/hooks/filtering.feature +234 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/metadata/current_example.feature +17 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/metadata/described_class.feature +17 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/metadata/user_defined.feature +113 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/mock_framework_integration/use_any_framework.feature +106 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/mock_framework_integration/use_flexmock.feature +96 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/mock_framework_integration/use_mocha.feature +97 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/mock_framework_integration/use_rr.feature +98 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/mock_framework_integration/use_rspec.feature +97 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/pending/pending_examples.feature +229 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/spec_files/arbitrary_file_suffix.feature +13 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/step_definitions/additional_cli_steps.rb +32 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/subject/attribute_of_subject.feature +124 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/subject/explicit_subject.feature +82 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/subject/implicit_receiver.feature +29 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/subject/implicit_subject.feature +63 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/features/support/env.rb +12 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/autotest/discover.rb +1 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/autotest/rspec2.rb +73 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/autorun.rb +2 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/backward_compatibility.rb +65 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/command_line.rb +36 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/configuration.rb +1057 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/configuration_options.rb +144 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/deprecation.rb +36 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/drb_command_line.rb +26 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/drb_options.rb +87 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/dsl.rb +26 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/example.rb +331 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/example_group.rb +476 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/extensions/instance_eval_with_args.rb +44 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/extensions/kernel.rb +9 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/extensions/module_eval_with_args.rb +38 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/extensions/ordered.rb +27 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/filter_manager.rb +203 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/formatters/base_formatter.rb +237 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/formatters/base_text_formatter.rb +225 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/formatters/documentation_formatter.rb +67 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/formatters/helpers.rb +103 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/formatters/html_formatter.rb +154 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/formatters/html_printer.rb +407 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/formatters/json_formatter.rb +73 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/formatters/progress_formatter.rb +32 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/formatters/snippet_extractor.rb +92 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/formatters/text_mate_formatter.rb +34 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/formatters.rb +55 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/hooks.rb +495 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/let.rb +110 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/load_path.rb +3 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/metadata.rb +293 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/metadata_hash_builder.rb +97 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/mocking/with_absolutely_nothing.rb +11 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/mocking/with_flexmock.rb +27 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/mocking/with_mocha.rb +52 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/mocking/with_rr.rb +27 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/mocking/with_rspec.rb +27 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/option_parser.rb +202 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/pending.rb +101 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/project_initializer.rb +86 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/rake_task.rb +202 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/reporter.rb +102 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/ruby_project.rb +44 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/runner.rb +87 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/shared_context.rb +49 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/shared_example_group.rb +144 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/subject.rb +223 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/version.rb +7 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core/world.rb +128 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/lib/rspec/core.rb +147 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/autotest/discover_spec.rb +19 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/autotest/failed_results_re_spec.rb +45 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/autotest/rspec_spec.rb +128 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/command_line/order_spec.rb +204 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/command_line_spec.rb +108 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/command_line_spec_output.txt +0 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/configuration_options_spec.rb +384 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/configuration_spec.rb +1371 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/deprecations_spec.rb +75 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/drb_command_line_spec.rb +102 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/drb_options_spec.rb +180 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/dsl_spec.rb +25 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/example_group_spec.rb +1144 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/example_spec.rb +402 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/filter_manager_spec.rb +246 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/base_formatter_spec.rb +108 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/base_text_formatter_spec.rb +367 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/documentation_formatter_spec.rb +88 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/helpers_spec.rb +78 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/html_formatted-1.8.7-jruby.html +410 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/html_formatted-1.8.7-rbx.html +462 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/html_formatted-1.8.7.html +409 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/html_formatted-1.9.2-jruby.html +410 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/html_formatted-1.9.2.html +416 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/html_formatted-1.9.3-jruby.html +410 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/html_formatted-1.9.3-rbx.html +462 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/html_formatted-1.9.3.html +416 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/html_formatter_spec.rb +90 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/json_formatter_spec.rb +110 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/progress_formatter_spec.rb +30 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/snippet_extractor_spec.rb +26 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/text_mate_formatted-1.8.7-jruby.html +410 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/text_mate_formatted-1.8.7-rbx.html +462 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/text_mate_formatted-1.8.7.html +409 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/text_mate_formatted-1.9.2-jruby.html +410 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/text_mate_formatted-1.9.2.html +416 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/text_mate_formatted-1.9.3-jruby.html +410 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/text_mate_formatted-1.9.3-rbx.html +462 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/text_mate_formatted-1.9.3.html +416 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/formatters/text_mate_formatter_spec.rb +91 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/hooks_filtering_spec.rb +227 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/hooks_spec.rb +250 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/kernel_extensions_spec.rb +9 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/let_spec.rb +55 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/metadata_spec.rb +486 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/option_parser_spec.rb +208 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/pending_example_spec.rb +220 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/project_initializer_spec.rb +130 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/rake_task_spec.rb +181 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/reporter_spec.rb +120 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/resources/a_bar.rb +0 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/resources/a_foo.rb +0 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/resources/a_spec.rb +1 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/resources/custom_example_group_runner.rb +14 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/resources/formatter_specs.rb +60 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/resources/utf8_encoded.rb +8 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/rspec_matchers_spec.rb +45 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/ruby_project_spec.rb +24 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/runner_spec.rb +82 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/shared_context_spec.rb +67 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/shared_example_group_spec.rb +96 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/subject_spec.rb +255 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core/world_spec.rb +144 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/rspec/core_spec.rb +35 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/spec_helper.rb +128 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/support/config_options_helper.rb +15 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/support/helper_methods.rb +18 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/support/isolated_directory.rb +10 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/support/isolated_home_directory.rb +16 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/support/matchers.rb +65 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/support/shared_example_groups.rb +41 -0
- data/vendor/bundle/gems/rspec-core-2.12.2/spec/support/spec_files.rb +44 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/Changelog.md +297 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/License.txt +23 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/README.md +228 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/README.md +49 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/Upgrade.md +53 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/README.md +90 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/be.feature +173 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/be_within.feature +46 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/cover.feature +45 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/end_with.feature +46 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/equality.feature +145 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/exist.feature +43 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/expect_change.feature +59 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/expect_error.feature +138 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/have.feature +103 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/include.feature +121 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/match.feature +50 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/operators.feature +221 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/predicates.feature +129 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/respond_to.feature +78 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/satisfy.feature +31 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/start_with.feature +46 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/throw_symbol.feature +85 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/types.feature +114 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/built_in_matchers/yield.feature +146 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/custom_matchers/access_running_example.feature +53 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/custom_matchers/define_diffable_matcher.feature +27 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/custom_matchers/define_matcher.feature +368 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/custom_matchers/define_matcher_outside_rspec.feature +38 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/custom_matchers/define_matcher_with_fluent_interface.feature +24 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/customized_message.feature +22 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/diffing.feature +85 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/implicit_docstrings.feature +52 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/step_definitions/additional_cli_steps.rb +22 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/support/env.rb +5 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/syntax_configuration.feature +68 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/features/test_frameworks/test_unit.feature +46 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations/deprecation.rb +38 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations/differ.rb +115 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations/errors.rb +9 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations/expectation_target.rb +88 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations/extensions/array.rb +9 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations/extensions/object.rb +39 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations/extensions.rb +2 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations/fail_with.rb +55 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations/handler.rb +63 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations/syntax.rb +118 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations/version.rb +8 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/expectations.rb +47 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/be_close.rb +9 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/base_matcher.rb +68 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/be.rb +185 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/be_instance_of.rb +15 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/be_kind_of.rb +11 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/be_within.rb +46 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/change.rb +133 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/cover.rb +21 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/eq.rb +22 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/eql.rb +23 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/equal.rb +44 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/exist.rb +26 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/has.rb +48 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/have.rb +108 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/include.rb +53 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/match.rb +12 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/match_array.rb +51 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/raise_error.rb +107 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/respond_to.rb +74 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/satisfy.rb +30 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/start_and_end_with.rb +48 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/throw_symbol.rb +94 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in/yield.rb +221 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/built_in.rb +39 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/compatibility.rb +14 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/configuration.rb +108 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/dsl.rb +24 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/extensions/instance_eval_with_args.rb +39 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/generated_descriptions.rb +35 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/matcher.rb +299 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/method_missing.rb +12 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/operator_matcher.rb +109 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers/pretty.rb +60 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec/matchers.rb +699 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/lib/rspec-expectations.rb +1 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/expectations/differ_spec.rb +177 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/expectations/expectation_target_spec.rb +65 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/expectations/extensions/kernel_spec.rb +67 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/expectations/fail_with_spec.rb +70 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/expectations/handler_spec.rb +206 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/expectations/syntax_spec.rb +35 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/base_matcher_spec.rb +60 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/be_close_spec.rb +22 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/be_instance_of_spec.rb +57 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/be_kind_of_spec.rb +37 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/be_spec.rb +452 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/be_within_spec.rb +80 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/change_spec.rb +528 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/configuration_spec.rb +234 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/cover_spec.rb +69 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/description_generation_spec.rb +176 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/dsl_spec.rb +57 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/eq_spec.rb +54 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/eql_spec.rb +41 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/equal_spec.rb +60 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/exist_spec.rb +110 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/has_spec.rb +118 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/have_spec.rb +431 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/include_spec.rb +373 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/match_array_spec.rb +153 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/match_spec.rb +61 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/matcher_spec.rb +434 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/matchers_spec.rb +31 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/method_missing_spec.rb +24 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/operator_matcher_spec.rb +244 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/raise_error_spec.rb +395 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/respond_to_spec.rb +295 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/satisfy_spec.rb +44 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/start_with_end_with_spec.rb +182 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/throw_symbol_spec.rb +116 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/yield_spec.rb +437 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/spec_helper.rb +27 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/support/classes.rb +56 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/support/in_sub_process.rb +31 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/support/matchers.rb +22 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/support/ruby_version.rb +10 -0
- data/vendor/bundle/gems/rspec-expectations-2.12.1/spec/support/shared_examples.rb +13 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/Changelog.md +268 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/License.txt +23 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/README.md +301 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/README.md +67 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/Scope.md +17 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/Upgrade.md +22 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/argument_matchers/README.md +27 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/argument_matchers/explicit.feature +60 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/argument_matchers/general_matchers.feature +85 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/argument_matchers/type_matchers.feature +27 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/message_expectations/README.md +73 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/message_expectations/any_instance.feature +21 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/message_expectations/block_local_expectations.feature.pending +55 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/message_expectations/call_original.feature +24 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/message_expectations/expect_message.feature +94 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/message_expectations/receive_counts.feature +209 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/message_expectations/warn_when_expectation_is_set_on_nil.feature +50 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/method_stubs/README.md +47 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/method_stubs/any_instance.feature +132 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/method_stubs/as_null_object.feature +35 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/method_stubs/simple_return_value.feature +64 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/method_stubs/stub_chain.feature +51 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/method_stubs/stub_implementation.feature +26 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/method_stubs/to_ary.feature +47 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/mutating_constants/README.md +82 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/mutating_constants/hiding_defined_constant.feature +64 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/mutating_constants/stub_defined_constant.feature +79 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/mutating_constants/stub_undefined_constant.feature +50 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/outside_rspec/configuration.feature +82 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/outside_rspec/standalone.feature +33 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/step_definitions/additional_cli_steps.rb +4 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/features/support/env.rb +6 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/any_instance/chain.rb +78 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/any_instance/expectation_chain.rb +57 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/any_instance/message_chains.rb +60 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/any_instance/recorder.rb +199 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/any_instance/stub_chain.rb +37 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/any_instance/stub_chain_chain.rb +25 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/any_instance.rb +81 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/argument_list_matcher.rb +93 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/argument_matchers.rb +238 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/configuration.rb +28 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/error_generator.rb +120 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/errors.rb +12 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/example_methods.rb +120 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/extensions/instance_exec.rb +34 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/extensions/marshal.rb +23 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/extensions/psych.rb +23 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/framework.rb +22 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/instance_method_stasher.rb +85 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/message_expectation.rb +503 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/method_double.rb +280 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/methods.rb +155 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/mock.rb +7 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/mutate_const.rb +415 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/order_group.rb +40 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/proxy.rb +205 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/serialization.rb +34 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/space.rb +34 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/standalone.rb +3 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/test_double.rb +103 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/version.rb +7 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks.rb +63 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/lib/spec/mocks.rb +6 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/and_call_original_spec.rb +225 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/and_yield_spec.rb +114 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/any_instance/message_chains_spec.rb +40 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/any_instance_spec.rb +888 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/any_number_of_times_spec.rb +30 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/argument_expectation_spec.rb +34 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/at_least_spec.rb +142 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/at_most_spec.rb +90 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/block_return_value_spec.rb +53 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/bug_report_10260_spec.rb +8 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/bug_report_10263_spec.rb +27 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/bug_report_11545_spec.rb +32 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/bug_report_496_spec.rb +17 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/bug_report_600_spec.rb +22 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/bug_report_7611_spec.rb +16 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/bug_report_8165_spec.rb +31 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/bug_report_830_spec.rb +21 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/bug_report_957_spec.rb +22 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/configuration_spec.rb +26 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/double_spec.rb +12 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/failing_argument_matchers_spec.rb +94 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/hash_excluding_matcher_spec.rb +67 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/hash_including_matcher_spec.rb +90 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/instance_method_stasher_spec.rb +58 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/mock_ordering_spec.rb +103 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/mock_space_spec.rb +58 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/mock_spec.rb +734 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/multiple_return_value_spec.rb +119 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/mutate_const_spec.rb +481 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/nil_expectation_warning_spec.rb +56 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/null_object_mock_spec.rb +107 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/once_counts_spec.rb +52 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/options_hash_spec.rb +35 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/partial_mock_spec.rb +196 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/partial_mock_using_mocks_directly_spec.rb +95 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/passing_argument_matchers_spec.rb +142 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/precise_counts_spec.rb +68 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/record_messages_spec.rb +26 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/serialization_spec.rb +110 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/stash_spec.rb +54 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/stub_chain_spec.rb +154 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/stub_implementation_spec.rb +81 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/stub_spec.rb +266 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/stubbed_message_expectations_spec.rb +47 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/test_double_spec.rb +57 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/to_ary_spec.rb +40 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/twice_counts_spec.rb +66 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks_spec.rb +67 -0
- data/vendor/bundle/gems/rspec-mocks-2.12.2/spec/spec_helper.rb +36 -0
- data/vendor/bundle/specifications/diff-lcs-1.1.3.gemspec +35 -0
- data/vendor/bundle/specifications/hiredis-0.4.5.gemspec +30 -0
- data/vendor/bundle/specifications/multi_json-1.6.1.gemspec +30 -0
- data/vendor/bundle/specifications/rake-10.0.3.gemspec +34 -0
- data/vendor/bundle/specifications/redis-3.0.2.gemspec +28 -0
- data/vendor/bundle/specifications/rspec-2.12.0.gemspec +39 -0
- data/vendor/bundle/specifications/rspec-core-2.12.2.gemspec +58 -0
- data/vendor/bundle/specifications/rspec-expectations-2.12.1.gemspec +40 -0
- data/vendor/bundle/specifications/rspec-mocks-2.12.2.gemspec +37 -0
- data/vendor/remq/Readme.md +30 -16
- data/vendor/remq/VERSION +1 -0
- data/vendor/remq/scripts/consume.lua +24 -38
- data/vendor/remq/scripts/flush.lua +33 -0
- data/vendor/remq/scripts/publish.lua +10 -7
- metadata +806 -29
- data/lib/remq/coder.rb +0 -30
- data/lib/remq/multi_json_coder.rb +0 -39
- data/vendor/remq/scripts/purge.lua +0 -18
@@ -0,0 +1,888 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module RSpec
|
4
|
+
module Mocks
|
5
|
+
describe "#any_instance" do
|
6
|
+
class CustomErrorForAnyInstanceSpec < StandardError;end
|
7
|
+
|
8
|
+
let(:klass) do
|
9
|
+
Class.new do
|
10
|
+
def existing_method; :existing_method_return_value; end
|
11
|
+
def existing_method_with_arguments(arg_one, arg_two = nil); :existing_method_with_arguments_return_value; end
|
12
|
+
def another_existing_method; end
|
13
|
+
private
|
14
|
+
def private_method; :private_method_return_value; end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
let(:existing_method_return_value){ :existing_method_return_value }
|
18
|
+
|
19
|
+
context "invocation order" do
|
20
|
+
context "#stub" do
|
21
|
+
it "raises an error if 'stub' follows 'with'" do
|
22
|
+
expect { klass.any_instance.with("1").stub(:foo) }.to raise_error(NoMethodError)
|
23
|
+
end
|
24
|
+
|
25
|
+
it "raises an error if 'with' follows 'and_return'" do
|
26
|
+
expect { klass.any_instance.stub(:foo).and_return(1).with("1") }.to raise_error(NoMethodError)
|
27
|
+
end
|
28
|
+
|
29
|
+
it "raises an error if 'with' follows 'and_raise'" do
|
30
|
+
expect { klass.any_instance.stub(:foo).and_raise(1).with("1") }.to raise_error(NoMethodError)
|
31
|
+
end
|
32
|
+
|
33
|
+
it "raises an error if 'with' follows 'and_yield'" do
|
34
|
+
expect { klass.any_instance.stub(:foo).and_yield(1).with("1") }.to raise_error(NoMethodError)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
context "#stub_chain" do
|
39
|
+
it "raises an error if 'stub_chain' follows 'any_instance'" do
|
40
|
+
expect { klass.any_instance.and_return("1").stub_chain(:foo, :bar) }.to raise_error(NoMethodError)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
context "#should_receive" do
|
45
|
+
it "raises an error if 'should_receive' follows 'with'" do
|
46
|
+
expect { klass.any_instance.with("1").should_receive(:foo) }.to raise_error(NoMethodError)
|
47
|
+
end
|
48
|
+
|
49
|
+
it "raises an error if 'with' follows 'and_return'" do
|
50
|
+
pending "see Github issue #42"
|
51
|
+
expect { klass.any_instance.should_receive(:foo).and_return(1).with("1") }.to raise_error(NoMethodError)
|
52
|
+
end
|
53
|
+
|
54
|
+
it "raises an error if 'with' follows 'and_raise'" do
|
55
|
+
pending "see Github issue #42"
|
56
|
+
expect { klass.any_instance.should_receive(:foo).and_raise(1).with("1") }.to raise_error(NoMethodError)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
context "with #stub" do
|
62
|
+
it "does not suppress an exception when a method that doesn't exist is invoked" do
|
63
|
+
klass.any_instance.stub(:foo)
|
64
|
+
expect { klass.new.bar }.to raise_error(NoMethodError)
|
65
|
+
end
|
66
|
+
|
67
|
+
context 'multiple methods' do
|
68
|
+
it "allows multiple methods to be stubbed in a single invocation" do
|
69
|
+
klass.any_instance.stub(:foo => 'foo', :bar => 'bar')
|
70
|
+
instance = klass.new
|
71
|
+
expect(instance.foo).to eq('foo')
|
72
|
+
expect(instance.bar).to eq('bar')
|
73
|
+
end
|
74
|
+
|
75
|
+
it "adheres to the contract of multiple method stubbing withou any instance" do
|
76
|
+
expect(Object.new.stub(:foo => 'foo', :bar => 'bar')).to eq(:foo => 'foo', :bar => 'bar')
|
77
|
+
expect(klass.any_instance.stub(:foo => 'foo', :bar => 'bar')).to eq(:foo => 'foo', :bar => 'bar')
|
78
|
+
end
|
79
|
+
|
80
|
+
context "allows a chain of methods to be stubbed using #stub_chain" do
|
81
|
+
it "given symbols representing the methods" do
|
82
|
+
klass.any_instance.stub_chain(:one, :two, :three).and_return(:four)
|
83
|
+
expect(klass.new.one.two.three).to eq(:four)
|
84
|
+
end
|
85
|
+
|
86
|
+
it "given a hash as the last argument uses the value as the expected return value" do
|
87
|
+
klass.any_instance.stub_chain(:one, :two, :three => :four)
|
88
|
+
expect(klass.new.one.two.three).to eq(:four)
|
89
|
+
end
|
90
|
+
|
91
|
+
it "given a string of '.' separated method names representing the chain" do
|
92
|
+
klass.any_instance.stub_chain('one.two.three').and_return(:four)
|
93
|
+
expect(klass.new.one.two.three).to eq(:four)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
context "behaves as 'every instance'" do
|
99
|
+
it "stubs every instance in the spec" do
|
100
|
+
klass.any_instance.stub(:foo).and_return(result = Object.new)
|
101
|
+
expect(klass.new.foo).to eq(result)
|
102
|
+
expect(klass.new.foo).to eq(result)
|
103
|
+
end
|
104
|
+
|
105
|
+
it "stubs instance created before any_instance was called" do
|
106
|
+
instance = klass.new
|
107
|
+
klass.any_instance.stub(:foo).and_return(result = Object.new)
|
108
|
+
expect(instance.foo).to eq(result)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
context "with argument matching" do
|
113
|
+
before do
|
114
|
+
klass.any_instance.stub(:foo).with(:param_one, :param_two).and_return(:result_one)
|
115
|
+
klass.any_instance.stub(:foo).with(:param_three, :param_four).and_return(:result_two)
|
116
|
+
end
|
117
|
+
|
118
|
+
it "returns the stubbed value when arguments match" do
|
119
|
+
instance = klass.new
|
120
|
+
expect(instance.foo(:param_one, :param_two)).to eq(:result_one)
|
121
|
+
expect(instance.foo(:param_three, :param_four)).to eq(:result_two)
|
122
|
+
end
|
123
|
+
|
124
|
+
it "fails the spec with an expectation error when the arguments do not match" do
|
125
|
+
expect do
|
126
|
+
klass.new.foo(:param_one, :param_three)
|
127
|
+
end.to(raise_error(RSpec::Mocks::MockExpectationError))
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
context "with multiple stubs" do
|
132
|
+
before do
|
133
|
+
klass.any_instance.stub(:foo).and_return(1)
|
134
|
+
klass.any_instance.stub(:bar).and_return(2)
|
135
|
+
end
|
136
|
+
|
137
|
+
it "stubs a method" do
|
138
|
+
instance = klass.new
|
139
|
+
expect(instance.foo).to eq(1)
|
140
|
+
expect(instance.bar).to eq(2)
|
141
|
+
end
|
142
|
+
|
143
|
+
it "returns the same value for calls on different instances" do
|
144
|
+
expect(klass.new.foo).to eq(klass.new.foo)
|
145
|
+
expect(klass.new.bar).to eq(klass.new.bar)
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
context "with #and_return" do
|
150
|
+
it "stubs a method that doesn't exist" do
|
151
|
+
klass.any_instance.stub(:foo).and_return(1)
|
152
|
+
expect(klass.new.foo).to eq(1)
|
153
|
+
end
|
154
|
+
|
155
|
+
it "stubs a method that exists" do
|
156
|
+
klass.any_instance.stub(:existing_method).and_return(1)
|
157
|
+
expect(klass.new.existing_method).to eq(1)
|
158
|
+
end
|
159
|
+
|
160
|
+
it "returns the same object for calls on different instances" do
|
161
|
+
return_value = Object.new
|
162
|
+
klass.any_instance.stub(:foo).and_return(return_value)
|
163
|
+
expect(klass.new.foo).to be(return_value)
|
164
|
+
expect(klass.new.foo).to be(return_value)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
context "with #and_yield" do
|
169
|
+
it "yields the value specified" do
|
170
|
+
yielded_value = Object.new
|
171
|
+
klass.any_instance.stub(:foo).and_yield(yielded_value)
|
172
|
+
klass.new.foo{|value| expect(value).to be(yielded_value)}
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
context "with #and_raise" do
|
177
|
+
it "stubs a method that doesn't exist" do
|
178
|
+
klass.any_instance.stub(:foo).and_raise(CustomErrorForAnyInstanceSpec)
|
179
|
+
expect { klass.new.foo}.to raise_error(CustomErrorForAnyInstanceSpec)
|
180
|
+
end
|
181
|
+
|
182
|
+
it "stubs a method that exists" do
|
183
|
+
klass.any_instance.stub(:existing_method).and_raise(CustomErrorForAnyInstanceSpec)
|
184
|
+
expect { klass.new.existing_method}.to raise_error(CustomErrorForAnyInstanceSpec)
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
context "with a block" do
|
189
|
+
it "stubs a method" do
|
190
|
+
klass.any_instance.stub(:foo) { 1 }
|
191
|
+
expect(klass.new.foo).to eq(1)
|
192
|
+
end
|
193
|
+
|
194
|
+
it "returns the same computed value for calls on different instances" do
|
195
|
+
klass.any_instance.stub(:foo) { 1 + 2 }
|
196
|
+
expect(klass.new.foo).to eq(klass.new.foo)
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
context "core ruby objects" do
|
201
|
+
it "works uniformly across *everything*" do
|
202
|
+
Object.any_instance.stub(:foo).and_return(1)
|
203
|
+
expect(Object.new.foo).to eq(1)
|
204
|
+
end
|
205
|
+
|
206
|
+
it "works with the non-standard constructor []" do
|
207
|
+
Array.any_instance.stub(:foo).and_return(1)
|
208
|
+
expect([].foo).to eq(1)
|
209
|
+
end
|
210
|
+
|
211
|
+
it "works with the non-standard constructor {}" do
|
212
|
+
Hash.any_instance.stub(:foo).and_return(1)
|
213
|
+
expect({}.foo).to eq(1)
|
214
|
+
end
|
215
|
+
|
216
|
+
it "works with the non-standard constructor \"\"" do
|
217
|
+
String.any_instance.stub(:foo).and_return(1)
|
218
|
+
expect("".foo).to eq(1)
|
219
|
+
end
|
220
|
+
|
221
|
+
it "works with the non-standard constructor \'\'" do
|
222
|
+
String.any_instance.stub(:foo).and_return(1)
|
223
|
+
expect(''.foo).to eq(1)
|
224
|
+
end
|
225
|
+
|
226
|
+
it "works with the non-standard constructor module" do
|
227
|
+
Module.any_instance.stub(:foo).and_return(1)
|
228
|
+
module RSpec::SampleRspecTestModule;end
|
229
|
+
expect(RSpec::SampleRspecTestModule.foo).to eq(1)
|
230
|
+
end
|
231
|
+
|
232
|
+
it "works with the non-standard constructor class" do
|
233
|
+
Class.any_instance.stub(:foo).and_return(1)
|
234
|
+
class RSpec::SampleRspecTestClass;end
|
235
|
+
expect(RSpec::SampleRspecTestClass.foo).to eq(1)
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|
239
|
+
|
240
|
+
context "with #stub!" do
|
241
|
+
it "raises with a message instructing the user to use stub instead" do
|
242
|
+
expect do
|
243
|
+
klass.any_instance.stub!(:foo)
|
244
|
+
end.to raise_error(/Use stub instead/)
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
248
|
+
context "unstub implementation" do
|
249
|
+
it "replaces the stubbed method with the original method" do
|
250
|
+
klass.any_instance.stub(:existing_method)
|
251
|
+
klass.any_instance.unstub(:existing_method)
|
252
|
+
expect(klass.new.existing_method).to eq(:existing_method_return_value)
|
253
|
+
end
|
254
|
+
|
255
|
+
it "removes all stubs with the supplied method name" do
|
256
|
+
klass.any_instance.stub(:existing_method).with(1)
|
257
|
+
klass.any_instance.stub(:existing_method).with(2)
|
258
|
+
klass.any_instance.unstub(:existing_method)
|
259
|
+
expect(klass.new.existing_method).to eq(:existing_method_return_value)
|
260
|
+
end
|
261
|
+
|
262
|
+
it "does not remove any expectations with the same method name" do
|
263
|
+
klass.any_instance.should_receive(:existing_method_with_arguments).with(3).and_return(:three)
|
264
|
+
klass.any_instance.stub(:existing_method_with_arguments).with(1)
|
265
|
+
klass.any_instance.stub(:existing_method_with_arguments).with(2)
|
266
|
+
klass.any_instance.unstub(:existing_method_with_arguments)
|
267
|
+
expect(klass.new.existing_method_with_arguments(3)).to eq(:three)
|
268
|
+
end
|
269
|
+
|
270
|
+
it "raises a MockExpectationError if the method has not been stubbed" do
|
271
|
+
expect {
|
272
|
+
klass.any_instance.unstub(:existing_method)
|
273
|
+
}.to raise_error(RSpec::Mocks::MockExpectationError, 'The method `existing_method` was not stubbed or was already unstubbed')
|
274
|
+
end
|
275
|
+
end
|
276
|
+
|
277
|
+
context "with #should_not_receive" do
|
278
|
+
it "fails if the method is called" do
|
279
|
+
klass.any_instance.should_not_receive(:existing_method)
|
280
|
+
expect { klass.new.existing_method }.to raise_error(RSpec::Mocks::MockExpectationError)
|
281
|
+
end
|
282
|
+
|
283
|
+
it "passes if no method is called" do
|
284
|
+
expect { klass.any_instance.should_not_receive(:existing_method) }.to_not raise_error
|
285
|
+
end
|
286
|
+
|
287
|
+
it "passes if only a different method is called" do
|
288
|
+
klass.any_instance.should_not_receive(:existing_method)
|
289
|
+
expect { klass.new.another_existing_method }.to_not raise_error
|
290
|
+
end
|
291
|
+
|
292
|
+
context "with constraints" do
|
293
|
+
it "fails if the method is called with the specified parameters" do
|
294
|
+
klass.any_instance.should_not_receive(:existing_method_with_arguments).with(:argument_one, :argument_two)
|
295
|
+
expect {
|
296
|
+
klass.new.existing_method_with_arguments(:argument_one, :argument_two)
|
297
|
+
}.to raise_error(RSpec::Mocks::MockExpectationError)
|
298
|
+
end
|
299
|
+
|
300
|
+
it "passes if the method is called with different parameters" do
|
301
|
+
klass.any_instance.should_not_receive(:existing_method_with_arguments).with(:argument_one, :argument_two)
|
302
|
+
expect { klass.new.existing_method_with_arguments(:argument_three, :argument_four) }.to_not raise_error
|
303
|
+
end
|
304
|
+
end
|
305
|
+
end
|
306
|
+
|
307
|
+
context "with #should_receive" do
|
308
|
+
let(:foo_expectation_error_message) { 'Exactly one instance should have received the following message(s) but didn\'t: foo' }
|
309
|
+
let(:existing_method_expectation_error_message) { 'Exactly one instance should have received the following message(s) but didn\'t: existing_method' }
|
310
|
+
|
311
|
+
context "with an expectation is set on a method which does not exist" do
|
312
|
+
it "returns the expected value" do
|
313
|
+
klass.any_instance.should_receive(:foo).and_return(1)
|
314
|
+
expect(klass.new.foo(1)).to eq(1)
|
315
|
+
end
|
316
|
+
|
317
|
+
it "fails if an instance is created but no invocation occurs" do
|
318
|
+
expect do
|
319
|
+
klass.any_instance.should_receive(:foo)
|
320
|
+
klass.new
|
321
|
+
klass.rspec_verify
|
322
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, foo_expectation_error_message)
|
323
|
+
end
|
324
|
+
|
325
|
+
it "fails if no instance is created" do
|
326
|
+
expect do
|
327
|
+
klass.any_instance.should_receive(:foo).and_return(1)
|
328
|
+
klass.rspec_verify
|
329
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, foo_expectation_error_message)
|
330
|
+
end
|
331
|
+
|
332
|
+
it "fails if no instance is created and there are multiple expectations" do
|
333
|
+
expect do
|
334
|
+
klass.any_instance.should_receive(:foo)
|
335
|
+
klass.any_instance.should_receive(:bar)
|
336
|
+
klass.rspec_verify
|
337
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, 'Exactly one instance should have received the following message(s) but didn\'t: bar, foo')
|
338
|
+
end
|
339
|
+
|
340
|
+
it "allows expectations on instances to take priority" do
|
341
|
+
klass.any_instance.should_receive(:foo)
|
342
|
+
klass.new.foo
|
343
|
+
|
344
|
+
instance = klass.new
|
345
|
+
instance.should_receive(:foo).and_return(result = Object.new)
|
346
|
+
expect(instance.foo).to eq(result)
|
347
|
+
end
|
348
|
+
|
349
|
+
context "behaves as 'exactly one instance'" do
|
350
|
+
it "passes if subsequent invocations do not receive that message" do
|
351
|
+
klass.any_instance.should_receive(:foo)
|
352
|
+
klass.new.foo
|
353
|
+
klass.new
|
354
|
+
end
|
355
|
+
|
356
|
+
it "fails if the method is invoked on a second instance" do
|
357
|
+
instance_one = klass.new
|
358
|
+
instance_two = klass.new
|
359
|
+
expect do
|
360
|
+
klass.any_instance.should_receive(:foo)
|
361
|
+
|
362
|
+
instance_one.foo
|
363
|
+
instance_two.foo
|
364
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, "The message 'foo' was received by #{instance_two.inspect} but has already been received by #{instance_one.inspect}")
|
365
|
+
end
|
366
|
+
end
|
367
|
+
|
368
|
+
context "normal expectations on the class object" do
|
369
|
+
it "fail when unfulfilled" do
|
370
|
+
expect do
|
371
|
+
klass.any_instance.should_receive(:foo)
|
372
|
+
klass.should_receive(:woot)
|
373
|
+
klass.new.foo
|
374
|
+
klass.rspec_verify
|
375
|
+
end.to(raise_error(RSpec::Mocks::MockExpectationError) do |error|
|
376
|
+
expect(error.message).not_to eq(existing_method_expectation_error_message)
|
377
|
+
end)
|
378
|
+
end
|
379
|
+
|
380
|
+
|
381
|
+
it "pass when expectations are met" do
|
382
|
+
klass.any_instance.should_receive(:foo)
|
383
|
+
klass.should_receive(:woot).and_return(result = Object.new)
|
384
|
+
klass.new.foo
|
385
|
+
expect(klass.woot).to eq(result)
|
386
|
+
end
|
387
|
+
end
|
388
|
+
end
|
389
|
+
|
390
|
+
context "with an expectation is set on a method that exists" do
|
391
|
+
it "returns the expected value" do
|
392
|
+
klass.any_instance.should_receive(:existing_method).and_return(1)
|
393
|
+
expect(klass.new.existing_method(1)).to eq(1)
|
394
|
+
end
|
395
|
+
|
396
|
+
it "fails if an instance is created but no invocation occurs" do
|
397
|
+
expect do
|
398
|
+
klass.any_instance.should_receive(:existing_method)
|
399
|
+
klass.new
|
400
|
+
klass.rspec_verify
|
401
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, existing_method_expectation_error_message)
|
402
|
+
end
|
403
|
+
|
404
|
+
it "fails if no instance is created" do
|
405
|
+
expect do
|
406
|
+
klass.any_instance.should_receive(:existing_method)
|
407
|
+
klass.rspec_verify
|
408
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, existing_method_expectation_error_message)
|
409
|
+
end
|
410
|
+
|
411
|
+
it "fails if no instance is created and there are multiple expectations" do
|
412
|
+
expect do
|
413
|
+
klass.any_instance.should_receive(:existing_method)
|
414
|
+
klass.any_instance.should_receive(:another_existing_method)
|
415
|
+
klass.rspec_verify
|
416
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, 'Exactly one instance should have received the following message(s) but didn\'t: another_existing_method, existing_method')
|
417
|
+
end
|
418
|
+
|
419
|
+
context "after any one instance has received a message" do
|
420
|
+
it "passes if subsequent invocations do not receive that message" do
|
421
|
+
klass.any_instance.should_receive(:existing_method)
|
422
|
+
klass.new.existing_method
|
423
|
+
klass.new
|
424
|
+
end
|
425
|
+
|
426
|
+
it "fails if the method is invoked on a second instance" do
|
427
|
+
instance_one = klass.new
|
428
|
+
instance_two = klass.new
|
429
|
+
expect do
|
430
|
+
klass.any_instance.should_receive(:existing_method)
|
431
|
+
|
432
|
+
instance_one.existing_method
|
433
|
+
instance_two.existing_method
|
434
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, "The message 'existing_method' was received by #{instance_two.inspect} but has already been received by #{instance_one.inspect}")
|
435
|
+
end
|
436
|
+
end
|
437
|
+
end
|
438
|
+
|
439
|
+
context "with argument matching" do
|
440
|
+
before do
|
441
|
+
klass.any_instance.should_receive(:foo).with(:param_one, :param_two).and_return(:result_one)
|
442
|
+
klass.any_instance.should_receive(:foo).with(:param_three, :param_four).and_return(:result_two)
|
443
|
+
end
|
444
|
+
|
445
|
+
it "returns the expected value when arguments match" do
|
446
|
+
instance = klass.new
|
447
|
+
expect(instance.foo(:param_one, :param_two)).to eq(:result_one)
|
448
|
+
expect(instance.foo(:param_three, :param_four)).to eq(:result_two)
|
449
|
+
end
|
450
|
+
|
451
|
+
it "fails when the arguments match but different instances are used" do
|
452
|
+
instances = Array.new(2) { klass.new }
|
453
|
+
expect do
|
454
|
+
expect(instances[0].foo(:param_one, :param_two)).to eq(:result_one)
|
455
|
+
expect(instances[1].foo(:param_three, :param_four)).to eq(:result_two)
|
456
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError)
|
457
|
+
|
458
|
+
# ignore the fact that should_receive expectations were not met
|
459
|
+
instances.each { |instance| instance.rspec_reset }
|
460
|
+
end
|
461
|
+
|
462
|
+
it "is not affected by the invocation of existing methods on other instances" do
|
463
|
+
expect(klass.new.existing_method_with_arguments(:param_one, :param_two)).to eq(:existing_method_with_arguments_return_value)
|
464
|
+
instance = klass.new
|
465
|
+
expect(instance.foo(:param_one, :param_two)).to eq(:result_one)
|
466
|
+
expect(instance.foo(:param_three, :param_four)).to eq(:result_two)
|
467
|
+
end
|
468
|
+
|
469
|
+
it "fails when arguments do not match" do
|
470
|
+
instance = klass.new
|
471
|
+
expect do
|
472
|
+
instance.foo(:param_one, :param_three)
|
473
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError)
|
474
|
+
|
475
|
+
# ignore the fact that should_receive expectations were not met
|
476
|
+
instance.rspec_reset
|
477
|
+
end
|
478
|
+
end
|
479
|
+
|
480
|
+
context "message count" do
|
481
|
+
context "the 'once' constraint" do
|
482
|
+
it "passes for one invocation" do
|
483
|
+
klass.any_instance.should_receive(:foo).once
|
484
|
+
klass.new.foo
|
485
|
+
end
|
486
|
+
|
487
|
+
it "fails when no instances are declared" do
|
488
|
+
expect do
|
489
|
+
klass.any_instance.should_receive(:foo).once
|
490
|
+
klass.rspec_verify
|
491
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, foo_expectation_error_message)
|
492
|
+
end
|
493
|
+
|
494
|
+
it "fails when an instance is declared but there are no invocations" do
|
495
|
+
expect do
|
496
|
+
klass.any_instance.should_receive(:foo).once
|
497
|
+
klass.new
|
498
|
+
klass.rspec_verify
|
499
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, foo_expectation_error_message)
|
500
|
+
end
|
501
|
+
|
502
|
+
it "fails for more than one invocation" do
|
503
|
+
expect do
|
504
|
+
klass.any_instance.should_receive(:foo).once
|
505
|
+
instance = klass.new
|
506
|
+
2.times { instance.foo }
|
507
|
+
instance.rspec_verify
|
508
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError)
|
509
|
+
end
|
510
|
+
end
|
511
|
+
|
512
|
+
context "the 'twice' constraint" do
|
513
|
+
it "passes for two invocations" do
|
514
|
+
klass.any_instance.should_receive(:foo).twice
|
515
|
+
instance = klass.new
|
516
|
+
2.times { instance.foo }
|
517
|
+
end
|
518
|
+
|
519
|
+
it "fails for more than two invocations" do
|
520
|
+
expect do
|
521
|
+
klass.any_instance.should_receive(:foo).twice
|
522
|
+
instance = klass.new
|
523
|
+
3.times { instance.foo }
|
524
|
+
instance.rspec_verify
|
525
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError)
|
526
|
+
end
|
527
|
+
end
|
528
|
+
|
529
|
+
context "the 'exactly(n)' constraint" do
|
530
|
+
it "passes for n invocations where n = 3" do
|
531
|
+
klass.any_instance.should_receive(:foo).exactly(3).times
|
532
|
+
instance = klass.new
|
533
|
+
3.times { instance.foo }
|
534
|
+
end
|
535
|
+
|
536
|
+
it "fails for n invocations where n < 3" do
|
537
|
+
expect do
|
538
|
+
klass.any_instance.should_receive(:foo).exactly(3).times
|
539
|
+
instance = klass.new
|
540
|
+
2.times { instance.foo }
|
541
|
+
instance.rspec_verify
|
542
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError)
|
543
|
+
end
|
544
|
+
|
545
|
+
it "fails for n invocations where n > 3" do
|
546
|
+
expect do
|
547
|
+
klass.any_instance.should_receive(:foo).exactly(3).times
|
548
|
+
instance = klass.new
|
549
|
+
4.times { instance.foo }
|
550
|
+
instance.rspec_verify
|
551
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError)
|
552
|
+
end
|
553
|
+
end
|
554
|
+
|
555
|
+
context "the 'at_least(n)' constraint" do
|
556
|
+
it "passes for n invocations where n = 3" do
|
557
|
+
klass.any_instance.should_receive(:foo).at_least(3).times
|
558
|
+
instance = klass.new
|
559
|
+
3.times { instance.foo }
|
560
|
+
end
|
561
|
+
|
562
|
+
it "fails for n invocations where n < 3" do
|
563
|
+
expect do
|
564
|
+
klass.any_instance.should_receive(:foo).at_least(3).times
|
565
|
+
instance = klass.new
|
566
|
+
2.times { instance.foo }
|
567
|
+
instance.rspec_verify
|
568
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError)
|
569
|
+
end
|
570
|
+
|
571
|
+
it "passes for n invocations where n > 3" do
|
572
|
+
klass.any_instance.should_receive(:foo).at_least(3).times
|
573
|
+
instance = klass.new
|
574
|
+
4.times { instance.foo }
|
575
|
+
end
|
576
|
+
end
|
577
|
+
|
578
|
+
context "the 'at_most(n)' constraint" do
|
579
|
+
it "passes for n invocations where n = 3" do
|
580
|
+
klass.any_instance.should_receive(:foo).at_most(3).times
|
581
|
+
instance = klass.new
|
582
|
+
3.times { instance.foo }
|
583
|
+
end
|
584
|
+
|
585
|
+
it "passes for n invocations where n < 3" do
|
586
|
+
klass.any_instance.should_receive(:foo).at_most(3).times
|
587
|
+
instance = klass.new
|
588
|
+
2.times { instance.foo }
|
589
|
+
end
|
590
|
+
|
591
|
+
it "fails for n invocations where n > 3" do
|
592
|
+
expect do
|
593
|
+
klass.any_instance.should_receive(:foo).at_most(3).times
|
594
|
+
instance = klass.new
|
595
|
+
4.times { instance.foo }
|
596
|
+
instance.rspec_verify
|
597
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError)
|
598
|
+
end
|
599
|
+
end
|
600
|
+
|
601
|
+
context "the 'never' constraint" do
|
602
|
+
it "passes for 0 invocations" do
|
603
|
+
klass.any_instance.should_receive(:foo).never
|
604
|
+
klass.rspec_verify
|
605
|
+
end
|
606
|
+
|
607
|
+
it "fails on the first invocation" do
|
608
|
+
expect do
|
609
|
+
klass.any_instance.should_receive(:foo).never
|
610
|
+
klass.new.foo
|
611
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError)
|
612
|
+
end
|
613
|
+
|
614
|
+
context "when combined with other expectations" do
|
615
|
+
it "passes when the other expecations are met" do
|
616
|
+
klass.any_instance.should_receive(:foo).never
|
617
|
+
klass.any_instance.should_receive(:existing_method).and_return(5)
|
618
|
+
expect(klass.new.existing_method).to eq(5)
|
619
|
+
end
|
620
|
+
|
621
|
+
it "fails when the other expecations are not met" do
|
622
|
+
expect do
|
623
|
+
klass.any_instance.should_receive(:foo).never
|
624
|
+
klass.any_instance.should_receive(:existing_method).and_return(5)
|
625
|
+
klass.rspec_verify
|
626
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, existing_method_expectation_error_message)
|
627
|
+
end
|
628
|
+
end
|
629
|
+
end
|
630
|
+
|
631
|
+
context "the 'any_number_of_times' constraint" do
|
632
|
+
it "passes for 0 invocations" do
|
633
|
+
klass.any_instance.should_receive(:foo).any_number_of_times
|
634
|
+
klass.new.rspec_verify
|
635
|
+
end
|
636
|
+
|
637
|
+
it "passes for a non-zero number of invocations" do
|
638
|
+
klass.any_instance.should_receive(:foo).any_number_of_times
|
639
|
+
instance = klass.new
|
640
|
+
instance.foo
|
641
|
+
instance.rspec_verify
|
642
|
+
end
|
643
|
+
|
644
|
+
it "does not interfere with other expectations" do
|
645
|
+
klass.any_instance.should_receive(:foo).any_number_of_times
|
646
|
+
klass.any_instance.should_receive(:existing_method).and_return(5)
|
647
|
+
expect(klass.new.existing_method).to eq(5)
|
648
|
+
end
|
649
|
+
|
650
|
+
context "when combined with other expectations" do
|
651
|
+
it "passes when the other expecations are met" do
|
652
|
+
klass.any_instance.should_receive(:foo).any_number_of_times
|
653
|
+
klass.any_instance.should_receive(:existing_method).and_return(5)
|
654
|
+
expect(klass.new.existing_method).to eq(5)
|
655
|
+
end
|
656
|
+
|
657
|
+
it "fails when the other expecations are not met" do
|
658
|
+
expect do
|
659
|
+
klass.any_instance.should_receive(:foo).any_number_of_times
|
660
|
+
klass.any_instance.should_receive(:existing_method).and_return(5)
|
661
|
+
klass.rspec_verify
|
662
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, existing_method_expectation_error_message)
|
663
|
+
end
|
664
|
+
end
|
665
|
+
end
|
666
|
+
end
|
667
|
+
end
|
668
|
+
|
669
|
+
context "when resetting post-verification" do
|
670
|
+
let(:space) { RSpec::Mocks::Space.new }
|
671
|
+
|
672
|
+
context "existing method" do
|
673
|
+
before(:each) do
|
674
|
+
space.add(klass)
|
675
|
+
end
|
676
|
+
|
677
|
+
context "with stubbing" do
|
678
|
+
context "public methods" do
|
679
|
+
before(:each) do
|
680
|
+
klass.any_instance.stub(:existing_method).and_return(1)
|
681
|
+
expect(klass.method_defined?(:__existing_method_without_any_instance__)).to be_true
|
682
|
+
end
|
683
|
+
|
684
|
+
it "restores the class to its original state after each example when no instance is created" do
|
685
|
+
space.verify_all
|
686
|
+
|
687
|
+
expect(klass.method_defined?(:__existing_method_without_any_instance__)).to be_false
|
688
|
+
expect(klass.new.existing_method).to eq(existing_method_return_value)
|
689
|
+
end
|
690
|
+
|
691
|
+
it "restores the class to its original state after each example when one instance is created" do
|
692
|
+
klass.new.existing_method
|
693
|
+
|
694
|
+
space.verify_all
|
695
|
+
|
696
|
+
expect(klass.method_defined?(:__existing_method_without_any_instance__)).to be_false
|
697
|
+
expect(klass.new.existing_method).to eq(existing_method_return_value)
|
698
|
+
end
|
699
|
+
|
700
|
+
it "restores the class to its original state after each example when more than one instance is created" do
|
701
|
+
klass.new.existing_method
|
702
|
+
klass.new.existing_method
|
703
|
+
|
704
|
+
space.verify_all
|
705
|
+
|
706
|
+
expect(klass.method_defined?(:__existing_method_without_any_instance__)).to be_false
|
707
|
+
expect(klass.new.existing_method).to eq(existing_method_return_value)
|
708
|
+
end
|
709
|
+
end
|
710
|
+
|
711
|
+
context "private methods" do
|
712
|
+
before :each do
|
713
|
+
klass.any_instance.stub(:private_method).and_return(:something)
|
714
|
+
space.verify_all
|
715
|
+
end
|
716
|
+
|
717
|
+
it "cleans up the backed up method" do
|
718
|
+
expect(klass.method_defined?(:__existing_method_without_any_instance__)).to be_false
|
719
|
+
end
|
720
|
+
|
721
|
+
it "restores a stubbed private method after the spec is run" do
|
722
|
+
expect(klass.private_method_defined?(:private_method)).to be_true
|
723
|
+
end
|
724
|
+
|
725
|
+
it "ensures that the restored method behaves as it originally did" do
|
726
|
+
expect(klass.new.send(:private_method)).to eq(:private_method_return_value)
|
727
|
+
end
|
728
|
+
end
|
729
|
+
end
|
730
|
+
|
731
|
+
context "with expectations" do
|
732
|
+
context "private methods" do
|
733
|
+
before :each do
|
734
|
+
klass.any_instance.should_receive(:private_method).and_return(:something)
|
735
|
+
klass.new.private_method
|
736
|
+
space.verify_all
|
737
|
+
end
|
738
|
+
|
739
|
+
it "cleans up the backed up method" do
|
740
|
+
expect(klass.method_defined?(:__existing_method_without_any_instance__)).to be_false
|
741
|
+
end
|
742
|
+
|
743
|
+
it "restores a stubbed private method after the spec is run" do
|
744
|
+
expect(klass.private_method_defined?(:private_method)).to be_true
|
745
|
+
end
|
746
|
+
|
747
|
+
it "ensures that the restored method behaves as it originally did" do
|
748
|
+
expect(klass.new.send(:private_method)).to eq(:private_method_return_value)
|
749
|
+
end
|
750
|
+
end
|
751
|
+
|
752
|
+
context "ensures that the subsequent specs do not see expectations set in previous specs" do
|
753
|
+
context "when the instance created after the expectation is set" do
|
754
|
+
it "first spec" do
|
755
|
+
klass.any_instance.should_receive(:existing_method).and_return(Object.new)
|
756
|
+
klass.new.existing_method
|
757
|
+
end
|
758
|
+
|
759
|
+
it "second spec" do
|
760
|
+
expect(klass.new.existing_method).to eq(existing_method_return_value)
|
761
|
+
end
|
762
|
+
end
|
763
|
+
|
764
|
+
context "when the instance created before the expectation is set" do
|
765
|
+
before :each do
|
766
|
+
@instance = klass.new
|
767
|
+
end
|
768
|
+
|
769
|
+
it "first spec" do
|
770
|
+
klass.any_instance.should_receive(:existing_method).and_return(Object.new)
|
771
|
+
@instance.existing_method
|
772
|
+
end
|
773
|
+
|
774
|
+
it "second spec" do
|
775
|
+
expect(@instance.existing_method).to eq(existing_method_return_value)
|
776
|
+
end
|
777
|
+
end
|
778
|
+
end
|
779
|
+
|
780
|
+
it "ensures that the next spec does not see that expectation" do
|
781
|
+
klass.any_instance.should_receive(:existing_method).and_return(Object.new)
|
782
|
+
klass.new.existing_method
|
783
|
+
space.verify_all
|
784
|
+
|
785
|
+
expect(klass.new.existing_method).to eq(existing_method_return_value)
|
786
|
+
end
|
787
|
+
end
|
788
|
+
end
|
789
|
+
|
790
|
+
context "with multiple calls to any_instance in the same example" do
|
791
|
+
it "does not prevent the change from being rolled back" do
|
792
|
+
klass.any_instance.stub(:existing_method).and_return(false)
|
793
|
+
klass.any_instance.stub(:existing_method).and_return(true)
|
794
|
+
|
795
|
+
klass.rspec_verify
|
796
|
+
expect(klass.new).to respond_to(:existing_method)
|
797
|
+
expect(klass.new.existing_method).to eq(existing_method_return_value)
|
798
|
+
end
|
799
|
+
end
|
800
|
+
|
801
|
+
it "adds an class to the current space when #any_instance is invoked" do
|
802
|
+
klass.any_instance
|
803
|
+
expect(RSpec::Mocks::space.send(:receivers)).to include(klass)
|
804
|
+
end
|
805
|
+
|
806
|
+
it "adds an instance to the current space when stubbed method is invoked" do
|
807
|
+
klass.any_instance.stub(:foo)
|
808
|
+
instance = klass.new
|
809
|
+
instance.foo
|
810
|
+
expect(RSpec::Mocks::space.send(:receivers)).to include(instance)
|
811
|
+
end
|
812
|
+
end
|
813
|
+
|
814
|
+
context 'when used in conjunction with a `dup`' do
|
815
|
+
it "doesn't cause an infinite loop" do
|
816
|
+
Object.any_instance.stub(:some_method)
|
817
|
+
o = Object.new
|
818
|
+
o.some_method
|
819
|
+
expect { o.dup.some_method }.to_not raise_error(SystemStackError)
|
820
|
+
end
|
821
|
+
|
822
|
+
it "doesn't bomb if the object doesn't support `dup`" do
|
823
|
+
klass = Class.new do
|
824
|
+
undef_method :dup
|
825
|
+
end
|
826
|
+
klass.any_instance
|
827
|
+
end
|
828
|
+
|
829
|
+
it "doesn't fail when dup accepts parameters" do
|
830
|
+
klass = Class.new do
|
831
|
+
def dup(funky_option)
|
832
|
+
end
|
833
|
+
end
|
834
|
+
|
835
|
+
klass.any_instance
|
836
|
+
|
837
|
+
expect { klass.new.dup('Dup dup dup') }.to_not raise_error(ArgumentError)
|
838
|
+
end
|
839
|
+
end
|
840
|
+
|
841
|
+
context "when directed at a method defined on a superclass" do
|
842
|
+
let(:sub_klass) { Class.new(klass) }
|
843
|
+
|
844
|
+
it "stubs the method correctly" do
|
845
|
+
klass.any_instance.stub(:existing_method).and_return("foo")
|
846
|
+
expect(sub_klass.new.existing_method).to eq "foo"
|
847
|
+
end
|
848
|
+
|
849
|
+
it "mocks the method correctly" do
|
850
|
+
instance_one = sub_klass.new
|
851
|
+
instance_two = sub_klass.new
|
852
|
+
expect do
|
853
|
+
klass.any_instance.should_receive(:existing_method)
|
854
|
+
instance_one.existing_method
|
855
|
+
instance_two.existing_method
|
856
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, "The message 'existing_method' was received by #{instance_two.inspect} but has already been received by #{instance_one.inspect}")
|
857
|
+
end
|
858
|
+
end
|
859
|
+
|
860
|
+
context "when a class overrides Object#method" do
|
861
|
+
let(:http_request_class) { Struct.new(:method, :uri) }
|
862
|
+
|
863
|
+
it "stubs the method correctly" do
|
864
|
+
http_request_class.any_instance.stub(:existing_method).and_return("foo")
|
865
|
+
expect(http_request_class.new.existing_method).to eq "foo"
|
866
|
+
end
|
867
|
+
|
868
|
+
it "mocks the method correctly" do
|
869
|
+
http_request_class.any_instance.should_receive(:existing_method).and_return("foo")
|
870
|
+
expect(http_request_class.new.existing_method).to eq "foo"
|
871
|
+
end
|
872
|
+
end
|
873
|
+
|
874
|
+
context "when used after the test has finished" do
|
875
|
+
it "restores the original behavior of a stubbed method" do
|
876
|
+
klass.any_instance.stub(:existing_method).and_return(:stubbed_return_value)
|
877
|
+
|
878
|
+
instance = klass.new
|
879
|
+
expect(instance.existing_method).to eq :stubbed_return_value
|
880
|
+
|
881
|
+
RSpec::Mocks.verify
|
882
|
+
|
883
|
+
expect(instance.existing_method).to eq :existing_method_return_value
|
884
|
+
end
|
885
|
+
end
|
886
|
+
end
|
887
|
+
end
|
888
|
+
end
|