syllable_counter 0.0.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/README.md +5 -2
- data/lib/syllable_counter.rb +7 -19
- data/lib/syllable_counter/calculate.rb +28 -0
- data/lib/syllable_counter/english_exceptions.rb +11 -0
- data/lib/syllable_counter/rules.rb +71 -0
- data/lib/syllable_counter/version.rb +1 -1
- data/spec/calculator_spec.rb +27 -0
- data/spec/rules_spec.rb +39 -0
- data/spec/spec_helper.rb +3 -0
- data/spec/syllable_counter_spec.rb +6 -75
- data/syllable_counter.gemspec +2 -2
- 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/build_info/diff-lcs-1.2.4.info +1 -0
- data/vendor/bundle/build_info/rake-10.1.0.info +1 -0
- data/vendor/bundle/build_info/rspec-2.14.1.info +1 -0
- data/vendor/bundle/build_info/rspec-core-2.14.5.info +1 -0
- data/vendor/bundle/build_info/rspec-expectations-2.14.2.info +1 -0
- data/vendor/bundle/build_info/rspec-mocks-2.14.3.info +1 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/.autotest +3 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/.gemtest +0 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/.hoerc +2 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/.rspec +2 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/.travis.yml +22 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/Contributing.rdoc +64 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/Gemfile +20 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/History.rdoc +146 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/License.rdoc +39 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/Manifest.txt +38 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/README.rdoc +85 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/Rakefile +39 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/autotest/discover.rb +1 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/bin/htmldiff +32 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/bin/ldiff +6 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/docs/COPYING.txt +339 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/docs/artistic.txt +127 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff-lcs.rb +3 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs.rb +805 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/array.rb +7 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/block.rb +37 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/callbacks.rb +322 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/change.rb +177 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/htmldiff.rb +149 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/hunk.rb +276 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/internals.rb +301 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/ldiff.rb +195 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/string.rb +5 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/spec/change_spec.rb +65 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/spec/diff_spec.rb +47 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/spec/hunk_spec.rb +72 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/spec/issues_spec.rb +24 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/spec/lcs_spec.rb +54 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/spec/patch_spec.rb +414 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/spec/sdiff_spec.rb +202 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/spec/spec_helper.rb +290 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/spec/traverse_balanced_spec.rb +310 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/spec/traverse_sequences_spec.rb +139 -0
- data/vendor/bundle/gems/rake-10.1.0/.gemtest +0 -0
- data/vendor/bundle/gems/rake-10.1.0/CHANGES +530 -0
- data/vendor/bundle/gems/rake-10.1.0/MIT-LICENSE +21 -0
- data/vendor/bundle/gems/rake-10.1.0/README.rdoc +187 -0
- data/vendor/bundle/gems/rake-10.1.0/Rakefile +375 -0
- data/vendor/bundle/gems/rake-10.1.0/TODO +21 -0
- data/vendor/bundle/gems/rake-10.1.0/bin/rake +33 -0
- data/vendor/bundle/gems/rake-10.1.0/install.rb +80 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake.rb +73 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/alt_system.rb +108 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/application.rb +728 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/backtrace.rb +20 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/clean.rb +55 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/cloneable.rb +16 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/contrib/compositepublisher.rb +21 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/contrib/ftptools.rb +139 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/contrib/publisher.rb +73 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/contrib/rubyforgepublisher.rb +16 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/contrib/sshpublisher.rb +50 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/contrib/sys.rb +2 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/default_loader.rb +10 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/dsl_definition.rb +157 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/early_time.rb +18 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/ext/core.rb +28 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/ext/module.rb +0 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/ext/string.rb +166 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/ext/time.rb +15 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/file_creation_task.rb +24 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/file_list.rb +416 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/file_task.rb +46 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/file_utils.rb +116 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/file_utils_ext.rb +144 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/gempackagetask.rb +2 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/invocation_chain.rb +57 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/invocation_exception_mixin.rb +16 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/linked_list.rb +103 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/loaders/makefile.rb +40 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/multi_task.rb +13 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/name_space.rb +25 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/packagetask.rb +190 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/pathmap.rb +1 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/phony.rb +15 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/private_reader.rb +20 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/promise.rb +99 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/pseudo_status.rb +29 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/rake_module.rb +37 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/rake_test_loader.rb +22 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/rdoctask.rb +2 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/ruby182_test_unit_fix.rb +27 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/runtest.rb +22 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/scope.rb +42 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/task.rb +378 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/task_argument_error.rb +7 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/task_arguments.rb +89 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/task_manager.rb +297 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/tasklib.rb +22 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/testtask.rb +201 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/thread_history_display.rb +48 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/thread_pool.rb +161 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/trace_output.rb +22 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/version.rb +9 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/win32.rb +56 -0
- data/vendor/bundle/gems/rake-10.1.0/test/file_creation.rb +34 -0
- data/vendor/bundle/gems/rake-10.1.0/test/helper.rb +128 -0
- data/vendor/bundle/gems/rake-10.1.0/test/support/rakefile_definitions.rb +444 -0
- data/vendor/bundle/gems/rake-10.1.0/test/support/ruby_runner.rb +33 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_private_reader.rb +42 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake.rb +40 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_application.rb +517 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_application_options.rb +457 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_backtrace.rb +113 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_clean.rb +46 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_definitions.rb +79 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_directory_task.rb +57 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_dsl.rb +40 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_early_time.rb +31 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_extension.rb +59 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_file_creation_task.rb +56 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_file_list.rb +627 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_file_list_path_map.rb +8 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_file_task.rb +122 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_file_utils.rb +309 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_ftp_file.rb +74 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_functional.rb +466 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_invocation_chain.rb +64 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_linked_list.rb +84 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_makefile_loader.rb +46 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_multi_task.rb +58 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_name_space.rb +43 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_package_task.rb +79 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_path_map.rb +168 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_path_map_explode.rb +34 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_path_map_partial.rb +18 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_pseudo_status.rb +21 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_rake_test_loader.rb +20 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_reduce_compat.rb +26 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_require.rb +40 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_rules.rb +362 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_scope.rb +44 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_task.rb +376 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_task_argument_parsing.rb +103 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_task_arguments.rb +121 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_task_lib.rb +9 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_task_manager.rb +158 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_task_manager_argument_resolution.rb +19 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_task_with_arguments.rb +171 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_test_task.rb +119 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_thread_pool.rb +142 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_top_level_functions.rb +71 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_win32.rb +72 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_thread_history_display.rb +101 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_trace_output.rb +52 -0
- data/vendor/bundle/gems/rspec-2.14.1/License.txt +24 -0
- data/vendor/bundle/gems/rspec-2.14.1/README.md +47 -0
- data/vendor/bundle/gems/rspec-2.14.1/lib/rspec.rb +3 -0
- data/vendor/bundle/gems/rspec-2.14.1/lib/rspec/version.rb +5 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/.document +5 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/.yardopts +6 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/Changelog.md +881 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/License.txt +24 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/README.md +261 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/exe/autospec +13 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/exe/rspec +25 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/Autotest.md +38 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/README.md +17 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/Upgrade.md +364 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/README.md +28 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/example_name_option.feature +97 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/exit_status.feature +82 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/format_option.feature +75 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/init.feature +18 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/line_number_appended_to_path.feature +140 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/line_number_option.feature +58 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/order.feature +29 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/pattern_option.feature +49 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/rake_task.feature +122 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/require_option.feature +43 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/ruby.feature +22 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/tag.feature +98 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/warnings_option.feature +29 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/alias_example_to.feature +48 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/backtrace_clean_patterns.feature +102 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/custom_settings.feature +84 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/default_path.feature +38 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/deprecation_stream.feature +58 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/fail_fast.feature +77 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/failure_exit_code.feature +36 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/order_and_seed.feature +3 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/output_stream.feature +24 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/pattern.feature +38 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/profile.feature +220 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/read_options_from_file.feature +90 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/run_all_when_everything_filtered.feature +76 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/show_failures_in_pending_blocks.feature +61 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/treat_symbols_as_metadata_keys_with_true_values.feature +52 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/example_groups/basic_structure.feature +55 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/example_groups/shared_context.feature +74 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/example_groups/shared_examples.feature +294 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/expectation_framework_integration/configure_expectation_framework.feature +102 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/filtering/exclusion_filters.feature +138 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/filtering/if_and_unless.feature +168 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/filtering/inclusion_filters.feature +105 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/formatters/configurable_colors.feature +31 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/formatters/custom_formatter.feature +36 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/formatters/json_formatter.feature +30 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/formatters/text_formatter.feature +46 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/helper_methods/arbitrary_methods.feature +40 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/helper_methods/let.feature +50 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/helper_methods/modules.feature +149 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/hooks/around_hooks.feature +343 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/hooks/before_and_after_hooks.feature +427 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/hooks/filtering.feature +234 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/metadata/current_example.feature +17 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/metadata/described_class.feature +17 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/metadata/user_defined.feature +113 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/mock_framework_integration/use_any_framework.feature +106 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/mock_framework_integration/use_flexmock.feature +96 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/mock_framework_integration/use_mocha.feature +97 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/mock_framework_integration/use_rr.feature +98 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/mock_framework_integration/use_rspec.feature +97 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/pending/pending_examples.feature +229 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/spec_files/arbitrary_file_suffix.feature +13 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/step_definitions/additional_cli_steps.rb +49 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/subject/attribute_of_subject.feature +124 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/subject/explicit_subject.feature +101 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/subject/implicit_receiver.feature +29 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/subject/implicit_subject.feature +63 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/support/env.rb +14 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/support/rubinius.rb +6 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/autotest/discover.rb +1 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/autotest/rspec2.rb +73 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/autorun.rb +2 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core.rb +169 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/backtrace_cleaner.rb +46 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/backward_compatibility.rb +55 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/command_line.rb +36 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/configuration.rb +1174 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/configuration_options.rb +156 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/deprecation.rb +31 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/drb_command_line.rb +26 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/drb_options.rb +87 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/dsl.rb +26 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/example.rb +331 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/example_group.rb +479 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/extensions/instance_eval_with_args.rb +44 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/extensions/kernel.rb +9 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/extensions/module_eval_with_args.rb +38 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/extensions/ordered.rb +27 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/filter_manager.rb +203 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters.rb +55 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/base_formatter.rb +246 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/base_text_formatter.rb +329 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/deprecation_formatter.rb +39 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/documentation_formatter.rb +67 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/helpers.rb +110 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/html_formatter.rb +155 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/html_printer.rb +408 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/json_formatter.rb +70 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/progress_formatter.rb +32 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/snippet_extractor.rb +92 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/text_mate_formatter.rb +34 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/hooks.rb +519 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/memoized_helpers.rb +514 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/metadata.rb +299 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/metadata_hash_builder.rb +97 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/mocking/with_absolutely_nothing.rb +11 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/mocking/with_flexmock.rb +27 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/mocking/with_mocha.rb +52 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/mocking/with_rr.rb +27 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/mocking/with_rspec.rb +27 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/option_parser.rb +219 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/pending.rb +109 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/project_initializer.rb +86 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/rake_task.rb +206 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/reporter.rb +132 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/ruby_project.rb +44 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/runner.rb +87 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/shared_context.rb +55 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/shared_example_group.rb +185 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/shared_example_group/collection.rb +43 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/version.rb +8 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/world.rb +127 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/autotest/discover_spec.rb +19 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/autotest/failed_results_re_spec.rb +45 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/autotest/rspec_spec.rb +133 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/command_line/order_spec.rb +204 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/backtrace_cleaner_spec.rb +68 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/command_line_spec.rb +108 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/command_line_spec_output.txt +0 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/configuration_options_spec.rb +417 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/configuration_spec.rb +1561 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/deprecation_spec.rb +46 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/deprecations_spec.rb +73 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/drb_command_line_spec.rb +102 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/drb_options_spec.rb +193 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/dsl_spec.rb +25 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/example_group_spec.rb +1187 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/example_spec.rb +439 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/filter_manager_spec.rb +246 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/base_formatter_spec.rb +108 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/base_text_formatter_spec.rb +494 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/deprecation_formatter_spec.rb +96 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/documentation_formatter_spec.rb +88 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/helpers_spec.rb +94 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-1.8.7-jruby.html +404 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-1.8.7-rbx.html +477 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-1.8.7.html +414 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-1.9.2.html +425 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-1.9.3-jruby.html +404 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-1.9.3-rbx.html +477 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-1.9.3.html +425 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-2.0.0.html +425 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatter_spec.rb +95 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/json_formatter_spec.rb +115 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/progress_formatter_spec.rb +30 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/snippet_extractor_spec.rb +26 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-1.8.7-jruby.html +395 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-1.8.7-rbx.html +477 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-1.8.7.html +414 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-1.9.2.html +425 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-1.9.3-jruby.html +404 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-1.9.3-rbx.html +477 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-1.9.3.html +425 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-2.0.0.html +425 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatter_spec.rb +96 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/hooks_filtering_spec.rb +227 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/hooks_spec.rb +267 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/kernel_extensions_spec.rb +9 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/memoized_helpers_spec.rb +688 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/metadata_spec.rb +491 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/option_parser_spec.rb +242 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/pending_example_spec.rb +220 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/project_initializer_spec.rb +130 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/rake_task_spec.rb +181 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/reporter_spec.rb +141 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/resources/a_bar.rb +0 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/resources/a_foo.rb +0 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/resources/a_spec.rb +1 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/resources/custom_example_group_runner.rb +14 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/resources/formatter_specs.rb +60 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/resources/utf8_encoded.rb +8 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/rspec_matchers_spec.rb +45 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/ruby_project_spec.rb +26 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/runner_spec.rb +82 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/shared_context_spec.rb +114 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/shared_example_group/collection_spec.rb +70 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/shared_example_group_spec.rb +120 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/world_spec.rb +142 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core_spec.rb +74 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/spec_helper.rb +132 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/config_options_helper.rb +15 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/helper_methods.rb +36 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/isolate_load_path_mutation.rb +6 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/isolated_directory.rb +10 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/isolated_home_directory.rb +16 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/matchers.rb +65 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/sandboxed_mock_space.rb +100 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/shared_example_groups.rb +41 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/spec_files.rb +44 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/.document +5 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/.yardopts +6 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/Changelog.md +399 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/License.txt +23 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/README.md +184 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/README.md +48 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/Upgrade.md +53 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/README.md +90 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/be.feature +175 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/be_within.feature +48 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/cover.feature +47 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/end_with.feature +48 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/equality.feature +139 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/exist.feature +45 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/expect_change.feature +59 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/expect_error.feature +144 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/have.feature +109 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/include.feature +174 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/match.feature +52 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/operators.feature +227 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/predicates.feature +137 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/respond_to.feature +84 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/satisfy.feature +33 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/start_with.feature +48 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/throw_symbol.feature +91 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/types.feature +116 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/yield.feature +161 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/custom_matchers/access_running_example.feature +53 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/custom_matchers/define_diffable_matcher.feature +27 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/custom_matchers/define_matcher.feature +368 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/custom_matchers/define_matcher_outside_rspec.feature +38 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/custom_matchers/define_matcher_with_fluent_interface.feature +24 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/customized_message.feature +22 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/diffing.feature +85 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/implicit_docstrings.feature +52 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/step_definitions/additional_cli_steps.rb +22 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/support/env.rb +14 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/support/rubinius.rb +6 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/syntax_configuration.feature +71 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/test_frameworks/test_unit.feature +44 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec-expectations.rb +1 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations.rb +47 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/deprecation.rb +17 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/differ.rb +140 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/errors.rb +9 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/expectation_target.rb +87 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/extensions.rb +2 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/extensions/array.rb +9 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/extensions/object.rb +29 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/fail_with.rb +79 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/handler.rb +68 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/syntax.rb +164 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/version.rb +9 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers.rb +697 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/be_close.rb +9 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in.rb +39 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/base_matcher.rb +68 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/be.rb +197 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/be_instance_of.rb +15 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/be_kind_of.rb +11 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/be_within.rb +55 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/change.rb +141 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/cover.rb +21 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/eq.rb +22 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/eql.rb +23 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/equal.rb +48 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/exist.rb +26 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/has.rb +48 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/have.rb +124 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/include.rb +61 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/match.rb +12 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/match_array.rb +51 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/raise_error.rb +123 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/respond_to.rb +74 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/satisfy.rb +30 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/start_and_end_with.rb +48 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/throw_symbol.rb +94 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/yield.rb +296 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/compatibility.rb +14 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/configuration.rb +108 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/dsl.rb +24 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/extensions/instance_eval_with_args.rb +39 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/generated_descriptions.rb +35 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/matcher.rb +300 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/method_missing.rb +12 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/operator_matcher.rb +109 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/pretty.rb +70 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/test_unit_integration.rb +11 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/expectations/differ_spec.rb +203 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/expectations/expectation_target_spec.rb +82 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/expectations/extensions/kernel_spec.rb +67 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/expectations/fail_with_spec.rb +114 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/expectations/handler_spec.rb +227 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/expectations/syntax_spec.rb +139 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/base_matcher_spec.rb +62 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/be_close_spec.rb +22 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/be_instance_of_spec.rb +63 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/be_kind_of_spec.rb +41 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/be_spec.rb +522 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/be_within_spec.rb +137 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/change_spec.rb +567 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/configuration_spec.rb +206 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/cover_spec.rb +69 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/description_generation_spec.rb +190 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/dsl_spec.rb +57 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/eq_spec.rb +60 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/eql_spec.rb +41 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/equal_spec.rb +78 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/exist_spec.rb +124 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/has_spec.rb +122 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/have_spec.rb +455 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/include_matcher_integration_spec.rb +30 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/include_spec.rb +531 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/match_array_spec.rb +194 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/match_spec.rb +61 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/matcher_spec.rb +471 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/matchers_spec.rb +37 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/method_missing_spec.rb +28 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/operator_matcher_spec.rb +223 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/raise_error_spec.rb +485 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/respond_to_spec.rb +292 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/satisfy_spec.rb +44 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/start_with_end_with_spec.rb +186 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/throw_symbol_spec.rb +116 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/yield_spec.rb +514 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/spec_helper.rb +54 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/support/classes.rb +56 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/support/in_sub_process.rb +38 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/support/matchers.rb +22 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/support/ruby_version.rb +10 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/support/shared_examples.rb +13 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/.document +5 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/.yardopts +6 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/Changelog.md +410 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/License.txt +23 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/README.md +315 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/README.md +67 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/Scope.md +17 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/Upgrade.md +22 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/argument_matchers/README.md +27 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/argument_matchers/explicit.feature +59 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/argument_matchers/general_matchers.feature +85 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/argument_matchers/type_matchers.feature +26 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/README.md +73 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/allow_any_instance_of.feature +26 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/any_instance.feature +21 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/block_local_expectations.feature.pending +55 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/call_original.feature +24 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/expect_any_instance_of.feature +27 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/expect_message_using_expect.feature +107 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/expect_message_using_should_receive.feature +118 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/receive_counts.feature +209 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/warn_when_expectation_is_set_on_nil.feature +50 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/README.md +73 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/any_instance.feature +136 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/as_null_object.feature +40 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/simple_return_value_with_allow.feature +44 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/simple_return_value_with_stub.feature +64 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/stub_chain.feature +51 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/stub_implementation.feature +48 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/to_ary.feature +51 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/mutating_constants/README.md +82 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/mutating_constants/hiding_defined_constant.feature +64 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/mutating_constants/stub_defined_constant.feature +79 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/mutating_constants/stub_undefined_constant.feature +50 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/outside_rspec/configuration.feature +62 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/outside_rspec/standalone.feature +33 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/spies/spy_partial_mock_method.feature +34 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/spies/spy_pure_mock_method.feature +76 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/spies/spy_unstubbed_method.feature +18 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/step_definitions/additional_cli_steps.rb +11 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/support/env.rb +13 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/support/rubinius.rb +6 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/test_frameworks/test_unit.feature +43 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks.rb +92 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/any_instance/chain.rb +93 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/any_instance/expectation_chain.rb +42 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/any_instance/message_chains.rb +60 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/any_instance/recorder.rb +206 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/any_instance/stub_chain.rb +38 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/any_instance/stub_chain_chain.rb +23 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/argument_list_matcher.rb +97 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/argument_matchers.rb +238 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/configuration.rb +55 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/deprecation.rb +18 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/error_generator.rb +179 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/errors.rb +12 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/example_methods.rb +156 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/extensions/instance_exec.rb +34 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/extensions/marshal.rb +17 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/framework.rb +34 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/instance_method_stasher.rb +94 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/matchers/have_received.rb +93 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/matchers/receive.rb +96 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/message_expectation.rb +583 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/method_double.rb +265 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/mock.rb +7 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/mutate_const.rb +403 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/order_group.rb +40 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/proxy.rb +216 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/proxy_for_nil.rb +37 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/space.rb +87 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/standalone.rb +3 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/stub_chain.rb +51 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/syntax.rb +349 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/targets.rb +69 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/test_double.rb +135 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/version.rb +7 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/spec/mocks.rb +4 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/and_call_original_spec.rb +243 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/and_yield_spec.rb +127 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/any_instance/message_chains_spec.rb +40 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/any_instance_spec.rb +963 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/any_number_of_times_spec.rb +36 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/argument_expectation_spec.rb +32 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/at_least_spec.rb +151 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/at_most_spec.rb +90 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/block_return_value_spec.rb +88 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_10260_spec.rb +8 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_10263_spec.rb +27 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_11545_spec.rb +32 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_496_spec.rb +17 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_600_spec.rb +22 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_7611_spec.rb +16 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_8165_spec.rb +31 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_830_spec.rb +21 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_957_spec.rb +22 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/combining_implementation_instructions_spec.rb +205 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/configuration_spec.rb +150 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/double_spec.rb +24 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/extensions/marshal_spec.rb +54 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/failing_argument_matchers_spec.rb +110 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/hash_excluding_matcher_spec.rb +67 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/hash_including_matcher_spec.rb +90 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/instance_method_stasher_spec.rb +58 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/matchers/have_received_spec.rb +266 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/matchers/receive_spec.rb +328 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/methods_spec.rb +27 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/mock_ordering_spec.rb +103 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/mock_space_spec.rb +113 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/mock_spec.rb +798 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/multiple_return_value_spec.rb +132 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/mutate_const_spec.rb +501 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/nil_expectation_warning_spec.rb +68 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/null_object_mock_spec.rb +123 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/once_counts_spec.rb +52 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/options_hash_spec.rb +35 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/partial_mock_spec.rb +205 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/partial_mock_using_mocks_directly_spec.rb +95 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/passing_argument_matchers_spec.rb +142 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/precise_counts_spec.rb +68 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/record_messages_spec.rb +26 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/serialization_spec.rb +89 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/stash_spec.rb +46 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/stub_chain_spec.rb +154 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/stub_implementation_spec.rb +81 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/stub_spec.rb +353 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/stubbed_message_expectations_spec.rb +58 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/syntax_agnostic_message_matchers_spec.rb +81 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/test_double_spec.rb +67 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/to_ary_spec.rb +54 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/twice_counts_spec.rb +66 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks_spec.rb +65 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/spec_helper.rb +60 -0
- data/vendor/bundle/specifications/diff-lcs-1.2.4.gemspec +64 -0
- data/vendor/bundle/specifications/rake-10.1.0.gemspec +35 -0
- data/vendor/bundle/specifications/rspec-2.14.1.gemspec +39 -0
- data/vendor/bundle/specifications/rspec-core-2.14.5.gemspec +58 -0
- data/vendor/bundle/specifications/rspec-expectations-2.14.2.gemspec +40 -0
- data/vendor/bundle/specifications/rspec-mocks-2.14.3.gemspec +37 -0
- metadata +657 -11
@@ -0,0 +1,113 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'rspec/mocks'
|
3
|
+
|
4
|
+
module RSpec
|
5
|
+
module Mocks
|
6
|
+
describe Space do
|
7
|
+
let(:space) { RSpec::Mocks::Space.new }
|
8
|
+
let(:dbl_1) { Object.new }
|
9
|
+
let(:dbl_2) { Object.new }
|
10
|
+
|
11
|
+
before do
|
12
|
+
space.ensure_registered(dbl_1)
|
13
|
+
space.ensure_registered(dbl_2)
|
14
|
+
end
|
15
|
+
|
16
|
+
it "verifies all mocks within" do
|
17
|
+
verifies = []
|
18
|
+
|
19
|
+
space.proxy_for(dbl_1).stub(:verify) { verifies << :dbl_1 }
|
20
|
+
space.proxy_for(dbl_2).stub(:verify) { verifies << :dbl_2 }
|
21
|
+
|
22
|
+
space.verify_all
|
23
|
+
|
24
|
+
expect(verifies).to match_array([:dbl_1, :dbl_2])
|
25
|
+
end
|
26
|
+
|
27
|
+
def define_singleton_method_on_recorder_for(klass, name, &block)
|
28
|
+
recorder = space.any_instance_recorder_for(klass)
|
29
|
+
(class << recorder; self; end).send(:define_method, name, &block)
|
30
|
+
end
|
31
|
+
|
32
|
+
it 'verifies all any_instance recorders within' do
|
33
|
+
klass_1, klass_2 = Class.new, Class.new
|
34
|
+
|
35
|
+
verifies = []
|
36
|
+
|
37
|
+
# We can't `stub` a method on the recorder because it defines its own `stub`...
|
38
|
+
define_singleton_method_on_recorder_for(klass_1, :verify) { verifies << :klass_1 }
|
39
|
+
define_singleton_method_on_recorder_for(klass_2, :verify) { verifies << :klass_2 }
|
40
|
+
|
41
|
+
space.verify_all
|
42
|
+
|
43
|
+
expect(verifies).to match_array([:klass_1, :klass_2])
|
44
|
+
end
|
45
|
+
|
46
|
+
it "resets all mocks within" do
|
47
|
+
resets = []
|
48
|
+
|
49
|
+
space.proxy_for(dbl_1).stub(:reset) { resets << :dbl_1 }
|
50
|
+
space.proxy_for(dbl_2).stub(:reset) { resets << :dbl_2 }
|
51
|
+
|
52
|
+
space.reset_all
|
53
|
+
|
54
|
+
expect(resets).to match_array([:dbl_1, :dbl_2])
|
55
|
+
end
|
56
|
+
|
57
|
+
it "does not leak mock proxies between examples" do
|
58
|
+
expect {
|
59
|
+
space.reset_all
|
60
|
+
}.to change { space.proxies.size }.to(0)
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'does not leak any instance recorders between examples' do
|
64
|
+
space.any_instance_recorder_for(Class.new)
|
65
|
+
expect {
|
66
|
+
space.reset_all
|
67
|
+
}.to change { space.any_instance_recorders.size }.to(0)
|
68
|
+
end
|
69
|
+
|
70
|
+
it "resets the ordering" do
|
71
|
+
space.expectation_ordering.register :some_expectation
|
72
|
+
|
73
|
+
expect {
|
74
|
+
space.reset_all
|
75
|
+
}.to change { space.expectation_ordering.empty? }.from(false).to(true)
|
76
|
+
end
|
77
|
+
|
78
|
+
it "only adds an instance once" do
|
79
|
+
m1 = double("mock1")
|
80
|
+
|
81
|
+
expect {
|
82
|
+
space.ensure_registered(m1)
|
83
|
+
}.to change { space.proxies }
|
84
|
+
|
85
|
+
expect {
|
86
|
+
space.ensure_registered(m1)
|
87
|
+
}.not_to change { space.proxies }
|
88
|
+
end
|
89
|
+
|
90
|
+
it 'returns a consistent any_instance_recorder for a given class' do
|
91
|
+
klass_1, klass_2 = Class.new, Class.new
|
92
|
+
|
93
|
+
r1 = space.any_instance_recorder_for(klass_1)
|
94
|
+
r2 = space.any_instance_recorder_for(klass_1)
|
95
|
+
r3 = space.any_instance_recorder_for(klass_2)
|
96
|
+
|
97
|
+
expect(r1).to be(r2)
|
98
|
+
expect(r1).not_to be(r3)
|
99
|
+
end
|
100
|
+
|
101
|
+
it 'removes an any_instance_recorder when requested' do
|
102
|
+
klass = Class.new
|
103
|
+
|
104
|
+
space.any_instance_recorder_for(klass)
|
105
|
+
|
106
|
+
expect {
|
107
|
+
space.remove_any_instance_recorder_for(klass)
|
108
|
+
}.to change { space.any_instance_recorders.size }.by(-1)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
@@ -0,0 +1,798 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module RSpec
|
4
|
+
module Mocks
|
5
|
+
describe Mock do
|
6
|
+
before(:each) { @double = double("test double") }
|
7
|
+
after(:each) { reset @double }
|
8
|
+
|
9
|
+
it "has method_missing as private" do
|
10
|
+
expect(RSpec::Mocks::Mock.private_instance_methods).to include_method(:method_missing)
|
11
|
+
end
|
12
|
+
|
13
|
+
it "does not respond_to? method_missing (because it's private)" do
|
14
|
+
expect(RSpec::Mocks::Mock.new).not_to respond_to(:method_missing)
|
15
|
+
end
|
16
|
+
|
17
|
+
it "reports line number of expectation of unreceived message" do
|
18
|
+
expected_error_line = __LINE__; @double.should_receive(:wont_happen).with("x", 3)
|
19
|
+
begin
|
20
|
+
verify @double
|
21
|
+
violated
|
22
|
+
rescue RSpec::Mocks::MockExpectationError => e
|
23
|
+
# NOTE - this regexp ended w/ $, but jruby adds extra info at the end of the line
|
24
|
+
expect(e.backtrace[0]).to match(/#{File.basename(__FILE__)}:#{expected_error_line}/)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
it "reports line number of expectation of unreceived message after #should_receive after similar stub" do
|
29
|
+
@double.stub(:wont_happen)
|
30
|
+
expected_error_line = __LINE__; @double.should_receive(:wont_happen).with("x", 3)
|
31
|
+
begin
|
32
|
+
verify @double
|
33
|
+
violated
|
34
|
+
rescue RSpec::Mocks::MockExpectationError => e
|
35
|
+
# NOTE - this regexp ended w/ $, but jruby adds extra info at the end of the line
|
36
|
+
expect(e.backtrace[0]).to match(/#{File.basename(__FILE__)}:#{expected_error_line}/)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
it "passes when not receiving message specified as not to be received" do
|
41
|
+
@double.should_not_receive(:not_expected)
|
42
|
+
verify @double
|
43
|
+
end
|
44
|
+
|
45
|
+
it "prevents confusing double-negative expressions involving `never`" do
|
46
|
+
expect {
|
47
|
+
@double.should_not_receive(:not_expected).never
|
48
|
+
}.to raise_error(/trying to negate it again/)
|
49
|
+
end
|
50
|
+
|
51
|
+
def expect_and_return_warning
|
52
|
+
expect(RSpec).to receive(:deprecate).with(/`and_return` on a negative message expectation/)
|
53
|
+
end
|
54
|
+
|
55
|
+
it "warns when `should_not_receive().and_return` is used" do
|
56
|
+
expect_and_return_warning
|
57
|
+
@double.should_not_receive(:foo).and_return(1)
|
58
|
+
end
|
59
|
+
|
60
|
+
it "warns when `should_receive().never.and_return` is used" do
|
61
|
+
expect_and_return_warning
|
62
|
+
@double.should_receive(:foo).never.and_return(1)
|
63
|
+
end
|
64
|
+
|
65
|
+
it "warns when `expect().not_to receive().and_return` is used" do
|
66
|
+
expect_and_return_warning
|
67
|
+
expect(@double).not_to receive(:foo).and_return(1)
|
68
|
+
end
|
69
|
+
|
70
|
+
it "warns when `expect().to receive().never.and_return` is used" do
|
71
|
+
expect_and_return_warning
|
72
|
+
expect(@double).to receive(:foo).never.and_return(1)
|
73
|
+
end
|
74
|
+
|
75
|
+
it "passes when receiving message specified as not to be received with different args" do
|
76
|
+
@double.should_not_receive(:message).with("unwanted text")
|
77
|
+
@double.should_receive(:message).with("other text")
|
78
|
+
@double.message "other text"
|
79
|
+
verify @double
|
80
|
+
end
|
81
|
+
|
82
|
+
it "fails when receiving message specified as not to be received" do
|
83
|
+
@double.should_not_receive(:not_expected)
|
84
|
+
expect {
|
85
|
+
@double.not_expected
|
86
|
+
violated
|
87
|
+
}.to raise_error(
|
88
|
+
RSpec::Mocks::MockExpectationError,
|
89
|
+
%Q|(Double "test double").not_expected(no args)\n expected: 0 times with any arguments\n received: 1 time|
|
90
|
+
)
|
91
|
+
end
|
92
|
+
|
93
|
+
it "fails when receiving message specified as not to be received with args" do
|
94
|
+
@double.should_not_receive(:not_expected).with("unexpected text")
|
95
|
+
expect {
|
96
|
+
@double.not_expected("unexpected text")
|
97
|
+
violated
|
98
|
+
}.to raise_error(
|
99
|
+
RSpec::Mocks::MockExpectationError,
|
100
|
+
%Q|(Double "test double").not_expected("unexpected text")\n expected: 0 times with arguments: ("unexpected text")\n received: 1 time with arguments: ("unexpected text")|
|
101
|
+
)
|
102
|
+
end
|
103
|
+
|
104
|
+
it "fails when array arguments do not match" do
|
105
|
+
@double.should_not_receive(:not_expected).with(["do not want"])
|
106
|
+
expect {
|
107
|
+
@double.not_expected(["do not want"])
|
108
|
+
violated
|
109
|
+
}.to raise_error(
|
110
|
+
RSpec::Mocks::MockExpectationError,
|
111
|
+
%Q|(Double "test double").not_expected(["do not want"])\n expected: 0 times with arguments: (["do not want"])\n received: 1 time with arguments: (["do not want"])|
|
112
|
+
)
|
113
|
+
end
|
114
|
+
|
115
|
+
it "passes when receiving message specified as not to be received with wrong args" do
|
116
|
+
@double.should_not_receive(:not_expected).with("unexpected text")
|
117
|
+
@double.not_expected "really unexpected text"
|
118
|
+
verify @double
|
119
|
+
|
120
|
+
@double.should_receive(:not_expected).with("unexpected text").never
|
121
|
+
@double.not_expected "really unexpected text"
|
122
|
+
verify @double
|
123
|
+
end
|
124
|
+
|
125
|
+
it "allows block to calculate return values" do
|
126
|
+
@double.should_receive(:something).with("a","b","c").and_return { |a,b,c| c+b+a }
|
127
|
+
expect(@double.something("a","b","c")).to eq "cba"
|
128
|
+
verify @double
|
129
|
+
end
|
130
|
+
|
131
|
+
it "allows parameter as return value" do
|
132
|
+
@double.should_receive(:something).with("a","b","c").and_return("booh")
|
133
|
+
expect(@double.something("a","b","c")).to eq "booh"
|
134
|
+
verify @double
|
135
|
+
end
|
136
|
+
|
137
|
+
it "returns the previously stubbed value if no return value is set" do
|
138
|
+
@double.stub(:something).with("a","b","c").and_return(:stubbed_value)
|
139
|
+
@double.should_receive(:something).with("a","b","c")
|
140
|
+
expect(@double.something("a","b","c")).to eq :stubbed_value
|
141
|
+
verify @double
|
142
|
+
end
|
143
|
+
|
144
|
+
it "returns nil if no return value is set and there is no previously stubbed value" do
|
145
|
+
@double.should_receive(:something).with("a","b","c")
|
146
|
+
expect(@double.something("a","b","c")).to be_nil
|
147
|
+
verify @double
|
148
|
+
end
|
149
|
+
|
150
|
+
it "raises exception if args don't match when method called" do
|
151
|
+
@double.should_receive(:something).with("a","b","c").and_return("booh")
|
152
|
+
expect {
|
153
|
+
@double.something("a","d","c")
|
154
|
+
violated
|
155
|
+
}.to raise_error(RSpec::Mocks::MockExpectationError, "Double \"test double\" received :something with unexpected arguments\n expected: (\"a\", \"b\", \"c\")\n got: (\"a\", \"d\", \"c\")")
|
156
|
+
end
|
157
|
+
|
158
|
+
describe "even when a similar expectation with different arguments exist" do
|
159
|
+
it "raises exception if args don't match when method called, correctly reporting the offending arguments" do
|
160
|
+
@double.should_receive(:something).with("a","b","c").once
|
161
|
+
@double.should_receive(:something).with("z","x","c").once
|
162
|
+
expect {
|
163
|
+
@double.something("a","b","c")
|
164
|
+
@double.something("z","x","g")
|
165
|
+
}.to raise_error(RSpec::Mocks::MockExpectationError, "Double \"test double\" received :something with unexpected arguments\n expected: (\"z\", \"x\", \"c\")\n got: (\"z\", \"x\", \"g\")")
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
it "raises exception if args don't match when method called even when the method is stubbed" do
|
170
|
+
@double.stub(:something)
|
171
|
+
@double.should_receive(:something).with("a","b","c")
|
172
|
+
expect {
|
173
|
+
@double.something("a","d","c")
|
174
|
+
verify @double
|
175
|
+
}.to raise_error(RSpec::Mocks::MockExpectationError, "Double \"test double\" received :something with unexpected arguments\n expected: (\"a\", \"b\", \"c\")\n got: (\"a\", \"d\", \"c\")")
|
176
|
+
end
|
177
|
+
|
178
|
+
it "raises exception if args don't match when method called even when using null_object" do
|
179
|
+
@double = double("test double").as_null_object
|
180
|
+
@double.should_receive(:something).with("a","b","c")
|
181
|
+
expect {
|
182
|
+
@double.something("a","d","c")
|
183
|
+
verify @double
|
184
|
+
}.to raise_error(RSpec::Mocks::MockExpectationError, "Double \"test double\" received :something with unexpected arguments\n expected: (\"a\", \"b\", \"c\")\n got: (\"a\", \"d\", \"c\")")
|
185
|
+
end
|
186
|
+
|
187
|
+
describe 'with a method that has a default argument' do
|
188
|
+
it "raises an exception if the arguments don't match when the method is called, correctly reporting the offending arguments" do
|
189
|
+
def @double.method_with_default_argument(arg={}); end
|
190
|
+
@double.should_receive(:method_with_default_argument).with({})
|
191
|
+
|
192
|
+
expect {
|
193
|
+
@double.method_with_default_argument(nil)
|
194
|
+
verify @double
|
195
|
+
}.to raise_error(RSpec::Mocks::MockExpectationError, "Double \"test double\" received :method_with_default_argument with unexpected arguments\n expected: ({})\n got: (nil)")
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
it "fails if unexpected method called" do
|
200
|
+
expect {
|
201
|
+
@double.something("a","b","c")
|
202
|
+
violated
|
203
|
+
}.to raise_error(RSpec::Mocks::MockExpectationError, "Double \"test double\" received unexpected message :something with (\"a\", \"b\", \"c\")")
|
204
|
+
end
|
205
|
+
|
206
|
+
it "uses block for expectation if provided" do
|
207
|
+
@double.should_receive(:something) do | a, b |
|
208
|
+
expect(a).to eq "a"
|
209
|
+
expect(b).to eq "b"
|
210
|
+
"booh"
|
211
|
+
end
|
212
|
+
expect(@double.something("a", "b")).to eq "booh"
|
213
|
+
verify @double
|
214
|
+
end
|
215
|
+
|
216
|
+
it "fails if expectation block fails" do
|
217
|
+
@double.should_receive(:something) do |bool|
|
218
|
+
expect(bool).to be_true
|
219
|
+
end
|
220
|
+
|
221
|
+
expect {
|
222
|
+
@double.something false
|
223
|
+
}.to raise_error(RSpec::Expectations::ExpectationNotMetError)
|
224
|
+
end
|
225
|
+
|
226
|
+
it "is wrappable in an array" do
|
227
|
+
expect( Array(@double) ).to eq([@double])
|
228
|
+
end
|
229
|
+
|
230
|
+
it "is wrappable in an array when a null object" do
|
231
|
+
expect( Array(@double.as_null_object) ).to eq [@double]
|
232
|
+
end
|
233
|
+
|
234
|
+
it "responds to to_ary as a null object" do
|
235
|
+
expect(@double.as_null_object.to_ary).to eq nil
|
236
|
+
end
|
237
|
+
|
238
|
+
it "responds to to_a as a null object" do
|
239
|
+
if RUBY_VERSION.to_f > 1.8
|
240
|
+
expect(@double.as_null_object.to_a).to eq nil
|
241
|
+
else
|
242
|
+
expect(@double.as_null_object.to_a).to eq [@double]
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
it "passes proc to expectation block without an argument" do
|
247
|
+
@double.should_receive(:foo) { |&block| expect(block.call).to eq(:bar) }
|
248
|
+
@double.foo { :bar }
|
249
|
+
end
|
250
|
+
|
251
|
+
context "with Ruby > 1.8.6", :unless => RUBY_VERSION.to_s == '1.8.6' do
|
252
|
+
it "passes proc to expectation block without an argument" do
|
253
|
+
# We eval this because Ruby 1.8.6's syntax parser barfs on { |&block| ... }
|
254
|
+
# and prevents the entire spec suite from running.
|
255
|
+
eval("@double.should_receive(:foo) {|&block| expect(block.call).to eq(:bar)}")
|
256
|
+
@double.foo { :bar }
|
257
|
+
end
|
258
|
+
|
259
|
+
it "passes proc to expectation block with an argument" do
|
260
|
+
eval("@double.should_receive(:foo) {|arg, &block| expect(block.call).to eq(:bar)}")
|
261
|
+
@double.foo(:arg) { :bar }
|
262
|
+
end
|
263
|
+
|
264
|
+
it "passes proc to stub block without an argurment" do
|
265
|
+
eval("@double.stub(:foo) {|&block| expect(block.call).to eq(:bar)}")
|
266
|
+
@double.foo { :bar }
|
267
|
+
end
|
268
|
+
|
269
|
+
it "passes proc to stub block with an argument" do
|
270
|
+
eval("@double.stub(:foo) {|arg, &block| expect(block.call).to eq(:bar)}")
|
271
|
+
@double.foo(:arg) { :bar }
|
272
|
+
end
|
273
|
+
end
|
274
|
+
|
275
|
+
it "fails right away when method defined as never is received" do
|
276
|
+
@double.should_receive(:not_expected).never
|
277
|
+
expect { @double.not_expected }.
|
278
|
+
to raise_error(RSpec::Mocks::MockExpectationError,
|
279
|
+
%Q|(Double "test double").not_expected(no args)\n expected: 0 times with any arguments\n received: 1 time|
|
280
|
+
)
|
281
|
+
end
|
282
|
+
|
283
|
+
it "raises RuntimeError by default" do
|
284
|
+
@double.should_receive(:something).and_raise
|
285
|
+
expect { @double.something }.to raise_error(RuntimeError)
|
286
|
+
end
|
287
|
+
|
288
|
+
it "raises RuntimeError with a message by default" do
|
289
|
+
@double.should_receive(:something).and_raise("error message")
|
290
|
+
expect { @double.something }.to raise_error(RuntimeError, "error message")
|
291
|
+
end
|
292
|
+
|
293
|
+
it "raises an exception of a given type without an error message" do
|
294
|
+
@double.should_receive(:something).and_raise(StandardError)
|
295
|
+
expect { @double.something }.to raise_error(StandardError)
|
296
|
+
end
|
297
|
+
|
298
|
+
it "raises an exception of a given type with a message" do
|
299
|
+
@double.should_receive(:something).and_raise(RuntimeError, "error message")
|
300
|
+
expect { @double.something }.to raise_error(RuntimeError, "error message")
|
301
|
+
end
|
302
|
+
|
303
|
+
it "raises a given instance of an exception" do
|
304
|
+
@double.should_receive(:something).and_raise(RuntimeError.new("error message"))
|
305
|
+
expect { @double.something }.to raise_error(RuntimeError, "error message")
|
306
|
+
end
|
307
|
+
|
308
|
+
class OutOfGas < StandardError
|
309
|
+
attr_reader :amount, :units
|
310
|
+
def initialize(amount, units)
|
311
|
+
@amount = amount
|
312
|
+
@units = units
|
313
|
+
end
|
314
|
+
end
|
315
|
+
|
316
|
+
it "raises a given instance of an exception with arguments other than the standard 'message'" do
|
317
|
+
@double.should_receive(:something).and_raise(OutOfGas.new(2, :oz))
|
318
|
+
|
319
|
+
begin
|
320
|
+
@double.something
|
321
|
+
fail "OutOfGas was not raised"
|
322
|
+
rescue OutOfGas => e
|
323
|
+
expect(e.amount).to eq 2
|
324
|
+
expect(e.units).to eq :oz
|
325
|
+
end
|
326
|
+
end
|
327
|
+
|
328
|
+
it "does not raise when told to if args dont match" do
|
329
|
+
@double.should_receive(:something).with(2).and_raise(RuntimeError)
|
330
|
+
expect {
|
331
|
+
@double.something 1
|
332
|
+
}.to raise_error(RSpec::Mocks::MockExpectationError)
|
333
|
+
end
|
334
|
+
|
335
|
+
it "throws when told to" do
|
336
|
+
@double.should_receive(:something).and_throw(:blech)
|
337
|
+
expect {
|
338
|
+
@double.something
|
339
|
+
}.to throw_symbol(:blech)
|
340
|
+
end
|
341
|
+
|
342
|
+
it "ignores args on any args" do
|
343
|
+
@double.should_receive(:something).at_least(:once).with(any_args)
|
344
|
+
@double.something
|
345
|
+
@double.something 1
|
346
|
+
@double.something "a", 2
|
347
|
+
@double.something [], {}, "joe", 7
|
348
|
+
verify @double
|
349
|
+
end
|
350
|
+
|
351
|
+
it "fails on no args if any args received" do
|
352
|
+
@double.should_receive(:something).with(no_args())
|
353
|
+
expect {
|
354
|
+
@double.something 1
|
355
|
+
}.to raise_error(RSpec::Mocks::MockExpectationError, "Double \"test double\" received :something with unexpected arguments\n expected: (no args)\n got: (1)")
|
356
|
+
end
|
357
|
+
|
358
|
+
it "fails when args are expected but none are received" do
|
359
|
+
@double.should_receive(:something).with(1)
|
360
|
+
expect {
|
361
|
+
@double.something
|
362
|
+
}.to raise_error(RSpec::Mocks::MockExpectationError, "Double \"test double\" received :something with unexpected arguments\n expected: (1)\n got: (no args)")
|
363
|
+
end
|
364
|
+
|
365
|
+
it "returns value from block by default" do
|
366
|
+
@double.stub(:method_that_yields).and_yield
|
367
|
+
value = @double.method_that_yields { :returned_obj }
|
368
|
+
expect(value).to eq :returned_obj
|
369
|
+
verify @double
|
370
|
+
end
|
371
|
+
|
372
|
+
it "yields 0 args to blocks that take a variable number of arguments" do
|
373
|
+
@double.should_receive(:yield_back).with(no_args()).once.and_yield
|
374
|
+
a = nil
|
375
|
+
@double.yield_back {|*x| a = x}
|
376
|
+
expect(a).to eq []
|
377
|
+
verify @double
|
378
|
+
end
|
379
|
+
|
380
|
+
it "yields 0 args multiple times to blocks that take a variable number of arguments" do
|
381
|
+
@double.should_receive(:yield_back).once.with(no_args()).once.and_yield.
|
382
|
+
and_yield
|
383
|
+
b = []
|
384
|
+
@double.yield_back {|*a| b << a}
|
385
|
+
expect(b).to eq [ [], [] ]
|
386
|
+
verify @double
|
387
|
+
end
|
388
|
+
|
389
|
+
it "yields one arg to blocks that take a variable number of arguments" do
|
390
|
+
@double.should_receive(:yield_back).with(no_args()).once.and_yield(99)
|
391
|
+
a = nil
|
392
|
+
@double.yield_back {|*x| a = x}
|
393
|
+
expect(a).to eq [99]
|
394
|
+
verify @double
|
395
|
+
end
|
396
|
+
|
397
|
+
it "yields one arg 3 times consecutively to blocks that take a variable number of arguments" do
|
398
|
+
@double.should_receive(:yield_back).once.with(no_args()).once.and_yield(99).
|
399
|
+
and_yield(43).
|
400
|
+
and_yield("something fruity")
|
401
|
+
b = []
|
402
|
+
@double.yield_back {|*a| b << a}
|
403
|
+
expect(b).to eq [[99], [43], ["something fruity"]]
|
404
|
+
verify @double
|
405
|
+
end
|
406
|
+
|
407
|
+
it "yields many args to blocks that take a variable number of arguments" do
|
408
|
+
@double.should_receive(:yield_back).with(no_args()).once.and_yield(99, 27, "go")
|
409
|
+
a = nil
|
410
|
+
@double.yield_back {|*x| a = x}
|
411
|
+
expect(a).to eq [99, 27, "go"]
|
412
|
+
verify @double
|
413
|
+
end
|
414
|
+
|
415
|
+
it "yields many args 3 times consecutively to blocks that take a variable number of arguments" do
|
416
|
+
@double.should_receive(:yield_back).once.with(no_args()).once.and_yield(99, :green, "go").
|
417
|
+
and_yield("wait", :amber).
|
418
|
+
and_yield("stop", 12, :red)
|
419
|
+
b = []
|
420
|
+
@double.yield_back {|*a| b << a}
|
421
|
+
expect(b).to eq [[99, :green, "go"], ["wait", :amber], ["stop", 12, :red]]
|
422
|
+
verify @double
|
423
|
+
end
|
424
|
+
|
425
|
+
it "yields single value" do
|
426
|
+
@double.should_receive(:yield_back).with(no_args()).once.and_yield(99)
|
427
|
+
a = nil
|
428
|
+
@double.yield_back {|x| a = x}
|
429
|
+
expect(a).to eq 99
|
430
|
+
verify @double
|
431
|
+
end
|
432
|
+
|
433
|
+
it "yields single value 3 times consecutively" do
|
434
|
+
@double.should_receive(:yield_back).once.with(no_args()).once.and_yield(99).
|
435
|
+
and_yield(43).
|
436
|
+
and_yield("something fruity")
|
437
|
+
b = []
|
438
|
+
@double.yield_back {|a| b << a}
|
439
|
+
expect(b).to eq [99, 43, "something fruity"]
|
440
|
+
verify @double
|
441
|
+
end
|
442
|
+
|
443
|
+
it "yields two values" do
|
444
|
+
@double.should_receive(:yield_back).with(no_args()).once.and_yield('wha', 'zup')
|
445
|
+
a, b = nil
|
446
|
+
@double.yield_back {|x,y| a=x; b=y}
|
447
|
+
expect(a).to eq 'wha'
|
448
|
+
expect(b).to eq 'zup'
|
449
|
+
verify @double
|
450
|
+
end
|
451
|
+
|
452
|
+
it "yields two values 3 times consecutively" do
|
453
|
+
@double.should_receive(:yield_back).once.with(no_args()).once.and_yield('wha', 'zup').
|
454
|
+
and_yield('not', 'down').
|
455
|
+
and_yield(14, 65)
|
456
|
+
c = []
|
457
|
+
@double.yield_back {|a,b| c << [a, b]}
|
458
|
+
expect(c).to eq [['wha', 'zup'], ['not', 'down'], [14, 65]]
|
459
|
+
verify @double
|
460
|
+
end
|
461
|
+
|
462
|
+
it "fails when calling yielding method with wrong arity" do
|
463
|
+
@double.should_receive(:yield_back).with(no_args()).once.and_yield('wha', 'zup')
|
464
|
+
expect {
|
465
|
+
@double.yield_back {|a|}
|
466
|
+
}.to raise_error(RSpec::Mocks::MockExpectationError, "Double \"test double\" yielded |\"wha\", \"zup\"| to block with arity of 1")
|
467
|
+
end
|
468
|
+
|
469
|
+
it "fails when calling yielding method consecutively with wrong arity" do
|
470
|
+
@double.should_receive(:yield_back).once.with(no_args()).once.and_yield('wha', 'zup').
|
471
|
+
and_yield('down').
|
472
|
+
and_yield(14, 65)
|
473
|
+
expect {
|
474
|
+
c = []
|
475
|
+
@double.yield_back {|a,b| c << [a, b]}
|
476
|
+
}.to raise_error(RSpec::Mocks::MockExpectationError, "Double \"test double\" yielded |\"down\"| to block with arity of 2")
|
477
|
+
end
|
478
|
+
|
479
|
+
it "fails when calling yielding method without block" do
|
480
|
+
@double.should_receive(:yield_back).with(no_args()).once.and_yield('wha', 'zup')
|
481
|
+
expect {
|
482
|
+
@double.yield_back
|
483
|
+
}.to raise_error(RSpec::Mocks::MockExpectationError, "Double \"test double\" asked to yield |[\"wha\", \"zup\"]| but no block was passed")
|
484
|
+
end
|
485
|
+
|
486
|
+
it "is able to double send" do
|
487
|
+
@double.should_receive(:send).with(any_args)
|
488
|
+
@double.send 'hi'
|
489
|
+
verify @double
|
490
|
+
end
|
491
|
+
|
492
|
+
it "is able to raise from method calling yielding double" do
|
493
|
+
@double.should_receive(:yield_me).and_yield 44
|
494
|
+
|
495
|
+
expect {
|
496
|
+
@double.yield_me do |x|
|
497
|
+
raise "Bang"
|
498
|
+
end
|
499
|
+
}.to raise_error(StandardError, "Bang")
|
500
|
+
|
501
|
+
verify @double
|
502
|
+
end
|
503
|
+
|
504
|
+
it "clears expectations after verify" do
|
505
|
+
@double.should_receive(:foobar)
|
506
|
+
@double.foobar
|
507
|
+
verify @double
|
508
|
+
expect {
|
509
|
+
@double.foobar
|
510
|
+
}.to raise_error(RSpec::Mocks::MockExpectationError, %q|Double "test double" received unexpected message :foobar with (no args)|)
|
511
|
+
end
|
512
|
+
|
513
|
+
it "restores objects to their original state on rspec_reset" do
|
514
|
+
double = double("this is a double")
|
515
|
+
double.should_receive(:blah)
|
516
|
+
reset double
|
517
|
+
verify double #should throw if reset didn't work
|
518
|
+
end
|
519
|
+
|
520
|
+
it "works even after method_missing starts raising NameErrors instead of NoMethodErrors" do
|
521
|
+
# Object#method_missing throws either NameErrors or NoMethodErrors.
|
522
|
+
#
|
523
|
+
# On a fresh ruby program Object#method_missing:
|
524
|
+
# * raises a NoMethodError when called directly
|
525
|
+
# * raises a NameError when called indirectly
|
526
|
+
#
|
527
|
+
# Once Object#method_missing has been called at least once (on any object)
|
528
|
+
# it starts behaving differently:
|
529
|
+
# * raises a NameError when called directly
|
530
|
+
# * raises a NameError when called indirectly
|
531
|
+
#
|
532
|
+
# There was a bug in Mock#method_missing that relied on the fact
|
533
|
+
# that calling Object#method_missing directly raises a NoMethodError.
|
534
|
+
# This example tests that the bug doesn't exist anymore.
|
535
|
+
|
536
|
+
|
537
|
+
# Ensures that method_missing always raises NameErrors.
|
538
|
+
a_method_that_doesnt_exist rescue
|
539
|
+
|
540
|
+
|
541
|
+
@double.should_receive(:foobar)
|
542
|
+
@double.foobar
|
543
|
+
verify @double
|
544
|
+
|
545
|
+
expect { @double.foobar }.to raise_error(RSpec::Mocks::MockExpectationError)
|
546
|
+
end
|
547
|
+
|
548
|
+
it "temporarily replaces a method stub on a double" do
|
549
|
+
@double.stub(:msg).and_return(:stub_value)
|
550
|
+
@double.should_receive(:msg).with(:arg).and_return(:double_value)
|
551
|
+
expect(@double.msg(:arg)).to equal(:double_value)
|
552
|
+
expect(@double.msg).to equal(:stub_value)
|
553
|
+
expect(@double.msg).to equal(:stub_value)
|
554
|
+
verify @double
|
555
|
+
end
|
556
|
+
|
557
|
+
it "does not require a different signature to replace a method stub" do
|
558
|
+
@double.stub(:msg).and_return(:stub_value)
|
559
|
+
@double.should_receive(:msg).and_return(:double_value)
|
560
|
+
expect(@double.msg(:arg)).to equal(:double_value)
|
561
|
+
expect(@double.msg).to equal(:stub_value)
|
562
|
+
expect(@double.msg).to equal(:stub_value)
|
563
|
+
verify @double
|
564
|
+
end
|
565
|
+
|
566
|
+
it "raises an error when a previously stubbed method has a negative expectation" do
|
567
|
+
@double.stub(:msg).and_return(:stub_value)
|
568
|
+
@double.should_not_receive(:msg)
|
569
|
+
expect { @double.msg(:arg) }.to raise_error(RSpec::Mocks::MockExpectationError)
|
570
|
+
end
|
571
|
+
|
572
|
+
it "temporarily replaces a method stub on a non-double" do
|
573
|
+
non_double = Object.new
|
574
|
+
non_double.stub(:msg).and_return(:stub_value)
|
575
|
+
non_double.should_receive(:msg).with(:arg).and_return(:double_value)
|
576
|
+
expect(non_double.msg(:arg)).to equal(:double_value)
|
577
|
+
expect(non_double.msg).to equal(:stub_value)
|
578
|
+
expect(non_double.msg).to equal(:stub_value)
|
579
|
+
verify non_double
|
580
|
+
end
|
581
|
+
|
582
|
+
it "returns the stubbed value when no new value specified" do
|
583
|
+
@double.stub(:msg).and_return(:stub_value)
|
584
|
+
@double.should_receive(:msg)
|
585
|
+
expect(@double.msg).to equal(:stub_value)
|
586
|
+
verify @double
|
587
|
+
end
|
588
|
+
|
589
|
+
it "returns the stubbed value when stubbed with args and no new value specified" do
|
590
|
+
@double.stub(:msg).with(:arg).and_return(:stub_value)
|
591
|
+
@double.should_receive(:msg).with(:arg)
|
592
|
+
expect(@double.msg(:arg)).to equal(:stub_value)
|
593
|
+
verify @double
|
594
|
+
end
|
595
|
+
|
596
|
+
it "does not mess with the stub's yielded values when also doubleed" do
|
597
|
+
@double.stub(:yield_back).and_yield(:stub_value)
|
598
|
+
@double.should_receive(:yield_back).and_yield(:double_value)
|
599
|
+
@double.yield_back{|v| expect(v).to eq :double_value }
|
600
|
+
@double.yield_back{|v| expect(v).to eq :stub_value }
|
601
|
+
verify @double
|
602
|
+
end
|
603
|
+
|
604
|
+
it "can yield multiple times when told to do so" do
|
605
|
+
@double.stub(:foo).and_yield(:stub_value)
|
606
|
+
@double.should_receive(:foo).and_yield(:first_yield).and_yield(:second_yield)
|
607
|
+
|
608
|
+
expect { |b| @double.foo(&b) }.to yield_successive_args(:first_yield, :second_yield)
|
609
|
+
expect { |b| @double.foo(&b) }.to yield_with_args(:stub_value)
|
610
|
+
|
611
|
+
verify @double
|
612
|
+
end
|
613
|
+
|
614
|
+
it "assigns stub return values" do
|
615
|
+
double = RSpec::Mocks::Mock.new('name', :message => :response)
|
616
|
+
expect(double.message).to eq :response
|
617
|
+
end
|
618
|
+
|
619
|
+
end
|
620
|
+
|
621
|
+
describe "a double message receiving a block" do
|
622
|
+
before(:each) do
|
623
|
+
@double = double("double")
|
624
|
+
@calls = 0
|
625
|
+
end
|
626
|
+
|
627
|
+
def add_call
|
628
|
+
@calls = @calls + 1
|
629
|
+
end
|
630
|
+
|
631
|
+
it "calls the block after #should_receive" do
|
632
|
+
@double.should_receive(:foo) { add_call }
|
633
|
+
|
634
|
+
@double.foo
|
635
|
+
|
636
|
+
expect(@calls).to eq 1
|
637
|
+
end
|
638
|
+
|
639
|
+
it "calls the block after #should_receive after a similar stub" do
|
640
|
+
@double.stub(:foo).and_return(:bar)
|
641
|
+
@double.should_receive(:foo) { add_call }
|
642
|
+
|
643
|
+
@double.foo
|
644
|
+
|
645
|
+
expect(@calls).to eq 1
|
646
|
+
end
|
647
|
+
|
648
|
+
it "calls the block after #once" do
|
649
|
+
@double.should_receive(:foo).once { add_call }
|
650
|
+
|
651
|
+
@double.foo
|
652
|
+
|
653
|
+
expect(@calls).to eq 1
|
654
|
+
end
|
655
|
+
|
656
|
+
it "calls the block after #twice" do
|
657
|
+
@double.should_receive(:foo).twice { add_call }
|
658
|
+
|
659
|
+
@double.foo
|
660
|
+
@double.foo
|
661
|
+
|
662
|
+
expect(@calls).to eq 2
|
663
|
+
end
|
664
|
+
|
665
|
+
it "calls the block after #times" do
|
666
|
+
@double.should_receive(:foo).exactly(10).times { add_call }
|
667
|
+
|
668
|
+
(1..10).each { @double.foo }
|
669
|
+
|
670
|
+
expect(@calls).to eq 10
|
671
|
+
end
|
672
|
+
|
673
|
+
it "calls the block after #any_number_of_times" do
|
674
|
+
expect(RSpec).to receive(:deprecate).with("any_number_of_times", :replacement => "stub")
|
675
|
+
|
676
|
+
@double.should_receive(:foo).any_number_of_times { add_call }
|
677
|
+
|
678
|
+
(1..7).each { @double.foo }
|
679
|
+
|
680
|
+
expect(@calls).to eq 7
|
681
|
+
end
|
682
|
+
|
683
|
+
it "calls the block after #ordered" do
|
684
|
+
@double.should_receive(:foo).ordered { add_call }
|
685
|
+
@double.should_receive(:bar).ordered { add_call }
|
686
|
+
|
687
|
+
@double.foo
|
688
|
+
@double.bar
|
689
|
+
|
690
|
+
expect(@calls).to eq 2
|
691
|
+
end
|
692
|
+
end
|
693
|
+
|
694
|
+
describe 'string representation generated by #to_s' do
|
695
|
+
it 'does not contain < because that might lead to invalid HTML in some situations' do
|
696
|
+
double = double("Dog")
|
697
|
+
valid_html_str = "#{double}"
|
698
|
+
expect(valid_html_str).not_to include('<')
|
699
|
+
end
|
700
|
+
end
|
701
|
+
|
702
|
+
describe "string representation generated by #to_str" do
|
703
|
+
it "looks the same as #to_s" do
|
704
|
+
double = double("Foo")
|
705
|
+
expect(double.to_str).to eq double.to_s
|
706
|
+
end
|
707
|
+
end
|
708
|
+
|
709
|
+
describe "double created with no name" do
|
710
|
+
it "does not use a name in a failure message" do
|
711
|
+
double = double()
|
712
|
+
expect {double.foo}.to raise_error(/Double received/)
|
713
|
+
end
|
714
|
+
|
715
|
+
it "does respond to initially stubbed methods" do
|
716
|
+
double = double(:foo => "woo", :bar => "car")
|
717
|
+
expect(double.foo).to eq "woo"
|
718
|
+
expect(double.bar).to eq "car"
|
719
|
+
end
|
720
|
+
end
|
721
|
+
|
722
|
+
describe "==" do
|
723
|
+
it "sends '== self' to the comparison object" do
|
724
|
+
first = double('first')
|
725
|
+
second = double('second')
|
726
|
+
|
727
|
+
first.should_receive(:==).with(second)
|
728
|
+
second == first
|
729
|
+
end
|
730
|
+
end
|
731
|
+
|
732
|
+
describe "with" do
|
733
|
+
before { @double = double('double') }
|
734
|
+
context "with args" do
|
735
|
+
context "with matching args" do
|
736
|
+
it "passes" do
|
737
|
+
@double.should_receive(:foo).with('bar')
|
738
|
+
@double.foo('bar')
|
739
|
+
end
|
740
|
+
end
|
741
|
+
|
742
|
+
context "with non-matching args" do
|
743
|
+
it "fails" do
|
744
|
+
@double.should_receive(:foo).with('bar')
|
745
|
+
expect do
|
746
|
+
@double.foo('baz')
|
747
|
+
end.to raise_error
|
748
|
+
reset @double
|
749
|
+
end
|
750
|
+
end
|
751
|
+
|
752
|
+
context "with non-matching doubles" do
|
753
|
+
it "fails" do
|
754
|
+
d1 = double('1')
|
755
|
+
d2 = double('2')
|
756
|
+
@double.should_receive(:foo).with(d1)
|
757
|
+
expect do
|
758
|
+
@double.foo(d2)
|
759
|
+
end.to raise_error
|
760
|
+
reset @double
|
761
|
+
end
|
762
|
+
end
|
763
|
+
|
764
|
+
context "with non-matching doubles as_null_object" do
|
765
|
+
it "fails" do
|
766
|
+
d1 = double('1').as_null_object
|
767
|
+
d2 = double('2').as_null_object
|
768
|
+
@double.should_receive(:foo).with(d1)
|
769
|
+
expect do
|
770
|
+
@double.foo(d2)
|
771
|
+
end.to raise_error
|
772
|
+
reset @double
|
773
|
+
end
|
774
|
+
end
|
775
|
+
end
|
776
|
+
|
777
|
+
context "with a block" do
|
778
|
+
context "with matching args" do
|
779
|
+
it "returns the result of the block" do
|
780
|
+
@double.should_receive(:foo).with('bar') { 'baz' }
|
781
|
+
expect(@double.foo('bar')).to eq('baz')
|
782
|
+
end
|
783
|
+
end
|
784
|
+
|
785
|
+
context "with non-matching args" do
|
786
|
+
it "fails" do
|
787
|
+
@double.should_receive(:foo).with('bar') { 'baz' }
|
788
|
+
expect do
|
789
|
+
expect(@double.foo('wrong')).to eq('baz')
|
790
|
+
end.to raise_error(/received :foo with unexpected arguments/)
|
791
|
+
reset @double
|
792
|
+
end
|
793
|
+
end
|
794
|
+
end
|
795
|
+
end
|
796
|
+
end
|
797
|
+
end
|
798
|
+
|