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,70 @@
|
|
1
|
+
require 'rspec/core/formatters/base_formatter'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
module RSpec
|
5
|
+
module Core
|
6
|
+
module Formatters
|
7
|
+
|
8
|
+
class JsonFormatter < BaseFormatter
|
9
|
+
|
10
|
+
attr_reader :output_hash
|
11
|
+
|
12
|
+
def initialize(output)
|
13
|
+
super
|
14
|
+
@output_hash = {}
|
15
|
+
end
|
16
|
+
|
17
|
+
def message(message)
|
18
|
+
(@output_hash[:messages] ||= []) << message
|
19
|
+
end
|
20
|
+
|
21
|
+
def dump_summary(duration, example_count, failure_count, pending_count)
|
22
|
+
super(duration, example_count, failure_count, pending_count)
|
23
|
+
@output_hash[:summary] = {
|
24
|
+
:duration => duration,
|
25
|
+
:example_count => example_count,
|
26
|
+
:failure_count => failure_count,
|
27
|
+
:pending_count => pending_count
|
28
|
+
}
|
29
|
+
@output_hash[:summary_line] = summary_line(example_count, failure_count, pending_count)
|
30
|
+
end
|
31
|
+
|
32
|
+
def summary_line(example_count, failure_count, pending_count)
|
33
|
+
summary = pluralize(example_count, "example")
|
34
|
+
summary << ", " << pluralize(failure_count, "failure")
|
35
|
+
summary << ", #{pending_count} pending" if pending_count > 0
|
36
|
+
summary
|
37
|
+
end
|
38
|
+
|
39
|
+
def stop
|
40
|
+
super
|
41
|
+
@output_hash[:examples] = examples.map do |example|
|
42
|
+
{
|
43
|
+
:description => example.description,
|
44
|
+
:full_description => example.full_description,
|
45
|
+
:status => example.execution_result[:status],
|
46
|
+
# :example_group,
|
47
|
+
# :execution_result,
|
48
|
+
:file_path => example.metadata[:file_path],
|
49
|
+
:line_number => example.metadata[:line_number],
|
50
|
+
}.tap do |hash|
|
51
|
+
if e=example.exception
|
52
|
+
hash[:exception] = {
|
53
|
+
:class => e.class.name,
|
54
|
+
:message => e.message,
|
55
|
+
:backtrace => e.backtrace,
|
56
|
+
}
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
def close
|
63
|
+
output.write @output_hash.to_json
|
64
|
+
output.close if IO === output && output != $stdout
|
65
|
+
end
|
66
|
+
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'rspec/core/formatters/base_text_formatter'
|
2
|
+
module RSpec
|
3
|
+
module Core
|
4
|
+
module Formatters
|
5
|
+
|
6
|
+
class ProgressFormatter < BaseTextFormatter
|
7
|
+
|
8
|
+
def example_passed(example)
|
9
|
+
super(example)
|
10
|
+
output.print success_color('.')
|
11
|
+
end
|
12
|
+
|
13
|
+
def example_pending(example)
|
14
|
+
super(example)
|
15
|
+
output.print pending_color('*')
|
16
|
+
end
|
17
|
+
|
18
|
+
def example_failed(example)
|
19
|
+
super(example)
|
20
|
+
output.print failure_color('F')
|
21
|
+
end
|
22
|
+
|
23
|
+
def start_dump
|
24
|
+
super()
|
25
|
+
output.puts
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
module RSpec
|
2
|
+
module Core
|
3
|
+
module Formatters
|
4
|
+
# @api private
|
5
|
+
#
|
6
|
+
# Extracts code snippets by looking at the backtrace of the passed error and applies synax highlighting and line numbers using html.
|
7
|
+
class SnippetExtractor
|
8
|
+
class NullConverter; def convert(code, pre); code; end; end
|
9
|
+
|
10
|
+
begin
|
11
|
+
require 'syntax/convertors/html'
|
12
|
+
@@converter = Syntax::Convertors::HTML.for_syntax "ruby"
|
13
|
+
rescue LoadError
|
14
|
+
@@converter = NullConverter.new
|
15
|
+
end
|
16
|
+
|
17
|
+
# @api private
|
18
|
+
#
|
19
|
+
# Extract lines of code corresponding to a backtrace.
|
20
|
+
#
|
21
|
+
# @param [String] backtrace the backtrace from a test failure
|
22
|
+
# @return [String] highlighted code snippet indicating where the test failure occured
|
23
|
+
#
|
24
|
+
# @see #post_process
|
25
|
+
def snippet(backtrace)
|
26
|
+
raw_code, line = snippet_for(backtrace[0])
|
27
|
+
highlighted = @@converter.convert(raw_code, false)
|
28
|
+
highlighted << "\n<span class=\"comment\"># gem install syntax to get syntax highlighting</span>" if @@converter.is_a?(NullConverter)
|
29
|
+
post_process(highlighted, line)
|
30
|
+
end
|
31
|
+
|
32
|
+
# @api private
|
33
|
+
#
|
34
|
+
# Create a snippet from a line of code.
|
35
|
+
#
|
36
|
+
# @param [String] error_line file name with line number (i.e. 'foo_spec.rb:12')
|
37
|
+
# @return [String] lines around the target line within the file
|
38
|
+
#
|
39
|
+
# @see #lines_around
|
40
|
+
def snippet_for(error_line)
|
41
|
+
if error_line =~ /(.*):(\d+)/
|
42
|
+
file = $1
|
43
|
+
line = $2.to_i
|
44
|
+
[lines_around(file, line), line]
|
45
|
+
else
|
46
|
+
["# Couldn't get snippet for #{error_line}", 1]
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# @api private
|
51
|
+
#
|
52
|
+
# Extract lines of code centered around a particular line within a source file.
|
53
|
+
#
|
54
|
+
# @param [String] file filename
|
55
|
+
# @param [Fixnum] line line number
|
56
|
+
# @return [String] lines around the target line within the file (2 above and 1 below).
|
57
|
+
def lines_around(file, line)
|
58
|
+
if File.file?(file)
|
59
|
+
lines = File.read(file).split("\n")
|
60
|
+
min = [0, line-3].max
|
61
|
+
max = [line+1, lines.length-1].min
|
62
|
+
selected_lines = []
|
63
|
+
selected_lines.join("\n")
|
64
|
+
lines[min..max].join("\n")
|
65
|
+
else
|
66
|
+
"# Couldn't get snippet for #{file}"
|
67
|
+
end
|
68
|
+
rescue SecurityError
|
69
|
+
"# Couldn't get snippet for #{file}"
|
70
|
+
end
|
71
|
+
|
72
|
+
# @api private
|
73
|
+
#
|
74
|
+
# Adds line numbers to all lines and highlights the line where the failure occurred using html `span` tags.
|
75
|
+
#
|
76
|
+
# @param [String] highlighted syntax-highlighted snippet surrounding the offending line of code
|
77
|
+
# @param [Fixnum] offending_line line where failure occured
|
78
|
+
# @return [String] completed snippet
|
79
|
+
def post_process(highlighted, offending_line)
|
80
|
+
new_lines = []
|
81
|
+
highlighted.split("\n").each_with_index do |line, i|
|
82
|
+
new_line = "<span class=\"linenum\">#{offending_line+i-2}</span>#{line}"
|
83
|
+
new_line = "<span class=\"offending\">#{new_line}</span>" if i == 2
|
84
|
+
new_lines << new_line
|
85
|
+
end
|
86
|
+
new_lines.join("\n")
|
87
|
+
end
|
88
|
+
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'cgi'
|
2
|
+
require 'rspec/core/formatters/html_formatter'
|
3
|
+
|
4
|
+
module RSpec
|
5
|
+
module Core
|
6
|
+
module Formatters
|
7
|
+
# Formats backtraces so they're clickable by TextMate
|
8
|
+
class TextMateFormatter < HtmlFormatter
|
9
|
+
def backtrace_line(line, skip_textmate_conversion=false)
|
10
|
+
if skip_textmate_conversion
|
11
|
+
super(line)
|
12
|
+
else
|
13
|
+
format_backtrace_line_for_textmate(super(line))
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def format_backtrace_line_for_textmate(line)
|
18
|
+
return nil unless line
|
19
|
+
CGI.escapeHTML(line).sub(/([^:]*\.e?rb):(\d*)/) do
|
20
|
+
"<a href=\"txmt://open?url=file://#{File.expand_path($1)}&line=#{$2}\">#{$1}:#{$2}</a> "
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def extra_failure_content(exception)
|
25
|
+
require 'rspec/core/formatters/snippet_extractor'
|
26
|
+
backtrace = exception.backtrace.map {|line| backtrace_line(line, :skip_textmate_conversion)}
|
27
|
+
backtrace.compact!
|
28
|
+
@snippet_extractor ||= SnippetExtractor.new
|
29
|
+
" <pre class=\"ruby\"><code>#{@snippet_extractor.snippet(backtrace)}</code></pre>"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,519 @@
|
|
1
|
+
module RSpec
|
2
|
+
module Core
|
3
|
+
module Hooks
|
4
|
+
include MetadataHashBuilder::WithConfigWarning
|
5
|
+
|
6
|
+
class Hook
|
7
|
+
attr_reader :block, :options
|
8
|
+
|
9
|
+
def initialize(block, options)
|
10
|
+
@block = block
|
11
|
+
@options = options
|
12
|
+
end
|
13
|
+
|
14
|
+
def options_apply?(example_or_group)
|
15
|
+
example_or_group.all_apply?(options)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
class BeforeHook < Hook
|
20
|
+
def run(example)
|
21
|
+
example.instance_eval(&block)
|
22
|
+
end
|
23
|
+
|
24
|
+
def display_name
|
25
|
+
"before hook"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
class AfterHook < Hook
|
30
|
+
def run(example)
|
31
|
+
example.instance_eval_with_rescue("in an after hook", &block)
|
32
|
+
end
|
33
|
+
|
34
|
+
def display_name
|
35
|
+
"after hook"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
class AfterAllHook < Hook
|
40
|
+
def run(example)
|
41
|
+
example.instance_exec(example, &block)
|
42
|
+
rescue Exception => e
|
43
|
+
# TODO: come up with a better solution for this.
|
44
|
+
RSpec.configuration.reporter.message <<-EOS
|
45
|
+
|
46
|
+
An error occurred in an after(:all) hook.
|
47
|
+
#{e.class}: #{e.message}
|
48
|
+
occurred at #{e.backtrace.first}
|
49
|
+
|
50
|
+
EOS
|
51
|
+
end
|
52
|
+
|
53
|
+
def display_name
|
54
|
+
"after(:all) hook"
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
class AroundHook < Hook
|
59
|
+
def display_name
|
60
|
+
"around hook"
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
module HookCollectionAliases
|
65
|
+
def self.included(host)
|
66
|
+
host.send :alias_method, :prepend, :unshift
|
67
|
+
host.send :alias_method, :append, :push
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
class HookCollection < Array
|
72
|
+
include HookCollectionAliases
|
73
|
+
|
74
|
+
def for(example_or_group)
|
75
|
+
self.class.new(select {|hook| hook.options_apply?(example_or_group)}).
|
76
|
+
with(example_or_group)
|
77
|
+
end
|
78
|
+
|
79
|
+
def with(example)
|
80
|
+
@example = example
|
81
|
+
self
|
82
|
+
end
|
83
|
+
|
84
|
+
def run
|
85
|
+
each {|h| h.run(@example) } unless empty?
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
class AroundHookCollection < Array
|
90
|
+
include HookCollectionAliases
|
91
|
+
|
92
|
+
def for(example, initial_procsy=nil)
|
93
|
+
self.class.new(select {|hook| hook.options_apply?(example)}).
|
94
|
+
with(example, initial_procsy)
|
95
|
+
end
|
96
|
+
|
97
|
+
def with(example, initial_procsy)
|
98
|
+
@example = example
|
99
|
+
@initial_procsy = initial_procsy
|
100
|
+
self
|
101
|
+
end
|
102
|
+
|
103
|
+
def run
|
104
|
+
inject(@initial_procsy) do |procsy, around_hook|
|
105
|
+
Example.procsy(procsy.metadata) do
|
106
|
+
@example.instance_eval_with_args(procsy, &around_hook.block)
|
107
|
+
end
|
108
|
+
end.call
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
class GroupHookCollection < Array
|
113
|
+
def for(group)
|
114
|
+
@group = group
|
115
|
+
self
|
116
|
+
end
|
117
|
+
|
118
|
+
def run
|
119
|
+
shift.run(@group) until empty?
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
module RegistersGlobals
|
124
|
+
def register_globals host, globals
|
125
|
+
[:before, :after, :around].each do |position|
|
126
|
+
process host, globals, position, :each
|
127
|
+
next if position == :around # no around(:all) hooks
|
128
|
+
process host, globals, position, :all
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
private
|
133
|
+
def process host, globals, position, scope
|
134
|
+
globals[position][scope].each do |hook|
|
135
|
+
unless host.parent_groups.any? { |a| a.hooks[position][scope].include? hook }
|
136
|
+
self[position][scope] << hook if scope == :each || hook.options_apply?(host)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
# @private
|
143
|
+
def hooks
|
144
|
+
@hooks ||= {
|
145
|
+
:around => { :each => AroundHookCollection.new },
|
146
|
+
:before => { :each => HookCollection.new, :all => HookCollection.new, :suite => HookCollection.new },
|
147
|
+
:after => { :each => HookCollection.new, :all => HookCollection.new, :suite => HookCollection.new }
|
148
|
+
}.extend(RegistersGlobals)
|
149
|
+
end
|
150
|
+
|
151
|
+
# @api public
|
152
|
+
# @overload before(&block)
|
153
|
+
# @overload before(scope, &block)
|
154
|
+
# @overload before(scope, conditions, &block)
|
155
|
+
# @overload before(conditions, &block)
|
156
|
+
#
|
157
|
+
# @param [Symbol] scope `:each`, `:all`, or `:suite` (defaults to `:each`)
|
158
|
+
# @param [Hash] conditions
|
159
|
+
# constrains this hook to examples matching these conditions e.g.
|
160
|
+
# `before(:each, :ui => true) { ... }` will only run with examples or
|
161
|
+
# groups declared with `:ui => true`.
|
162
|
+
#
|
163
|
+
# @see #after
|
164
|
+
# @see #around
|
165
|
+
# @see ExampleGroup
|
166
|
+
# @see SharedContext
|
167
|
+
# @see SharedExampleGroup
|
168
|
+
# @see Configuration
|
169
|
+
#
|
170
|
+
# Declare a block of code to be run before each example (using `:each`)
|
171
|
+
# or once before any example (using `:all`). These are usually declared
|
172
|
+
# directly in the {ExampleGroup} to which they apply, but they can also
|
173
|
+
# be shared across multiple groups.
|
174
|
+
#
|
175
|
+
# You can also use `before(:suite)` to run a block of code before any
|
176
|
+
# example groups are run. This should be declared in {RSpec.configure}
|
177
|
+
#
|
178
|
+
# Instance variables declared in `before(:each)` or `before(:all)` are
|
179
|
+
# accessible within each example.
|
180
|
+
#
|
181
|
+
# ### Order
|
182
|
+
#
|
183
|
+
# `before` hooks are stored in three scopes, which are run in order:
|
184
|
+
# `:suite`, `:all`, and `:each`. They can also be declared in several
|
185
|
+
# different places: `RSpec.configure`, a parent group, the current group.
|
186
|
+
# They are run in the following order:
|
187
|
+
#
|
188
|
+
# before(:suite) # declared in RSpec.configure
|
189
|
+
# before(:all) # declared in RSpec.configure
|
190
|
+
# before(:all) # declared in a parent group
|
191
|
+
# before(:all) # declared in the current group
|
192
|
+
# before(:each) # declared in RSpec.configure
|
193
|
+
# before(:each) # declared in a parent group
|
194
|
+
# before(:each) # declared in the current group
|
195
|
+
#
|
196
|
+
# If more than one `before` is declared within any one scope, they are run
|
197
|
+
# in the order in which they are declared.
|
198
|
+
#
|
199
|
+
# ### Conditions
|
200
|
+
#
|
201
|
+
# When you add a conditions hash to `before(:each)` or `before(:all)`,
|
202
|
+
# RSpec will only apply that hook to groups or examples that match the
|
203
|
+
# conditions. e.g.
|
204
|
+
#
|
205
|
+
# RSpec.configure do |config|
|
206
|
+
# config.before(:each, :authorized => true) do
|
207
|
+
# log_in_as :authorized_user
|
208
|
+
# end
|
209
|
+
# end
|
210
|
+
#
|
211
|
+
# describe Something, :authorized => true do
|
212
|
+
# # the before hook will run in before each example in this group
|
213
|
+
# end
|
214
|
+
#
|
215
|
+
# describe SomethingElse do
|
216
|
+
# it "does something", :authorized => true do
|
217
|
+
# # the before hook will run before this example
|
218
|
+
# end
|
219
|
+
#
|
220
|
+
# it "does something else" do
|
221
|
+
# # the hook will not run before this example
|
222
|
+
# end
|
223
|
+
# end
|
224
|
+
#
|
225
|
+
# ### Warning: `before(:suite, :with => :conditions)`
|
226
|
+
#
|
227
|
+
# The conditions hash is used to match against specific examples. Since
|
228
|
+
# `before(:suite)` is not run in relation to any specific example or
|
229
|
+
# group, conditions passed along with `:suite` are effectively ignored.
|
230
|
+
#
|
231
|
+
# ### Exceptions
|
232
|
+
#
|
233
|
+
# When an exception is raised in a `before` block, RSpec skips any
|
234
|
+
# subsequent `before` blocks and the example, but runs all of the
|
235
|
+
# `after(:each)` and `after(:all)` hooks.
|
236
|
+
#
|
237
|
+
# ### Warning: implicit before blocks
|
238
|
+
#
|
239
|
+
# `before` hooks can also be declared in shared contexts which get
|
240
|
+
# included implicitly either by you or by extension libraries. Since
|
241
|
+
# RSpec runs these in the order in which they are declared within each
|
242
|
+
# scope, load order matters, and can lead to confusing results when one
|
243
|
+
# before block depends on state that is prepared in another before block
|
244
|
+
# that gets run later.
|
245
|
+
#
|
246
|
+
# ### Warning: `before(:all)`
|
247
|
+
#
|
248
|
+
# It is very tempting to use `before(:all)` to speed things up, but we
|
249
|
+
# recommend that you avoid this as there are a number of gotchas, as well
|
250
|
+
# as things that simply don't work.
|
251
|
+
#
|
252
|
+
# #### context
|
253
|
+
#
|
254
|
+
# `before(:all)` is run in an example that is generated to provide group
|
255
|
+
# context for the block.
|
256
|
+
#
|
257
|
+
# #### instance variables
|
258
|
+
#
|
259
|
+
# Instance variables declared in `before(:all)` are shared across all the
|
260
|
+
# examples in the group. This means that each example can change the
|
261
|
+
# state of a shared object, resulting in an ordering dependency that can
|
262
|
+
# make it difficult to reason about failures.
|
263
|
+
#
|
264
|
+
# #### unsupported rspec constructs
|
265
|
+
#
|
266
|
+
# RSpec has several constructs that reset state between each example
|
267
|
+
# automatically. These are not intended for use from within `before(:all)`:
|
268
|
+
#
|
269
|
+
# * `let` declarations
|
270
|
+
# * `subject` declarations
|
271
|
+
# * Any mocking, stubbing or test double declaration
|
272
|
+
#
|
273
|
+
# ### other frameworks
|
274
|
+
#
|
275
|
+
# Mock object frameworks and database transaction managers (like
|
276
|
+
# ActiveRecord) are typically designed around the idea of setting up
|
277
|
+
# before an example, running that one example, and then tearing down.
|
278
|
+
# This means that mocks and stubs can (sometimes) be declared in
|
279
|
+
# `before(:all)`, but get torn down before the first real example is ever
|
280
|
+
# run.
|
281
|
+
#
|
282
|
+
# You _can_ create database-backed model objects in a `before(:all)` in
|
283
|
+
# rspec-rails, but it will not be wrapped in a transaction for you, so
|
284
|
+
# you are on your own to clean up in an `after(:all)` block.
|
285
|
+
#
|
286
|
+
# @example before(:each) declared in an {ExampleGroup}
|
287
|
+
#
|
288
|
+
# describe Thing do
|
289
|
+
# before(:each) do
|
290
|
+
# @thing = Thing.new
|
291
|
+
# end
|
292
|
+
#
|
293
|
+
# it "does something" do
|
294
|
+
# # here you can access @thing
|
295
|
+
# end
|
296
|
+
# end
|
297
|
+
#
|
298
|
+
# @example before(:all) declared in an {ExampleGroup}
|
299
|
+
#
|
300
|
+
# describe Parser do
|
301
|
+
# before(:all) do
|
302
|
+
# File.open(file_to_parse, 'w') do |f|
|
303
|
+
# f.write <<-CONTENT
|
304
|
+
# stuff in the file
|
305
|
+
# CONTENT
|
306
|
+
# end
|
307
|
+
# end
|
308
|
+
#
|
309
|
+
# it "parses the file" do
|
310
|
+
# Parser.parse(file_to_parse)
|
311
|
+
# end
|
312
|
+
#
|
313
|
+
# after(:all) do
|
314
|
+
# File.delete(file_to_parse)
|
315
|
+
# end
|
316
|
+
# end
|
317
|
+
def before(*args, &block)
|
318
|
+
register_hook :append, :before, *args, &block
|
319
|
+
end
|
320
|
+
|
321
|
+
alias_method :append_before, :before
|
322
|
+
|
323
|
+
# Adds `block` to the front of the list of `before` blocks in the same
|
324
|
+
# scope (`:each`, `:all`, or `:suite`).
|
325
|
+
#
|
326
|
+
# See #before for scoping semantics.
|
327
|
+
def prepend_before(*args, &block)
|
328
|
+
register_hook :prepend, :before, *args, &block
|
329
|
+
end
|
330
|
+
|
331
|
+
# @api public
|
332
|
+
# @overload after(&block)
|
333
|
+
# @overload after(scope, &block)
|
334
|
+
# @overload after(scope, conditions, &block)
|
335
|
+
# @overload after(conditions, &block)
|
336
|
+
#
|
337
|
+
# @param [Symbol] scope `:each`, `:all`, or `:suite` (defaults to `:each`)
|
338
|
+
# @param [Hash] conditions
|
339
|
+
# constrains this hook to examples matching these conditions e.g.
|
340
|
+
# `after(:each, :ui => true) { ... }` will only run with examples or
|
341
|
+
# groups declared with `:ui => true`.
|
342
|
+
#
|
343
|
+
# @see #before
|
344
|
+
# @see #around
|
345
|
+
# @see ExampleGroup
|
346
|
+
# @see SharedContext
|
347
|
+
# @see SharedExampleGroup
|
348
|
+
# @see Configuration
|
349
|
+
#
|
350
|
+
# Declare a block of code to be run after each example (using `:each`) or
|
351
|
+
# once after all examples (using `:all`). See
|
352
|
+
# [#before](Hooks#before-instance_method) for more information about
|
353
|
+
# ordering.
|
354
|
+
#
|
355
|
+
# ### Exceptions
|
356
|
+
#
|
357
|
+
# `after` hooks are guaranteed to run even when there are exceptions in
|
358
|
+
# `before` hooks or examples. When an exception is raised in an after
|
359
|
+
# block, the exception is captured for later reporting, and subsequent
|
360
|
+
# `after` blocks are run.
|
361
|
+
#
|
362
|
+
# ### Order
|
363
|
+
#
|
364
|
+
# `after` hooks are stored in three scopes, which are run in order:
|
365
|
+
# `:each`, `:all`, and `:suite`. They can also be declared in several
|
366
|
+
# different places: `RSpec.configure`, a parent group, the current group.
|
367
|
+
# They are run in the following order:
|
368
|
+
#
|
369
|
+
# after(:each) # declared in the current group
|
370
|
+
# after(:each) # declared in a parent group
|
371
|
+
# after(:each) # declared in RSpec.configure
|
372
|
+
# after(:all) # declared in the current group
|
373
|
+
# after(:all) # declared in a parent group
|
374
|
+
# after(:all) # declared in RSpec.configure
|
375
|
+
#
|
376
|
+
# This is the reverse of the order in which `before` hooks are run.
|
377
|
+
# Similarly, if more than one `after` is declared within any one scope,
|
378
|
+
# they are run in reverse order of that in which they are declared.
|
379
|
+
def after(*args, &block)
|
380
|
+
register_hook :prepend, :after, *args, &block
|
381
|
+
end
|
382
|
+
|
383
|
+
alias_method :prepend_after, :after
|
384
|
+
|
385
|
+
# Adds `block` to the back of the list of `after` blocks in the same
|
386
|
+
# scope (`:each`, `:all`, or `:suite`).
|
387
|
+
#
|
388
|
+
# See #after for scoping semantics.
|
389
|
+
def append_after(*args, &block)
|
390
|
+
register_hook :append, :after, *args, &block
|
391
|
+
end
|
392
|
+
|
393
|
+
# @api public
|
394
|
+
# @overload around(&block)
|
395
|
+
# @overload around(scope, &block)
|
396
|
+
# @overload around(scope, conditions, &block)
|
397
|
+
# @overload around(conditions, &block)
|
398
|
+
#
|
399
|
+
# @param [Symbol] scope `:each` (defaults to `:each`)
|
400
|
+
# present for syntax parity with `before` and `after`, but `:each` is
|
401
|
+
# the only supported value.
|
402
|
+
#
|
403
|
+
# @param [Hash] conditions
|
404
|
+
# constrains this hook to examples matching these conditions e.g.
|
405
|
+
# `around(:each, :ui => true) { ... }` will only run with examples or
|
406
|
+
# groups declared with `:ui => true`.
|
407
|
+
#
|
408
|
+
# @yield [Example] the example to run
|
409
|
+
#
|
410
|
+
# @note the syntax of `around` is similar to that of `before` and `after`
|
411
|
+
# but the semantics are quite different. `before` and `after` hooks are
|
412
|
+
# run in the context of of the examples with which they are associated,
|
413
|
+
# whereas `around` hooks are actually responsible for running the
|
414
|
+
# examples. Consequently, `around` hooks do not have direct access to
|
415
|
+
# resources that are made available within the examples and their
|
416
|
+
# associated `before` and `after` hooks.
|
417
|
+
#
|
418
|
+
# @note `:each` is the only supported scope.
|
419
|
+
#
|
420
|
+
# Declare a block of code, parts of which will be run before and parts
|
421
|
+
# after the example. It is your responsibility to run the example:
|
422
|
+
#
|
423
|
+
# around(:each) do |ex|
|
424
|
+
# # do some stuff before
|
425
|
+
# ex.run
|
426
|
+
# # do some stuff after
|
427
|
+
# end
|
428
|
+
#
|
429
|
+
# The yielded example aliases `run` with `call`, which lets you treat it
|
430
|
+
# like a `Proc`. This is especially handy when working with libaries
|
431
|
+
# that manage their own setup and teardown using a block or proc syntax,
|
432
|
+
# e.g.
|
433
|
+
#
|
434
|
+
# around(:each) {|ex| Database.transaction(&ex)}
|
435
|
+
# around(:each) {|ex| FakeFS(&ex)}
|
436
|
+
#
|
437
|
+
def around(*args, &block)
|
438
|
+
register_hook :prepend, :around, *args, &block
|
439
|
+
end
|
440
|
+
|
441
|
+
# @private
|
442
|
+
#
|
443
|
+
# Runs all of the blocks stored with the hook in the context of the
|
444
|
+
# example. If no example is provided, just calls the hook directly.
|
445
|
+
def run_hook(hook, scope, example_or_group=ExampleGroup.new, initial_procsy=nil)
|
446
|
+
find_hook(hook, scope, example_or_group, initial_procsy).run
|
447
|
+
end
|
448
|
+
|
449
|
+
# @private
|
450
|
+
def around_each_hooks_for(example, initial_procsy=nil)
|
451
|
+
AroundHookCollection.new(parent_groups.map {|a| a.hooks[:around][:each]}.flatten).for(example, initial_procsy)
|
452
|
+
end
|
453
|
+
|
454
|
+
private
|
455
|
+
|
456
|
+
SCOPES = [:each, :all, :suite]
|
457
|
+
|
458
|
+
HOOK_TYPES = {
|
459
|
+
:before => Hash.new { BeforeHook },
|
460
|
+
:after => Hash.new { AfterHook },
|
461
|
+
:around => Hash.new { AroundHook }
|
462
|
+
}
|
463
|
+
|
464
|
+
HOOK_TYPES[:after][:all] = AfterAllHook
|
465
|
+
|
466
|
+
def before_all_hooks_for(group)
|
467
|
+
GroupHookCollection.new(hooks[:before][:all]).for(group)
|
468
|
+
end
|
469
|
+
|
470
|
+
def after_all_hooks_for(group)
|
471
|
+
GroupHookCollection.new(hooks[:after][:all]).for(group)
|
472
|
+
end
|
473
|
+
|
474
|
+
def before_each_hooks_for(example)
|
475
|
+
HookCollection.new(parent_groups.reverse.map {|a| a.hooks[:before][:each]}.flatten).for(example)
|
476
|
+
end
|
477
|
+
|
478
|
+
def after_each_hooks_for(example)
|
479
|
+
HookCollection.new(parent_groups.map {|a| a.hooks[:after][:each]}.flatten).for(example)
|
480
|
+
end
|
481
|
+
|
482
|
+
def register_hook prepend_or_append, hook, *args, &block
|
483
|
+
scope, options = scope_and_options_from(*args)
|
484
|
+
hooks[hook][scope].send(prepend_or_append, HOOK_TYPES[hook][scope].new(block, options))
|
485
|
+
end
|
486
|
+
|
487
|
+
def find_hook(hook, scope, example_or_group, initial_procsy)
|
488
|
+
case [hook, scope]
|
489
|
+
when [:before, :all]
|
490
|
+
before_all_hooks_for(example_or_group)
|
491
|
+
when [:after, :all]
|
492
|
+
after_all_hooks_for(example_or_group)
|
493
|
+
when [:around, :each]
|
494
|
+
around_each_hooks_for(example_or_group, initial_procsy)
|
495
|
+
when [:before, :each]
|
496
|
+
before_each_hooks_for(example_or_group)
|
497
|
+
when [:after, :each]
|
498
|
+
after_each_hooks_for(example_or_group)
|
499
|
+
when [:before, :suite], [:after, :suite]
|
500
|
+
hooks[hook][:suite].with(example_or_group)
|
501
|
+
end
|
502
|
+
end
|
503
|
+
|
504
|
+
def scope_and_options_from(*args)
|
505
|
+
return extract_scope_from(args), build_metadata_hash_from(args)
|
506
|
+
end
|
507
|
+
|
508
|
+
def extract_scope_from(args)
|
509
|
+
if SCOPES.include?(args.first)
|
510
|
+
args.shift
|
511
|
+
elsif args.any? { |a| a.is_a?(Symbol) }
|
512
|
+
raise ArgumentError.new("You must explicitly give a scope (:each, :all, or :suite) when using symbols as metadata for a hook.")
|
513
|
+
else
|
514
|
+
:each
|
515
|
+
end
|
516
|
+
end
|
517
|
+
end
|
518
|
+
end
|
519
|
+
end
|