dxruby_rp5 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +88 -0
- data/Rakefile +12 -0
- data/bin/dxrp5 +11 -0
- data/dxruby_rp5.gemspec +25 -0
- data/lib/dxruby.rb +4 -0
- data/lib/dxruby_rp5/font.rb +36 -0
- data/lib/dxruby_rp5/image.rb +146 -0
- data/lib/dxruby_rp5/input.rb +319 -0
- data/lib/dxruby_rp5/render_target.rb +109 -0
- data/lib/dxruby_rp5/runner.rb +17 -0
- data/lib/dxruby_rp5/runners/base.rb +89 -0
- data/lib/dxruby_rp5/runners/run.rb +5 -0
- data/lib/dxruby_rp5/sound.rb +13 -0
- data/lib/dxruby_rp5/sound_effect.rb +20 -0
- data/lib/dxruby_rp5/sprite.rb +188 -0
- data/lib/dxruby_rp5/version.rb +4 -0
- data/lib/dxruby_rp5/window.rb +148 -0
- data/lib/dxruby_rp5.rb +246 -0
- data/spec/fixtures/image.jpg +0 -0
- data/spec/fixtures/image.png +0 -0
- data/spec/fixtures/sound.wav +0 -0
- data/spec/fixtures/test_sketch.rb +2 -0
- data/spec/lib/dxruby_rp5/font_spec.rb +17 -0
- data/spec/lib/dxruby_rp5/image_spec.rb +194 -0
- data/spec/lib/dxruby_rp5/input_spec.rb +407 -0
- data/spec/lib/dxruby_rp5/render_taret_spec.rb +105 -0
- data/spec/lib/dxruby_rp5/sound_effect_spec.rb +42 -0
- data/spec/lib/dxruby_rp5/sound_spec.rb +50 -0
- data/spec/lib/dxruby_rp5/sprite_spec.rb +566 -0
- data/spec/lib/dxruby_rp5/window_spec.rb +36 -0
- data/spec/lib/dxruby_rp5_spec.rb +8 -0
- data/spec/runner.rb +14 -0
- data/spec/spec.rb +15 -0
- data/spec/spec_helper.rb +43 -0
- data/spec/support/fixture_helper.rb +8 -0
- data/spec/vendor/diff-lcs-1.2.5/.autotest +3 -0
- data/spec/vendor/diff-lcs-1.2.5/.gemtest +0 -0
- data/spec/vendor/diff-lcs-1.2.5/.hoerc +2 -0
- data/spec/vendor/diff-lcs-1.2.5/.rspec +2 -0
- data/spec/vendor/diff-lcs-1.2.5/.travis.yml +22 -0
- data/spec/vendor/diff-lcs-1.2.5/Contributing.rdoc +64 -0
- data/spec/vendor/diff-lcs-1.2.5/Gemfile +20 -0
- data/spec/vendor/diff-lcs-1.2.5/History.rdoc +152 -0
- data/spec/vendor/diff-lcs-1.2.5/License.rdoc +39 -0
- data/spec/vendor/diff-lcs-1.2.5/Manifest.txt +38 -0
- data/spec/vendor/diff-lcs-1.2.5/README.rdoc +85 -0
- data/spec/vendor/diff-lcs-1.2.5/Rakefile +41 -0
- data/spec/vendor/diff-lcs-1.2.5/autotest/discover.rb +1 -0
- data/spec/vendor/diff-lcs-1.2.5/bin/htmldiff +32 -0
- data/spec/vendor/diff-lcs-1.2.5/bin/ldiff +6 -0
- data/spec/vendor/diff-lcs-1.2.5/docs/COPYING.txt +339 -0
- data/spec/vendor/diff-lcs-1.2.5/docs/artistic.txt +127 -0
- data/spec/vendor/diff-lcs-1.2.5/lib/diff/lcs/array.rb +7 -0
- data/spec/vendor/diff-lcs-1.2.5/lib/diff/lcs/block.rb +37 -0
- data/spec/vendor/diff-lcs-1.2.5/lib/diff/lcs/callbacks.rb +322 -0
- data/spec/vendor/diff-lcs-1.2.5/lib/diff/lcs/change.rb +177 -0
- data/spec/vendor/diff-lcs-1.2.5/lib/diff/lcs/htmldiff.rb +149 -0
- data/spec/vendor/diff-lcs-1.2.5/lib/diff/lcs/hunk.rb +276 -0
- data/spec/vendor/diff-lcs-1.2.5/lib/diff/lcs/internals.rb +301 -0
- data/spec/vendor/diff-lcs-1.2.5/lib/diff/lcs/ldiff.rb +195 -0
- data/spec/vendor/diff-lcs-1.2.5/lib/diff/lcs/string.rb +5 -0
- data/spec/vendor/diff-lcs-1.2.5/lib/diff/lcs.rb +805 -0
- data/spec/vendor/diff-lcs-1.2.5/lib/diff-lcs.rb +3 -0
- data/spec/vendor/diff-lcs-1.2.5/spec/change_spec.rb +65 -0
- data/spec/vendor/diff-lcs-1.2.5/spec/diff_spec.rb +47 -0
- data/spec/vendor/diff-lcs-1.2.5/spec/hunk_spec.rb +72 -0
- data/spec/vendor/diff-lcs-1.2.5/spec/issues_spec.rb +24 -0
- data/spec/vendor/diff-lcs-1.2.5/spec/lcs_spec.rb +54 -0
- data/spec/vendor/diff-lcs-1.2.5/spec/patch_spec.rb +414 -0
- data/spec/vendor/diff-lcs-1.2.5/spec/sdiff_spec.rb +214 -0
- data/spec/vendor/diff-lcs-1.2.5/spec/spec_helper.rb +290 -0
- data/spec/vendor/diff-lcs-1.2.5/spec/traverse_balanced_spec.rb +310 -0
- data/spec/vendor/diff-lcs-1.2.5/spec/traverse_sequences_spec.rb +139 -0
- data/spec/vendor/rspec-2.14.1/License.txt +24 -0
- data/spec/vendor/rspec-2.14.1/README.md +47 -0
- data/spec/vendor/rspec-2.14.1/lib/rspec/version.rb +5 -0
- data/spec/vendor/rspec-2.14.1/lib/rspec.rb +3 -0
- data/spec/vendor/rspec-core-2.14.7/.document +5 -0
- data/spec/vendor/rspec-core-2.14.7/.yardopts +6 -0
- data/spec/vendor/rspec-core-2.14.7/Changelog.md +904 -0
- data/spec/vendor/rspec-core-2.14.7/License.txt +24 -0
- data/spec/vendor/rspec-core-2.14.7/README.md +261 -0
- data/spec/vendor/rspec-core-2.14.7/exe/autospec +13 -0
- data/spec/vendor/rspec-core-2.14.7/exe/rspec +25 -0
- data/spec/vendor/rspec-core-2.14.7/features/Autotest.md +38 -0
- data/spec/vendor/rspec-core-2.14.7/features/README.md +17 -0
- data/spec/vendor/rspec-core-2.14.7/features/Upgrade.md +364 -0
- data/spec/vendor/rspec-core-2.14.7/features/command_line/README.md +28 -0
- data/spec/vendor/rspec-core-2.14.7/features/command_line/example_name_option.feature +97 -0
- data/spec/vendor/rspec-core-2.14.7/features/command_line/exit_status.feature +82 -0
- data/spec/vendor/rspec-core-2.14.7/features/command_line/format_option.feature +75 -0
- data/spec/vendor/rspec-core-2.14.7/features/command_line/init.feature +18 -0
- data/spec/vendor/rspec-core-2.14.7/features/command_line/line_number_appended_to_path.feature +140 -0
- data/spec/vendor/rspec-core-2.14.7/features/command_line/line_number_option.feature +58 -0
- data/spec/vendor/rspec-core-2.14.7/features/command_line/order.feature +29 -0
- data/spec/vendor/rspec-core-2.14.7/features/command_line/pattern_option.feature +49 -0
- data/spec/vendor/rspec-core-2.14.7/features/command_line/rake_task.feature +122 -0
- data/spec/vendor/rspec-core-2.14.7/features/command_line/require_option.feature +43 -0
- data/spec/vendor/rspec-core-2.14.7/features/command_line/ruby.feature +22 -0
- data/spec/vendor/rspec-core-2.14.7/features/command_line/tag.feature +98 -0
- data/spec/vendor/rspec-core-2.14.7/features/command_line/warnings_option.feature +29 -0
- data/spec/vendor/rspec-core-2.14.7/features/configuration/alias_example_to.feature +48 -0
- data/spec/vendor/rspec-core-2.14.7/features/configuration/backtrace_clean_patterns.feature +102 -0
- data/spec/vendor/rspec-core-2.14.7/features/configuration/custom_settings.feature +84 -0
- data/spec/vendor/rspec-core-2.14.7/features/configuration/default_path.feature +38 -0
- data/spec/vendor/rspec-core-2.14.7/features/configuration/deprecation_stream.feature +58 -0
- data/spec/vendor/rspec-core-2.14.7/features/configuration/fail_fast.feature +77 -0
- data/spec/vendor/rspec-core-2.14.7/features/configuration/failure_exit_code.feature +36 -0
- data/spec/vendor/rspec-core-2.14.7/features/configuration/order_and_seed.feature +3 -0
- data/spec/vendor/rspec-core-2.14.7/features/configuration/output_stream.feature +24 -0
- data/spec/vendor/rspec-core-2.14.7/features/configuration/pattern.feature +38 -0
- data/spec/vendor/rspec-core-2.14.7/features/configuration/profile.feature +220 -0
- data/spec/vendor/rspec-core-2.14.7/features/configuration/read_options_from_file.feature +90 -0
- data/spec/vendor/rspec-core-2.14.7/features/configuration/run_all_when_everything_filtered.feature +76 -0
- data/spec/vendor/rspec-core-2.14.7/features/configuration/show_failures_in_pending_blocks.feature +61 -0
- data/spec/vendor/rspec-core-2.14.7/features/configuration/treat_symbols_as_metadata_keys_with_true_values.feature +52 -0
- data/spec/vendor/rspec-core-2.14.7/features/example_groups/basic_structure.feature +55 -0
- data/spec/vendor/rspec-core-2.14.7/features/example_groups/shared_context.feature +74 -0
- data/spec/vendor/rspec-core-2.14.7/features/example_groups/shared_examples.feature +294 -0
- data/spec/vendor/rspec-core-2.14.7/features/expectation_framework_integration/configure_expectation_framework.feature +102 -0
- data/spec/vendor/rspec-core-2.14.7/features/filtering/exclusion_filters.feature +138 -0
- data/spec/vendor/rspec-core-2.14.7/features/filtering/if_and_unless.feature +168 -0
- data/spec/vendor/rspec-core-2.14.7/features/filtering/inclusion_filters.feature +105 -0
- data/spec/vendor/rspec-core-2.14.7/features/formatters/configurable_colors.feature +31 -0
- data/spec/vendor/rspec-core-2.14.7/features/formatters/custom_formatter.feature +36 -0
- data/spec/vendor/rspec-core-2.14.7/features/formatters/json_formatter.feature +30 -0
- data/spec/vendor/rspec-core-2.14.7/features/formatters/text_formatter.feature +46 -0
- data/spec/vendor/rspec-core-2.14.7/features/helper_methods/arbitrary_methods.feature +40 -0
- data/spec/vendor/rspec-core-2.14.7/features/helper_methods/let.feature +50 -0
- data/spec/vendor/rspec-core-2.14.7/features/helper_methods/modules.feature +149 -0
- data/spec/vendor/rspec-core-2.14.7/features/hooks/around_hooks.feature +343 -0
- data/spec/vendor/rspec-core-2.14.7/features/hooks/before_and_after_hooks.feature +427 -0
- data/spec/vendor/rspec-core-2.14.7/features/hooks/filtering.feature +234 -0
- data/spec/vendor/rspec-core-2.14.7/features/metadata/current_example.feature +17 -0
- data/spec/vendor/rspec-core-2.14.7/features/metadata/described_class.feature +17 -0
- data/spec/vendor/rspec-core-2.14.7/features/metadata/user_defined.feature +113 -0
- data/spec/vendor/rspec-core-2.14.7/features/mock_framework_integration/use_any_framework.feature +106 -0
- data/spec/vendor/rspec-core-2.14.7/features/mock_framework_integration/use_flexmock.feature +96 -0
- data/spec/vendor/rspec-core-2.14.7/features/mock_framework_integration/use_mocha.feature +97 -0
- data/spec/vendor/rspec-core-2.14.7/features/mock_framework_integration/use_rr.feature +98 -0
- data/spec/vendor/rspec-core-2.14.7/features/mock_framework_integration/use_rspec.feature +97 -0
- data/spec/vendor/rspec-core-2.14.7/features/pending/pending_examples.feature +229 -0
- data/spec/vendor/rspec-core-2.14.7/features/spec_files/arbitrary_file_suffix.feature +13 -0
- data/spec/vendor/rspec-core-2.14.7/features/step_definitions/additional_cli_steps.rb +49 -0
- data/spec/vendor/rspec-core-2.14.7/features/subject/attribute_of_subject.feature +124 -0
- data/spec/vendor/rspec-core-2.14.7/features/subject/explicit_subject.feature +101 -0
- data/spec/vendor/rspec-core-2.14.7/features/subject/implicit_receiver.feature +29 -0
- data/spec/vendor/rspec-core-2.14.7/features/subject/implicit_subject.feature +63 -0
- data/spec/vendor/rspec-core-2.14.7/features/support/env.rb +14 -0
- data/spec/vendor/rspec-core-2.14.7/features/support/rubinius.rb +6 -0
- data/spec/vendor/rspec-core-2.14.7/lib/autotest/discover.rb +1 -0
- data/spec/vendor/rspec-core-2.14.7/lib/autotest/rspec2.rb +73 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/autorun.rb +2 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/backtrace_cleaner.rb +46 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/backward_compatibility.rb +55 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/command_line.rb +36 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/configuration.rb +1174 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/configuration_options.rb +156 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/deprecation.rb +31 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/drb_command_line.rb +26 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/drb_options.rb +87 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/dsl.rb +26 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/example.rb +325 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/example_group.rb +479 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/extensions/instance_eval_with_args.rb +44 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/extensions/kernel.rb +9 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/extensions/module_eval_with_args.rb +38 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/extensions/ordered.rb +27 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/filter_manager.rb +203 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/formatters/base_formatter.rb +246 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/formatters/base_text_formatter.rb +329 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/formatters/deprecation_formatter.rb +39 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/formatters/documentation_formatter.rb +67 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/formatters/helpers.rb +110 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/formatters/html_formatter.rb +155 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/formatters/html_printer.rb +408 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/formatters/json_formatter.rb +70 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/formatters/progress_formatter.rb +32 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/formatters/snippet_extractor.rb +92 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/formatters/text_mate_formatter.rb +34 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/formatters.rb +55 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/hooks.rb +519 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/memoized_helpers.rb +514 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/metadata.rb +299 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/metadata_hash_builder.rb +97 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/mocking/with_absolutely_nothing.rb +11 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/mocking/with_flexmock.rb +27 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/mocking/with_mocha.rb +52 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/mocking/with_rr.rb +27 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/mocking/with_rspec.rb +27 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/option_parser.rb +219 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/pending.rb +113 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/project_initializer.rb +86 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/rake_task.rb +206 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/reporter.rb +132 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/ruby_project.rb +44 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/runner.rb +87 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/shared_context.rb +55 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/shared_example_group/collection.rb +43 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/shared_example_group.rb +185 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/version.rb +8 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core/world.rb +127 -0
- data/spec/vendor/rspec-core-2.14.7/lib/rspec/core.rb +169 -0
- data/spec/vendor/rspec-core-2.14.7/spec/autotest/discover_spec.rb +19 -0
- data/spec/vendor/rspec-core-2.14.7/spec/autotest/failed_results_re_spec.rb +45 -0
- data/spec/vendor/rspec-core-2.14.7/spec/autotest/rspec_spec.rb +133 -0
- data/spec/vendor/rspec-core-2.14.7/spec/command_line/order_spec.rb +204 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/backtrace_cleaner_spec.rb +68 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/command_line_spec.rb +108 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/command_line_spec_output.txt +0 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/configuration_options_spec.rb +417 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/configuration_spec.rb +1561 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/deprecation_spec.rb +46 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/deprecations_spec.rb +73 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/drb_command_line_spec.rb +102 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/drb_options_spec.rb +193 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/dsl_spec.rb +25 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/example_group_spec.rb +1187 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/example_spec.rb +465 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/filter_manager_spec.rb +246 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/base_formatter_spec.rb +108 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/base_text_formatter_spec.rb +494 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/deprecation_formatter_spec.rb +96 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/documentation_formatter_spec.rb +88 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/helpers_spec.rb +104 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/html_formatted-1.8.7-jruby.html +404 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/html_formatted-1.8.7-rbx.html +477 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/html_formatted-1.8.7.html +414 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/html_formatted-1.9.2.html +425 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/html_formatted-1.9.3-jruby.html +404 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/html_formatted-1.9.3-rbx.html +477 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/html_formatted-1.9.3.html +425 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/html_formatted-2.0.0.html +425 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/html_formatter_spec.rb +110 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/json_formatter_spec.rb +115 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/progress_formatter_spec.rb +30 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/snippet_extractor_spec.rb +26 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/text_mate_formatted-1.8.7-jruby.html +395 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/text_mate_formatted-1.8.7-rbx.html +477 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/text_mate_formatted-1.8.7.html +414 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/text_mate_formatted-1.9.2.html +425 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/text_mate_formatted-1.9.3-jruby.html +404 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/text_mate_formatted-1.9.3-rbx.html +477 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/text_mate_formatted-1.9.3.html +425 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/text_mate_formatted-2.0.0.html +425 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/formatters/text_mate_formatter_spec.rb +96 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/hooks_filtering_spec.rb +227 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/hooks_spec.rb +267 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/kernel_extensions_spec.rb +9 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/memoized_helpers_spec.rb +688 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/metadata_spec.rb +491 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/option_parser_spec.rb +242 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/pending_example_spec.rb +220 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/project_initializer_spec.rb +130 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/rake_task_spec.rb +181 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/reporter_spec.rb +141 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/resources/a_bar.rb +0 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/resources/a_foo.rb +0 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/resources/a_spec.rb +1 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/resources/custom_example_group_runner.rb +14 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/resources/formatter_specs.rb +60 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/resources/utf8_encoded.rb +8 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/rspec_matchers_spec.rb +45 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/ruby_project_spec.rb +26 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/runner_spec.rb +82 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/shared_context_spec.rb +114 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/shared_example_group/collection_spec.rb +70 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/shared_example_group_spec.rb +120 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core/world_spec.rb +142 -0
- data/spec/vendor/rspec-core-2.14.7/spec/rspec/core_spec.rb +74 -0
- data/spec/vendor/rspec-core-2.14.7/spec/spec_helper.rb +132 -0
- data/spec/vendor/rspec-core-2.14.7/spec/support/config_options_helper.rb +15 -0
- data/spec/vendor/rspec-core-2.14.7/spec/support/helper_methods.rb +36 -0
- data/spec/vendor/rspec-core-2.14.7/spec/support/in_sub_process.rb +37 -0
- data/spec/vendor/rspec-core-2.14.7/spec/support/isolate_load_path_mutation.rb +6 -0
- data/spec/vendor/rspec-core-2.14.7/spec/support/isolated_directory.rb +10 -0
- data/spec/vendor/rspec-core-2.14.7/spec/support/isolated_home_directory.rb +16 -0
- data/spec/vendor/rspec-core-2.14.7/spec/support/matchers.rb +65 -0
- data/spec/vendor/rspec-core-2.14.7/spec/support/mathn_integration_support.rb +12 -0
- data/spec/vendor/rspec-core-2.14.7/spec/support/sandboxed_mock_space.rb +100 -0
- data/spec/vendor/rspec-core-2.14.7/spec/support/shared_example_groups.rb +41 -0
- data/spec/vendor/rspec-core-2.14.7/spec/support/spec_files.rb +44 -0
- data/spec/vendor/rspec-expectations-2.14.4/.document +5 -0
- data/spec/vendor/rspec-expectations-2.14.4/.yardopts +6 -0
- data/spec/vendor/rspec-expectations-2.14.4/Changelog.md +419 -0
- data/spec/vendor/rspec-expectations-2.14.4/License.txt +23 -0
- data/spec/vendor/rspec-expectations-2.14.4/README.md +184 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/README.md +48 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/Upgrade.md +53 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/built_in_matchers/README.md +90 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/built_in_matchers/be.feature +175 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/built_in_matchers/be_within.feature +48 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/built_in_matchers/cover.feature +47 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/built_in_matchers/end_with.feature +48 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/built_in_matchers/equality.feature +139 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/built_in_matchers/exist.feature +45 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/built_in_matchers/expect_change.feature +59 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/built_in_matchers/expect_error.feature +144 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/built_in_matchers/have.feature +109 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/built_in_matchers/include.feature +174 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/built_in_matchers/match.feature +52 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/built_in_matchers/operators.feature +227 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/built_in_matchers/predicates.feature +137 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/built_in_matchers/respond_to.feature +84 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/built_in_matchers/satisfy.feature +33 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/built_in_matchers/start_with.feature +48 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/built_in_matchers/throw_symbol.feature +91 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/built_in_matchers/types.feature +116 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/built_in_matchers/yield.feature +161 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/custom_matchers/access_running_example.feature +53 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/custom_matchers/define_diffable_matcher.feature +27 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/custom_matchers/define_matcher.feature +368 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/custom_matchers/define_matcher_outside_rspec.feature +38 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/custom_matchers/define_matcher_with_fluent_interface.feature +24 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/customized_message.feature +22 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/diffing.feature +85 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/implicit_docstrings.feature +52 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/step_definitions/additional_cli_steps.rb +22 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/support/env.rb +14 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/support/rubinius.rb +6 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/syntax_configuration.feature +71 -0
- data/spec/vendor/rspec-expectations-2.14.4/features/test_frameworks/test_unit.feature +44 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/expectations/deprecation.rb +31 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/expectations/differ.rb +154 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/expectations/errors.rb +9 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/expectations/expectation_target.rb +87 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/expectations/extensions/array.rb +9 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/expectations/extensions/object.rb +29 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/expectations/extensions.rb +2 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/expectations/fail_with.rb +79 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/expectations/handler.rb +68 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/expectations/syntax.rb +164 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/expectations/version.rb +9 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/expectations.rb +73 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/be_close.rb +9 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/base_matcher.rb +68 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/be.rb +197 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/be_instance_of.rb +15 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/be_kind_of.rb +11 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/be_within.rb +55 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/change.rb +141 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/cover.rb +21 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/eq.rb +22 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/eql.rb +23 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/equal.rb +48 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/exist.rb +26 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/has.rb +48 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/have.rb +124 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/include.rb +61 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/match.rb +17 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/match_array.rb +51 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/raise_error.rb +127 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/respond_to.rb +74 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/satisfy.rb +30 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/start_and_end_with.rb +48 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/throw_symbol.rb +94 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/yield.rb +296 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/built_in.rb +39 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/compatibility.rb +14 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/configuration.rb +108 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/dsl.rb +24 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/extensions/instance_eval_with_args.rb +39 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/generated_descriptions.rb +35 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/matcher.rb +300 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/method_missing.rb +12 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/operator_matcher.rb +113 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/pretty.rb +70 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers/test_unit_integration.rb +11 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec/matchers.rb +694 -0
- data/spec/vendor/rspec-expectations-2.14.4/lib/rspec-expectations.rb +1 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/expectations/differ_spec.rb +229 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/expectations/expectation_target_spec.rb +82 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/expectations/extensions/kernel_spec.rb +67 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/expectations/fail_with_spec.rb +114 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/expectations/handler_spec.rb +227 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/expectations/syntax_spec.rb +139 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/expectations_spec.rb +50 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/base_matcher_spec.rb +62 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/be_close_spec.rb +22 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/be_instance_of_spec.rb +63 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/be_kind_of_spec.rb +41 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/be_spec.rb +522 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/be_within_spec.rb +137 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/change_spec.rb +567 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/configuration_spec.rb +206 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/cover_spec.rb +69 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/description_generation_spec.rb +190 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/dsl_spec.rb +57 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/eq_spec.rb +60 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/eql_spec.rb +41 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/equal_spec.rb +78 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/exist_spec.rb +124 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/has_spec.rb +122 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/have_spec.rb +455 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/include_matcher_integration_spec.rb +30 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/include_spec.rb +531 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/match_array_spec.rb +194 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/match_spec.rb +74 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/matcher_spec.rb +471 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/matchers_spec.rb +37 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/method_missing_spec.rb +28 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/operator_matcher_spec.rb +252 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/raise_error_spec.rb +535 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/respond_to_spec.rb +292 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/satisfy_spec.rb +44 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/start_with_end_with_spec.rb +186 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/throw_symbol_spec.rb +116 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/rspec/matchers/yield_spec.rb +514 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/spec_helper.rb +54 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/support/classes.rb +56 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/support/in_sub_process.rb +38 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/support/matchers.rb +22 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/support/ruby_version.rb +10 -0
- data/spec/vendor/rspec-expectations-2.14.4/spec/support/shared_examples.rb +13 -0
- data/spec/vendor/rspec-mocks-2.14.4/.document +5 -0
- data/spec/vendor/rspec-mocks-2.14.4/.yardopts +6 -0
- data/spec/vendor/rspec-mocks-2.14.4/Changelog.md +420 -0
- data/spec/vendor/rspec-mocks-2.14.4/License.txt +23 -0
- data/spec/vendor/rspec-mocks-2.14.4/README.md +315 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/README.md +67 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/Scope.md +17 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/Upgrade.md +22 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/argument_matchers/README.md +27 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/argument_matchers/explicit.feature +59 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/argument_matchers/general_matchers.feature +85 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/argument_matchers/type_matchers.feature +26 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/message_expectations/README.md +73 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/message_expectations/allow_any_instance_of.feature +26 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/message_expectations/any_instance.feature +21 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/message_expectations/block_local_expectations.feature.pending +55 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/message_expectations/call_original.feature +24 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/message_expectations/expect_any_instance_of.feature +27 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/message_expectations/expect_message_using_expect.feature +107 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/message_expectations/expect_message_using_should_receive.feature +118 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/message_expectations/receive_counts.feature +209 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/message_expectations/warn_when_expectation_is_set_on_nil.feature +50 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/method_stubs/README.md +73 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/method_stubs/any_instance.feature +136 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/method_stubs/as_null_object.feature +40 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/method_stubs/simple_return_value_with_allow.feature +44 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/method_stubs/simple_return_value_with_stub.feature +64 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/method_stubs/stub_chain.feature +51 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/method_stubs/stub_implementation.feature +48 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/method_stubs/to_ary.feature +51 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/mutating_constants/README.md +82 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/mutating_constants/hiding_defined_constant.feature +64 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/mutating_constants/stub_defined_constant.feature +79 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/mutating_constants/stub_undefined_constant.feature +50 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/outside_rspec/configuration.feature +62 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/outside_rspec/standalone.feature +33 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/spies/spy_partial_mock_method.feature +34 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/spies/spy_pure_mock_method.feature +76 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/spies/spy_unstubbed_method.feature +18 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/step_definitions/additional_cli_steps.rb +11 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/support/env.rb +13 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/support/rubinius.rb +6 -0
- data/spec/vendor/rspec-mocks-2.14.4/features/test_frameworks/test_unit.feature +43 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/any_instance/chain.rb +94 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/any_instance/expectation_chain.rb +42 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/any_instance/message_chains.rb +60 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/any_instance/recorder.rb +211 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/any_instance/stub_chain.rb +40 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/any_instance/stub_chain_chain.rb +23 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/argument_list_matcher.rb +97 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/argument_matchers.rb +238 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/configuration.rb +55 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/deprecation.rb +18 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/error_generator.rb +179 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/errors.rb +12 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/example_methods.rb +156 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/extensions/instance_exec.rb +34 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/extensions/marshal.rb +17 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/framework.rb +34 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/instance_method_stasher.rb +94 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/matchers/have_received.rb +93 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/matchers/receive.rb +97 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/message_expectation.rb +583 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/method_double.rb +271 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/mock.rb +7 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/mutate_const.rb +403 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/order_group.rb +40 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/proxy.rb +223 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/proxy_for_nil.rb +37 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/space.rb +91 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/standalone.rb +3 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/stub_chain.rb +51 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/syntax.rb +349 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/targets.rb +69 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/test_double.rb +135 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks/version.rb +7 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/rspec/mocks.rb +96 -0
- data/spec/vendor/rspec-mocks-2.14.4/lib/spec/mocks.rb +4 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/and_call_original_spec.rb +243 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/and_yield_spec.rb +127 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/any_instance/message_chains_spec.rb +41 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/any_instance_spec.rb +987 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/any_number_of_times_spec.rb +36 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/argument_expectation_spec.rb +32 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/at_least_spec.rb +151 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/at_most_spec.rb +90 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/block_return_value_spec.rb +88 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/bug_report_10260_spec.rb +8 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/bug_report_10263_spec.rb +27 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/bug_report_11545_spec.rb +32 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/bug_report_496_spec.rb +17 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/bug_report_600_spec.rb +22 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/bug_report_7611_spec.rb +16 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/bug_report_8165_spec.rb +31 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/bug_report_830_spec.rb +21 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/bug_report_957_spec.rb +22 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/combining_implementation_instructions_spec.rb +205 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/configuration_spec.rb +150 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/double_spec.rb +24 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/extensions/marshal_spec.rb +54 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/failing_argument_matchers_spec.rb +110 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/hash_excluding_matcher_spec.rb +67 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/hash_including_matcher_spec.rb +90 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/instance_method_stasher_spec.rb +58 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/matchers/have_received_spec.rb +266 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/matchers/receive_spec.rb +336 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/methods_spec.rb +27 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/mock_ordering_spec.rb +103 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/mock_space_spec.rb +113 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/mock_spec.rb +798 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/multiple_return_value_spec.rb +132 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/mutate_const_spec.rb +501 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/nil_expectation_warning_spec.rb +68 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/null_object_mock_spec.rb +123 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/once_counts_spec.rb +52 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/options_hash_spec.rb +35 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/partial_mock_spec.rb +205 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/partial_mock_using_mocks_directly_spec.rb +95 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/passing_argument_matchers_spec.rb +142 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/precise_counts_spec.rb +68 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/record_messages_spec.rb +26 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/serialization_spec.rb +89 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/space_spec.rb +32 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/stash_spec.rb +46 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/stub_chain_spec.rb +154 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/stub_implementation_spec.rb +81 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/stub_spec.rb +353 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/stubbed_message_expectations_spec.rb +58 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/syntax_agnostic_message_matchers_spec.rb +81 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/test_double_spec.rb +67 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/to_ary_spec.rb +54 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/twice_counts_spec.rb +66 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks_spec.rb +65 -0
- data/spec/vendor/rspec-mocks-2.14.4/spec/spec_helper.rb +60 -0
- metadata +1170 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
Feature: include matcher
|
|
2
|
+
|
|
3
|
+
Use the include matcher to specify that a collection includes one or more
|
|
4
|
+
expected objects. This works on any object that responds to #include? (such
|
|
5
|
+
as a string or array):
|
|
6
|
+
|
|
7
|
+
```ruby
|
|
8
|
+
"a string".should include("a")
|
|
9
|
+
"a string".should include("str")
|
|
10
|
+
"a string".should include("str", "g")
|
|
11
|
+
"a string".should_not include("foo")
|
|
12
|
+
|
|
13
|
+
[1, 2].should include(1)
|
|
14
|
+
[1, 2].should include(1, 2)
|
|
15
|
+
[1, 2].should_not include(17)
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
The matcher also provides flexible handling for hashes:
|
|
19
|
+
|
|
20
|
+
```ruby
|
|
21
|
+
{:a => 1, :b => 2}.should include(:a)
|
|
22
|
+
{:a => 1, :b => 2}.should include(:a, :b)
|
|
23
|
+
{:a => 1, :b => 2}.should include(:a => 1)
|
|
24
|
+
{:a => 1, :b => 2}.should include(:b => 2, :a => 1)
|
|
25
|
+
{:a => 1, :b => 2}.should_not include(:c)
|
|
26
|
+
{:a => 1, :b => 2}.should_not include(:a => 2)
|
|
27
|
+
{:a => 1, :b => 2}.should_not include(:c => 3)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Scenario: array usage
|
|
31
|
+
Given a file named "array_include_matcher_spec.rb" with:
|
|
32
|
+
"""ruby
|
|
33
|
+
describe [1, 3, 7] do
|
|
34
|
+
it { should include(1) }
|
|
35
|
+
it { should include(3) }
|
|
36
|
+
it { should include(7) }
|
|
37
|
+
it { should include(1, 7) }
|
|
38
|
+
it { should include(1, 3, 7) }
|
|
39
|
+
it { should_not include(17) }
|
|
40
|
+
it { should_not include(43, 100) }
|
|
41
|
+
|
|
42
|
+
# deliberate failures
|
|
43
|
+
it { should include(4) }
|
|
44
|
+
it { should_not include(1) }
|
|
45
|
+
it { should_not include(3) }
|
|
46
|
+
it { should_not include(7) }
|
|
47
|
+
it { should_not include(1, 3, 7) }
|
|
48
|
+
|
|
49
|
+
# both of these should fail since it includes 1 but not 9
|
|
50
|
+
it { should include(1, 9) }
|
|
51
|
+
it { should_not include(1, 9) }
|
|
52
|
+
end
|
|
53
|
+
"""
|
|
54
|
+
When I run `rspec array_include_matcher_spec.rb`
|
|
55
|
+
Then the output should contain all of these:
|
|
56
|
+
| 14 examples, 7 failures |
|
|
57
|
+
| expected [1, 3, 7] to include 4 |
|
|
58
|
+
| expected [1, 3, 7] not to include 1 |
|
|
59
|
+
| expected [1, 3, 7] not to include 3 |
|
|
60
|
+
| expected [1, 3, 7] not to include 7 |
|
|
61
|
+
| expected [1, 3, 7] not to include 1, 3, and 7 |
|
|
62
|
+
| expected [1, 3, 7] to include 1 and 9 |
|
|
63
|
+
| expected [1, 3, 7] not to include 1 and 9 |
|
|
64
|
+
|
|
65
|
+
Scenario: string usage
|
|
66
|
+
Given a file named "string_include_matcher_spec.rb" with:
|
|
67
|
+
"""ruby
|
|
68
|
+
describe "a string" do
|
|
69
|
+
it { should include("str") }
|
|
70
|
+
it { should include("a", "str", "ng") }
|
|
71
|
+
it { should_not include("foo") }
|
|
72
|
+
it { should_not include("foo", "bar") }
|
|
73
|
+
|
|
74
|
+
# deliberate failures
|
|
75
|
+
it { should include("foo") }
|
|
76
|
+
it { should_not include("str") }
|
|
77
|
+
it { should include("str", "foo") }
|
|
78
|
+
it { should_not include("str", "foo") }
|
|
79
|
+
end
|
|
80
|
+
"""
|
|
81
|
+
When I run `rspec string_include_matcher_spec.rb`
|
|
82
|
+
Then the output should contain all of these:
|
|
83
|
+
| 8 examples, 4 failures |
|
|
84
|
+
| expected "a string" to include "foo" |
|
|
85
|
+
| expected "a string" not to include "str" |
|
|
86
|
+
| expected "a string" to include "str" and "foo" |
|
|
87
|
+
| expected "a string" not to include "str" and "foo" |
|
|
88
|
+
|
|
89
|
+
Scenario: hash usage
|
|
90
|
+
Given a file named "hash_include_matcher_spec.rb" with:
|
|
91
|
+
"""ruby
|
|
92
|
+
describe Hash do
|
|
93
|
+
subject { { :a => 7, :b => 5 } }
|
|
94
|
+
|
|
95
|
+
it { should include(:a) }
|
|
96
|
+
it { should include(:b, :a) }
|
|
97
|
+
it { should include(:a => 7) }
|
|
98
|
+
it { should include(:b => 5, :a => 7) }
|
|
99
|
+
it { should_not include(:c) }
|
|
100
|
+
it { should_not include(:c, :d) }
|
|
101
|
+
it { should_not include(:d => 2) }
|
|
102
|
+
it { should_not include(:a => 5) }
|
|
103
|
+
it { should_not include(:b => 7, :a => 5) }
|
|
104
|
+
|
|
105
|
+
# deliberate failures
|
|
106
|
+
it { should_not include(:a) }
|
|
107
|
+
it { should_not include(:b, :a) }
|
|
108
|
+
it { should_not include(:a => 7) }
|
|
109
|
+
it { should_not include(:a => 7, :b => 5) }
|
|
110
|
+
it { should include(:c) }
|
|
111
|
+
it { should include(:c, :d) }
|
|
112
|
+
it { should include(:d => 2) }
|
|
113
|
+
it { should include(:a => 5) }
|
|
114
|
+
it { should include(:a => 5, :b => 7) }
|
|
115
|
+
|
|
116
|
+
# Mixed cases--the hash includes one but not the other.
|
|
117
|
+
# All 4 of these cases should fail.
|
|
118
|
+
it { should include(:a, :d) }
|
|
119
|
+
it { should_not include(:a, :d) }
|
|
120
|
+
it { should include(:a => 7, :d => 3) }
|
|
121
|
+
it { should_not include(:a => 7, :d => 3) }
|
|
122
|
+
end
|
|
123
|
+
"""
|
|
124
|
+
When I run `rspec hash_include_matcher_spec.rb`
|
|
125
|
+
Then the output should contain "13 failure"
|
|
126
|
+
|
|
127
|
+
Scenario: fuzzy usage with matchers
|
|
128
|
+
Given a file named "fuzzy_include_matcher_spec.rb" with:
|
|
129
|
+
"""
|
|
130
|
+
require 'ostruct'
|
|
131
|
+
|
|
132
|
+
class User < OpenStruct
|
|
133
|
+
def inspect
|
|
134
|
+
name
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
RSpec::Matchers.define :a_user_named do |expected|
|
|
139
|
+
match do |actual|
|
|
140
|
+
actual.is_a?(User) && (actual.name == expected)
|
|
141
|
+
end
|
|
142
|
+
description do
|
|
143
|
+
"a user named '#{expected}'"
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
describe "Collection of users" do
|
|
148
|
+
subject do
|
|
149
|
+
[User.new(:name => "Joe"),
|
|
150
|
+
User.new(:name => "Fred"),
|
|
151
|
+
User.new(:name => "John"),
|
|
152
|
+
User.new(:name => "Luke"),
|
|
153
|
+
User.new(:name => "David")]
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
it { should include( a_user_named "Joe" ) }
|
|
157
|
+
it { should include( a_user_named "Luke" ) }
|
|
158
|
+
it { should_not include( a_user_named "Richard" ) }
|
|
159
|
+
it { should_not include( a_user_named "Hayley" ) }
|
|
160
|
+
|
|
161
|
+
# deliberate failures
|
|
162
|
+
it { should include( a_user_named "Richard" ) }
|
|
163
|
+
it { should_not include( a_user_named "Fred" ) }
|
|
164
|
+
it { should include( a_user_named "Sarah" ) }
|
|
165
|
+
it { should_not include( a_user_named "Luke" ) }
|
|
166
|
+
end
|
|
167
|
+
"""
|
|
168
|
+
When I run `rspec fuzzy_include_matcher_spec.rb`
|
|
169
|
+
Then the output should contain all of these:
|
|
170
|
+
| 8 examples, 4 failures |
|
|
171
|
+
| expected [Joe, Fred, John, Luke, David] to include a user named 'Richard' |
|
|
172
|
+
| expected [Joe, Fred, John, Luke, David] not to include a user named 'Fred' |
|
|
173
|
+
| expected [Joe, Fred, John, Luke, David] to include a user named 'Sarah' |
|
|
174
|
+
| expected [Joe, Fred, John, Luke, David] not to include a user named 'Luke' |
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
Feature: match matcher
|
|
2
|
+
|
|
3
|
+
The match matcher calls #match on the object, passing if #match returns a
|
|
4
|
+
truthy (not false or nil) value. Regexp and String both provide a #match
|
|
5
|
+
method.
|
|
6
|
+
|
|
7
|
+
```ruby
|
|
8
|
+
"a string".should match(/str/) # passes
|
|
9
|
+
"a string".should match(/foo/) # fails
|
|
10
|
+
/foo/.should match("food") # passes
|
|
11
|
+
/foo/.should match("drinks") # fails
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
This is equivalent to using the =~ matcher (see the operator matchers
|
|
15
|
+
feature for more details).
|
|
16
|
+
|
|
17
|
+
Scenario: string usage
|
|
18
|
+
Given a file named "string_match_spec.rb" with:
|
|
19
|
+
"""ruby
|
|
20
|
+
describe "a string" do
|
|
21
|
+
it { should match(/str/) }
|
|
22
|
+
it { should_not match(/foo/) }
|
|
23
|
+
|
|
24
|
+
# deliberate failures
|
|
25
|
+
it { should_not match(/str/) }
|
|
26
|
+
it { should match(/foo/) }
|
|
27
|
+
end
|
|
28
|
+
"""
|
|
29
|
+
When I run `rspec string_match_spec.rb`
|
|
30
|
+
Then the output should contain all of these:
|
|
31
|
+
| 4 examples, 2 failures |
|
|
32
|
+
| expected "a string" not to match /str/ |
|
|
33
|
+
| expected "a string" to match /foo/ |
|
|
34
|
+
|
|
35
|
+
Scenario: regular expression usage
|
|
36
|
+
Given a file named "regexp_match_spec.rb" with:
|
|
37
|
+
"""ruby
|
|
38
|
+
describe /foo/ do
|
|
39
|
+
it { should match("food") }
|
|
40
|
+
it { should_not match("drinks") }
|
|
41
|
+
|
|
42
|
+
# deliberate failures
|
|
43
|
+
it { should_not match("food") }
|
|
44
|
+
it { should match("drinks") }
|
|
45
|
+
end
|
|
46
|
+
"""
|
|
47
|
+
When I run `rspec regexp_match_spec.rb`
|
|
48
|
+
Then the output should contain all of these:
|
|
49
|
+
| 4 examples, 2 failures |
|
|
50
|
+
| expected /foo/ not to match "food" |
|
|
51
|
+
| expected /foo/ to match "drinks" |
|
|
52
|
+
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
Feature: operator matchers
|
|
2
|
+
|
|
3
|
+
RSpec provides a number of matchers that are based on Ruby's built-in
|
|
4
|
+
operators. These pretty much work like you expect. For example, each of these
|
|
5
|
+
pass:
|
|
6
|
+
|
|
7
|
+
```ruby
|
|
8
|
+
7.should == 7
|
|
9
|
+
[1, 2, 3].should == [1, 2, 3]
|
|
10
|
+
"this is a string".should =~ /^this/
|
|
11
|
+
"this is a string".should_not =~ /^that/
|
|
12
|
+
String.should === "this is a string"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
You can also use comparison operators combined with the "be" matcher like
|
|
16
|
+
this:
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
37.should be < 100
|
|
20
|
+
37.should be <= 38
|
|
21
|
+
37.should be >= 2
|
|
22
|
+
37.should be > 7
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
RSpec also provides a `=~` matcher for arrays that disregards differences in
|
|
26
|
+
the ording between the actual and expected array. For example:
|
|
27
|
+
|
|
28
|
+
```ruby
|
|
29
|
+
[1, 2, 3].should =~ [2, 3, 1] # pass
|
|
30
|
+
[:a, :c, :b].should =~ [:a, :c] # fail
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Scenario: numeric operator matchers
|
|
34
|
+
Given a file named "numeric_operator_matchers_spec.rb" with:
|
|
35
|
+
"""ruby
|
|
36
|
+
describe 18 do
|
|
37
|
+
it { should == 18 }
|
|
38
|
+
it { should be < 20 }
|
|
39
|
+
it { should be > 15 }
|
|
40
|
+
it { should be <= 19 }
|
|
41
|
+
it { should be >= 17 }
|
|
42
|
+
|
|
43
|
+
it { should_not == 28 }
|
|
44
|
+
|
|
45
|
+
# deliberate failures
|
|
46
|
+
it { should == 28 }
|
|
47
|
+
it { should be < 15 }
|
|
48
|
+
it { should be > 20 }
|
|
49
|
+
it { should be <= 17 }
|
|
50
|
+
it { should be >= 19 }
|
|
51
|
+
|
|
52
|
+
it { should_not == 18 }
|
|
53
|
+
end
|
|
54
|
+
"""
|
|
55
|
+
When I run `rspec numeric_operator_matchers_spec.rb`
|
|
56
|
+
Then the output should contain "12 examples, 6 failures"
|
|
57
|
+
And the output should contain:
|
|
58
|
+
"""
|
|
59
|
+
Failure/Error: it { should == 28 }
|
|
60
|
+
expected: 28
|
|
61
|
+
got: 18 (using ==)
|
|
62
|
+
"""
|
|
63
|
+
And the output should contain:
|
|
64
|
+
"""
|
|
65
|
+
Failure/Error: it { should be < 15 }
|
|
66
|
+
expected: < 15
|
|
67
|
+
got: 18
|
|
68
|
+
"""
|
|
69
|
+
And the output should contain:
|
|
70
|
+
"""
|
|
71
|
+
Failure/Error: it { should be > 20 }
|
|
72
|
+
expected: > 20
|
|
73
|
+
got: 18
|
|
74
|
+
"""
|
|
75
|
+
And the output should contain:
|
|
76
|
+
"""
|
|
77
|
+
Failure/Error: it { should be <= 17 }
|
|
78
|
+
expected: <= 17
|
|
79
|
+
got: 18
|
|
80
|
+
"""
|
|
81
|
+
And the output should contain:
|
|
82
|
+
"""
|
|
83
|
+
Failure/Error: it { should be >= 19 }
|
|
84
|
+
expected: >= 19
|
|
85
|
+
got: 18
|
|
86
|
+
"""
|
|
87
|
+
And the output should contain:
|
|
88
|
+
"""
|
|
89
|
+
Failure/Error: it { should_not == 18 }
|
|
90
|
+
expected not: == 18
|
|
91
|
+
got: 18
|
|
92
|
+
"""
|
|
93
|
+
|
|
94
|
+
Scenario: string operator matchers
|
|
95
|
+
Given a file named "string_operator_matchers_spec.rb" with:
|
|
96
|
+
"""ruby
|
|
97
|
+
describe "Strawberry" do
|
|
98
|
+
it { should == "Strawberry" }
|
|
99
|
+
it { should be < "Tomato" }
|
|
100
|
+
it { should be > "Apple" }
|
|
101
|
+
it { should be <= "Turnip" }
|
|
102
|
+
it { should be >= "Banana" }
|
|
103
|
+
it { should =~ /berry/ }
|
|
104
|
+
|
|
105
|
+
it { should_not == "Peach" }
|
|
106
|
+
it { should_not =~ /apple/ }
|
|
107
|
+
|
|
108
|
+
it "reports that it is a string using ===" do
|
|
109
|
+
String.should === subject
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# deliberate failures
|
|
113
|
+
it { should == "Peach" }
|
|
114
|
+
it { should be < "Cranberry" }
|
|
115
|
+
it { should be > "Zuchini" }
|
|
116
|
+
it { should be <= "Potato" }
|
|
117
|
+
it { should be >= "Tomato" }
|
|
118
|
+
it { should =~ /apple/ }
|
|
119
|
+
|
|
120
|
+
it { should_not == "Strawberry" }
|
|
121
|
+
it { should_not =~ /berry/ }
|
|
122
|
+
|
|
123
|
+
it "fails a spec asserting that it is a symbol" do
|
|
124
|
+
Symbol.should === subject
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
"""
|
|
128
|
+
When I run `rspec string_operator_matchers_spec.rb`
|
|
129
|
+
Then the output should contain "18 examples, 9 failures"
|
|
130
|
+
And the output should contain:
|
|
131
|
+
"""
|
|
132
|
+
Failure/Error: it { should == "Peach" }
|
|
133
|
+
expected: "Peach"
|
|
134
|
+
got: "Strawberry" (using ==)
|
|
135
|
+
"""
|
|
136
|
+
And the output should contain:
|
|
137
|
+
"""
|
|
138
|
+
Failure/Error: it { should be < "Cranberry" }
|
|
139
|
+
expected: < "Cranberry"
|
|
140
|
+
got: "Strawberry"
|
|
141
|
+
"""
|
|
142
|
+
And the output should contain:
|
|
143
|
+
"""
|
|
144
|
+
Failure/Error: it { should be > "Zuchini" }
|
|
145
|
+
expected: > "Zuchini"
|
|
146
|
+
got: "Strawberry"
|
|
147
|
+
"""
|
|
148
|
+
And the output should contain:
|
|
149
|
+
"""
|
|
150
|
+
Failure/Error: it { should be <= "Potato" }
|
|
151
|
+
expected: <= "Potato"
|
|
152
|
+
got: "Strawberry"
|
|
153
|
+
"""
|
|
154
|
+
And the output should contain:
|
|
155
|
+
"""
|
|
156
|
+
Failure/Error: it { should be >= "Tomato" }
|
|
157
|
+
expected: >= "Tomato"
|
|
158
|
+
got: "Strawberry"
|
|
159
|
+
"""
|
|
160
|
+
And the output should contain:
|
|
161
|
+
"""
|
|
162
|
+
Failure/Error: it { should =~ /apple/ }
|
|
163
|
+
expected: /apple/
|
|
164
|
+
got: "Strawberry" (using =~)
|
|
165
|
+
"""
|
|
166
|
+
And the output should contain:
|
|
167
|
+
"""
|
|
168
|
+
Failure/Error: it { should_not == "Strawberry" }
|
|
169
|
+
expected not: == "Strawberry"
|
|
170
|
+
got: "Strawberry"
|
|
171
|
+
"""
|
|
172
|
+
And the output should contain:
|
|
173
|
+
"""
|
|
174
|
+
Failure/Error: it { should_not =~ /berry/ }
|
|
175
|
+
expected not: =~ /berry/
|
|
176
|
+
got: "Strawberry"
|
|
177
|
+
"""
|
|
178
|
+
And the output should contain:
|
|
179
|
+
"""
|
|
180
|
+
Failure/Error: Symbol.should === subject
|
|
181
|
+
expected: "Strawberry"
|
|
182
|
+
got: Symbol (using ===)
|
|
183
|
+
"""
|
|
184
|
+
|
|
185
|
+
Scenario: array operator matchers
|
|
186
|
+
Given a file named "array_operator_matchers_spec.rb" with:
|
|
187
|
+
"""ruby
|
|
188
|
+
describe [1, 2, 3] do
|
|
189
|
+
it { should == [1, 2, 3] }
|
|
190
|
+
it { should_not == [1, 3, 2] }
|
|
191
|
+
|
|
192
|
+
it { should =~ [1, 2, 3] }
|
|
193
|
+
it { should =~ [1, 3, 2] }
|
|
194
|
+
it { should =~ [2, 1, 3] }
|
|
195
|
+
it { should =~ [2, 3, 1] }
|
|
196
|
+
it { should =~ [3, 1, 2] }
|
|
197
|
+
it { should =~ [3, 2, 1] }
|
|
198
|
+
|
|
199
|
+
# deliberate failures
|
|
200
|
+
it { should_not == [1, 2, 3] }
|
|
201
|
+
it { should == [1, 3, 2] }
|
|
202
|
+
it { should =~ [1, 2, 1] }
|
|
203
|
+
end
|
|
204
|
+
"""
|
|
205
|
+
When I run `rspec array_operator_matchers_spec.rb`
|
|
206
|
+
Then the output should contain "11 examples, 3 failures"
|
|
207
|
+
And the output should contain:
|
|
208
|
+
"""
|
|
209
|
+
Failure/Error: it { should_not == [1, 2, 3] }
|
|
210
|
+
expected not: == [1, 2, 3]
|
|
211
|
+
got: [1, 2, 3]
|
|
212
|
+
"""
|
|
213
|
+
And the output should contain:
|
|
214
|
+
"""
|
|
215
|
+
Failure/Error: it { should == [1, 3, 2] }
|
|
216
|
+
expected: [1, 3, 2]
|
|
217
|
+
got: [1, 2, 3] (using ==)
|
|
218
|
+
"""
|
|
219
|
+
And the output should contain:
|
|
220
|
+
"""
|
|
221
|
+
Failure/Error: it { should =~ [1, 2, 1] }
|
|
222
|
+
expected collection contained: [1, 1, 2]
|
|
223
|
+
actual collection contained: [1, 2, 3]
|
|
224
|
+
the missing elements were: [1]
|
|
225
|
+
the extra elements were: [3]
|
|
226
|
+
"""
|
|
227
|
+
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
Feature: predicate matchers
|
|
2
|
+
|
|
3
|
+
Ruby objects commonly provide predicate methods:
|
|
4
|
+
|
|
5
|
+
```ruby
|
|
6
|
+
7.zero? # => false
|
|
7
|
+
0.zero? # => true
|
|
8
|
+
[1].empty? # => false
|
|
9
|
+
[].empty? # => true
|
|
10
|
+
{ :a => 5 }.has_key?(:b) # => false
|
|
11
|
+
{ :b => 5 }.has_key?(:b) # => true
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
You could use a basic equality matcher to set expectations on these:
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
7.zero?.should == true # fails with "expected true, got false (using ==)"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
...but RSpec provides dynamic predicate matchers that are more readable and
|
|
21
|
+
provide better failure output.
|
|
22
|
+
|
|
23
|
+
For any predicate method, RSpec gives you a corresponding matcher. Simply
|
|
24
|
+
prefix the method with `be_` and remove the question mark. Examples:
|
|
25
|
+
|
|
26
|
+
```ruby
|
|
27
|
+
7.should_not be_zero # calls 7.zero?
|
|
28
|
+
[].should be_empty # calls [].empty?
|
|
29
|
+
x.should be_multiple_of(3) # calls x.multiple_of?(3)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Alternately, for a predicate method that begins with `has_` like
|
|
33
|
+
`Hash#has_key?`, RSpec allows you to use an alternate form since `be_has_key`
|
|
34
|
+
makes no sense.
|
|
35
|
+
|
|
36
|
+
```ruby
|
|
37
|
+
hash.should have_key(:foo) # calls hash.has_key?(:foo)
|
|
38
|
+
array.should_not have_odd_values # calls array.has_odd_values?
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
In either case, RSpec provides nice, clear error messages, such as:
|
|
42
|
+
|
|
43
|
+
`expected zero? to return true, got false`
|
|
44
|
+
|
|
45
|
+
Any arguments passed to the matcher will be passed on to the predicate method.
|
|
46
|
+
|
|
47
|
+
Scenario: should be_zero (based on Fixnum#zero?)
|
|
48
|
+
Given a file named "should_be_zero_spec.rb" with:
|
|
49
|
+
"""ruby
|
|
50
|
+
describe 0 do
|
|
51
|
+
it { should be_zero }
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
describe 7 do
|
|
55
|
+
it { should be_zero } # deliberate failure
|
|
56
|
+
end
|
|
57
|
+
"""
|
|
58
|
+
When I run `rspec should_be_zero_spec.rb`
|
|
59
|
+
Then the output should contain "2 examples, 1 failure"
|
|
60
|
+
And the output should contain "expected zero? to return true, got false"
|
|
61
|
+
|
|
62
|
+
Scenario: should_not be_empty (based on Array#empty?)
|
|
63
|
+
Given a file named "should_not_be_empty_spec.rb" with:
|
|
64
|
+
"""ruby
|
|
65
|
+
describe [1, 2, 3] do
|
|
66
|
+
it { should_not be_empty }
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
describe [] do
|
|
70
|
+
it { should_not be_empty } # deliberate failure
|
|
71
|
+
end
|
|
72
|
+
"""
|
|
73
|
+
When I run `rspec should_not_be_empty_spec.rb`
|
|
74
|
+
Then the output should contain "2 examples, 1 failure"
|
|
75
|
+
And the output should contain "expected empty? to return false, got true"
|
|
76
|
+
|
|
77
|
+
Scenario: should have_key (based on Hash#has_key?)
|
|
78
|
+
Given a file named "should_have_key_spec.rb" with:
|
|
79
|
+
"""ruby
|
|
80
|
+
describe Hash do
|
|
81
|
+
subject { { :foo => 7 } }
|
|
82
|
+
it { should have_key(:foo) }
|
|
83
|
+
it { should have_key(:bar) } # deliberate failure
|
|
84
|
+
end
|
|
85
|
+
"""
|
|
86
|
+
When I run `rspec should_have_key_spec.rb`
|
|
87
|
+
Then the output should contain "2 examples, 1 failure"
|
|
88
|
+
And the output should contain "expected #has_key?(:bar) to return true, got false"
|
|
89
|
+
|
|
90
|
+
Scenario: should_not have_all_string_keys (based on custom #has_all_string_keys? method)
|
|
91
|
+
Given a file named "should_not_have_all_string_keys_spec.rb" with:
|
|
92
|
+
"""ruby
|
|
93
|
+
class Hash
|
|
94
|
+
def has_all_string_keys?
|
|
95
|
+
keys.all? { |k| String === k }
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
describe Hash do
|
|
100
|
+
context 'with symbol keys' do
|
|
101
|
+
subject { { :foo => 7, :bar => 5 } }
|
|
102
|
+
it { should_not have_all_string_keys }
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
context 'with string keys' do
|
|
106
|
+
subject { { 'foo' => 7, 'bar' => 5 } }
|
|
107
|
+
it { should_not have_all_string_keys } # deliberate failure
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
"""
|
|
111
|
+
When I run `rspec should_not_have_all_string_keys_spec.rb`
|
|
112
|
+
Then the output should contain "2 examples, 1 failure"
|
|
113
|
+
And the output should contain "expected #has_all_string_keys? to return false, got true"
|
|
114
|
+
|
|
115
|
+
Scenario: matcher arguments are passed on to the predicate method
|
|
116
|
+
Given a file named "predicate_matcher_argument_spec.rb" with:
|
|
117
|
+
"""ruby
|
|
118
|
+
class Fixnum
|
|
119
|
+
def multiple_of?(x)
|
|
120
|
+
(self % x).zero?
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
describe 12 do
|
|
125
|
+
it { should be_multiple_of(3) }
|
|
126
|
+
it { should_not be_multiple_of(7) }
|
|
127
|
+
|
|
128
|
+
# deliberate failures
|
|
129
|
+
it { should_not be_multiple_of(4) }
|
|
130
|
+
it { should be_multiple_of(5) }
|
|
131
|
+
end
|
|
132
|
+
"""
|
|
133
|
+
When I run `rspec predicate_matcher_argument_spec.rb`
|
|
134
|
+
Then the output should contain "4 examples, 2 failures"
|
|
135
|
+
And the output should contain "expected multiple_of?(4) to return false, got true"
|
|
136
|
+
And the output should contain "expected multiple_of?(5) to return true, got false"
|
|
137
|
+
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
Feature: respond_to matcher
|
|
2
|
+
|
|
3
|
+
Use the respond_to matcher to specify details of an object's interface. In
|
|
4
|
+
its most basic form:
|
|
5
|
+
|
|
6
|
+
```ruby
|
|
7
|
+
obj.should respond_to(:foo) # pass if obj.respond_to?(:foo)
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
You can specify that an object responds to multiple messages in a single
|
|
11
|
+
statement with multiple arguments passed to the matcher:
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
obj.should respond_to(:foo, :bar) # passes if obj.respond_to?(:foo) && obj.respond_to?(:bar)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
If the number of arguments accepted by the method is important to you,
|
|
18
|
+
you can specify that as well:
|
|
19
|
+
|
|
20
|
+
```ruby
|
|
21
|
+
obj.should respond_to(:foo).with(1).argument
|
|
22
|
+
obj.should respond_to(:bar).with(2).arguments
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Note that this matcher relies entirely upon #respond_to?. If an object
|
|
26
|
+
dynamically responds to a message via #method_missing, but does not indicate
|
|
27
|
+
this via #respond_to?, then this matcher will give you false results.
|
|
28
|
+
|
|
29
|
+
Scenario: basic usage
|
|
30
|
+
Given a file named "respond_to_matcher_spec.rb" with:
|
|
31
|
+
"""ruby
|
|
32
|
+
describe "a string" do
|
|
33
|
+
it { should respond_to(:length) }
|
|
34
|
+
it { should respond_to(:hash, :class, :to_s) }
|
|
35
|
+
it { should_not respond_to(:to_model) }
|
|
36
|
+
it { should_not respond_to(:compact, :flatten) }
|
|
37
|
+
|
|
38
|
+
# deliberate failures
|
|
39
|
+
it { should respond_to(:to_model) }
|
|
40
|
+
it { should respond_to(:compact, :flatten) }
|
|
41
|
+
it { should_not respond_to(:length) }
|
|
42
|
+
it { should_not respond_to(:hash, :class, :to_s) }
|
|
43
|
+
|
|
44
|
+
# mixed examples--String responds to :length but not :flatten
|
|
45
|
+
# both specs should fail
|
|
46
|
+
it { should respond_to(:length, :flatten) }
|
|
47
|
+
it { should_not respond_to(:length, :flatten) }
|
|
48
|
+
end
|
|
49
|
+
"""
|
|
50
|
+
When I run `rspec respond_to_matcher_spec.rb`
|
|
51
|
+
Then the output should contain all of these:
|
|
52
|
+
| 10 examples, 6 failures |
|
|
53
|
+
| expected "a string" to respond to :to_model |
|
|
54
|
+
| expected "a string" to respond to :compact, :flatten |
|
|
55
|
+
| expected "a string" not to respond to :length |
|
|
56
|
+
| expected "a string" not to respond to :hash, :class, :to_s |
|
|
57
|
+
| expected "a string" to respond to :flatten |
|
|
58
|
+
| expected "a string" not to respond to :length |
|
|
59
|
+
|
|
60
|
+
Scenario: specify arguments
|
|
61
|
+
Given a file named "respond_to_matcher_argument_checking_spec.rb" with:
|
|
62
|
+
"""ruby
|
|
63
|
+
describe 7 do
|
|
64
|
+
it { should respond_to(:zero?).with(0).arguments }
|
|
65
|
+
it { should_not respond_to(:zero?).with(1).argument }
|
|
66
|
+
|
|
67
|
+
it { should respond_to(:between?).with(2).arguments }
|
|
68
|
+
it { should_not respond_to(:between?).with(7).arguments }
|
|
69
|
+
|
|
70
|
+
# deliberate failures
|
|
71
|
+
it { should respond_to(:zero?).with(1).argument }
|
|
72
|
+
it { should_not respond_to(:zero?).with(0).arguments }
|
|
73
|
+
|
|
74
|
+
it { should respond_to(:between?).with(7).arguments }
|
|
75
|
+
it { should_not respond_to(:between?).with(2).arguments }
|
|
76
|
+
end
|
|
77
|
+
"""
|
|
78
|
+
When I run `rspec respond_to_matcher_argument_checking_spec.rb`
|
|
79
|
+
Then the output should contain all of these:
|
|
80
|
+
| 8 examples, 4 failures |
|
|
81
|
+
| expected 7 to respond to :zero? with 1 argument |
|
|
82
|
+
| expected 7 not to respond to :zero? with 0 arguments |
|
|
83
|
+
| expected 7 to respond to :between? with 7 arguments |
|
|
84
|
+
| expected 7 not to respond to :between? with 2 arguments |
|