gem_repackager 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +56 -0
- data/Rakefile +9 -0
- data/bin/gem_repackager +57 -0
- data/gem_repackager.gemspec +22 -0
- data/lib/gem_repackager.rb +131 -0
- data/lib/gem_repackager/version.rb +5 -0
- data/spec/packager_spec.rb +131 -0
- data/spec/spec_helper.rb +1 -0
- data/support/bin/rspec +19 -0
- data/support/gems/rspec-2.11.0/License.txt +24 -0
- data/support/gems/rspec-2.11.0/README.md +47 -0
- data/support/gems/rspec-2.11.0/lib/rspec.rb +4 -0
- data/support/gems/rspec-2.11.0/lib/rspec/version.rb +5 -0
- data/support/gems/rspec-core-2.11.1/.document +5 -0
- data/support/gems/rspec-core-2.11.1/.yardopts +6 -0
- data/support/gems/rspec-core-2.11.1/Changelog.md +570 -0
- data/support/gems/rspec-core-2.11.1/License.txt +24 -0
- data/support/gems/rspec-core-2.11.1/README.md +235 -0
- data/support/gems/rspec-core-2.11.1/exe/autospec +13 -0
- data/support/gems/rspec-core-2.11.1/exe/rspec +25 -0
- data/support/gems/rspec-core-2.11.1/features/Autotest.md +38 -0
- data/support/gems/rspec-core-2.11.1/features/README.md +17 -0
- data/support/gems/rspec-core-2.11.1/features/Upgrade.md +364 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/README.md +28 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/example_name_option.feature +101 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/exit_status.feature +83 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/format_option.feature +81 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/init.feature +18 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/line_number_appended_to_path.feature +140 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/line_number_option.feature +58 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/order.feature +29 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/pattern_option.feature +31 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/rake_task.feature +68 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/ruby.feature +22 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/tag.feature +91 -0
- data/support/gems/rspec-core-2.11.1/features/configuration/alias_example_to.feature +48 -0
- data/support/gems/rspec-core-2.11.1/features/configuration/custom_settings.feature +84 -0
- data/support/gems/rspec-core-2.11.1/features/configuration/default_path.feature +38 -0
- data/support/gems/rspec-core-2.11.1/features/configuration/fail_fast.feature +77 -0
- data/support/gems/rspec-core-2.11.1/features/configuration/read_options_from_file.feature +87 -0
- data/support/gems/rspec-core-2.11.1/features/example_groups/basic_structure.feature +55 -0
- data/support/gems/rspec-core-2.11.1/features/example_groups/shared_context.feature +74 -0
- data/support/gems/rspec-core-2.11.1/features/example_groups/shared_examples.feature +204 -0
- data/support/gems/rspec-core-2.11.1/features/expectation_framework_integration/configure_expectation_framework.feature +102 -0
- data/support/gems/rspec-core-2.11.1/features/filtering/exclusion_filters.feature +139 -0
- data/support/gems/rspec-core-2.11.1/features/filtering/if_and_unless.feature +168 -0
- data/support/gems/rspec-core-2.11.1/features/filtering/inclusion_filters.feature +105 -0
- data/support/gems/rspec-core-2.11.1/features/filtering/run_all_when_everything_filtered.feature +46 -0
- data/support/gems/rspec-core-2.11.1/features/formatters/custom_formatter.feature +36 -0
- data/support/gems/rspec-core-2.11.1/features/formatters/text_formatter.feature +46 -0
- data/support/gems/rspec-core-2.11.1/features/helper_methods/arbitrary_methods.feature +40 -0
- data/support/gems/rspec-core-2.11.1/features/helper_methods/let.feature +50 -0
- data/support/gems/rspec-core-2.11.1/features/helper_methods/modules.feature +149 -0
- data/support/gems/rspec-core-2.11.1/features/hooks/around_hooks.feature +343 -0
- data/support/gems/rspec-core-2.11.1/features/hooks/before_and_after_hooks.feature +423 -0
- data/support/gems/rspec-core-2.11.1/features/hooks/filtering.feature +234 -0
- data/support/gems/rspec-core-2.11.1/features/metadata/current_example.feature +17 -0
- data/support/gems/rspec-core-2.11.1/features/metadata/described_class.feature +17 -0
- data/support/gems/rspec-core-2.11.1/features/metadata/user_defined.feature +113 -0
- data/support/gems/rspec-core-2.11.1/features/mock_framework_integration/use_any_framework.feature +106 -0
- data/support/gems/rspec-core-2.11.1/features/mock_framework_integration/use_flexmock.feature +96 -0
- data/support/gems/rspec-core-2.11.1/features/mock_framework_integration/use_mocha.feature +97 -0
- data/support/gems/rspec-core-2.11.1/features/mock_framework_integration/use_rr.feature +98 -0
- data/support/gems/rspec-core-2.11.1/features/mock_framework_integration/use_rspec.feature +97 -0
- data/support/gems/rspec-core-2.11.1/features/pending/pending_examples.feature +229 -0
- data/support/gems/rspec-core-2.11.1/features/spec_files/arbitrary_file_suffix.feature +13 -0
- data/support/gems/rspec-core-2.11.1/features/step_definitions/additional_cli_steps.rb +30 -0
- data/support/gems/rspec-core-2.11.1/features/subject/attribute_of_subject.feature +124 -0
- data/support/gems/rspec-core-2.11.1/features/subject/explicit_subject.feature +82 -0
- data/support/gems/rspec-core-2.11.1/features/subject/implicit_receiver.feature +29 -0
- data/support/gems/rspec-core-2.11.1/features/subject/implicit_subject.feature +63 -0
- data/support/gems/rspec-core-2.11.1/features/support/env.rb +12 -0
- data/support/gems/rspec-core-2.11.1/lib/autotest/discover.rb +1 -0
- data/support/gems/rspec-core-2.11.1/lib/autotest/rspec2.rb +73 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/autorun.rb +2 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core.rb +126 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/backward_compatibility.rb +65 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb +36 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb +944 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/configuration_options.rb +129 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/deprecation.rb +36 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/drb_command_line.rb +26 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/drb_options.rb +87 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/dsl.rb +26 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/example.rb +330 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb +466 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/extensions.rb +4 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/extensions/instance_eval_with_args.rb +44 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/extensions/kernel.rb +9 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/extensions/module_eval_with_args.rb +38 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/extensions/ordered.rb +21 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/filter_manager.rb +203 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/base_formatter.rb +168 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/base_text_formatter.rb +203 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/documentation_formatter.rb +67 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/helpers.rb +39 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/html_formatter.rb +464 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/progress_formatter.rb +32 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/snippet_extractor.rb +58 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/text_mate_formatter.rb +34 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/hooks.rb +495 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/let.rb +110 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/load_path.rb +3 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/metadata.rb +276 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/metadata_hash_builder.rb +97 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/mocking/with_absolutely_nothing.rb +11 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/mocking/with_flexmock.rb +27 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/mocking/with_mocha.rb +29 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/mocking/with_rr.rb +27 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/mocking/with_rspec.rb +23 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/option_parser.rb +181 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/pending.rb +101 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/project_initializer.rb +87 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/rake_task.rb +179 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/reporter.rb +102 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/ruby_project.rb +44 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb +76 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/shared_context.rb +49 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/shared_example_group.rb +96 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/subject.rb +219 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/version.rb +7 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/world.rb +128 -0
- data/support/gems/rspec-core-2.11.1/spec/autotest/discover_spec.rb +19 -0
- data/support/gems/rspec-core-2.11.1/spec/autotest/failed_results_re_spec.rb +45 -0
- data/support/gems/rspec-core-2.11.1/spec/autotest/rspec_spec.rb +123 -0
- data/support/gems/rspec-core-2.11.1/spec/command_line/order_spec.rb +137 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/command_line_spec.rb +108 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/command_line_spec_output.txt +0 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/configuration_options_spec.rb +377 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/configuration_spec.rb +1196 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/deprecations_spec.rb +66 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/drb_command_line_spec.rb +108 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/drb_options_spec.rb +180 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/dsl_spec.rb +17 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/example_group_spec.rb +1098 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/example_spec.rb +370 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/filter_manager_spec.rb +256 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/base_formatter_spec.rb +80 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/base_text_formatter_spec.rb +363 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/documentation_formatter_spec.rb +88 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/helpers_spec.rb +66 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/html_formatted-1.8.7-jruby.html +410 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/html_formatted-1.8.7.html +409 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/html_formatted-1.9.2.html +416 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/html_formatted-1.9.3.html +416 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/html_formatter_spec.rb +82 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/progress_formatter_spec.rb +30 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/snippet_extractor_spec.rb +18 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/text_mate_formatted-1.8.7-jruby.html +410 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/text_mate_formatted-1.8.7.html +409 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/text_mate_formatted-1.9.2.html +416 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/text_mate_formatted-1.9.3.html +416 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/text_mate_formatter_spec.rb +83 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/hooks_filtering_spec.rb +227 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/hooks_spec.rb +250 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/kernel_extensions_spec.rb +9 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/let_spec.rb +55 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/metadata_spec.rb +447 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/option_parser_spec.rb +166 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/pending_example_spec.rb +220 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/project_initializer_spec.rb +130 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/rake_task_spec.rb +138 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/reporter_spec.rb +103 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/resources/a_bar.rb +0 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/resources/a_foo.rb +0 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/resources/a_spec.rb +1 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/resources/custom_example_group_runner.rb +14 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/resources/formatter_specs.rb +60 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/resources/utf8_encoded.rb +8 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/rspec_matchers_spec.rb +45 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/ruby_project_spec.rb +24 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/runner_spec.rb +81 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/shared_context_spec.rb +67 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/shared_example_group_spec.rb +84 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/subject_spec.rb +244 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/world_spec.rb +144 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core_spec.rb +35 -0
- data/support/gems/rspec-core-2.11.1/spec/spec_helper.rb +98 -0
- data/support/gems/rspec-core-2.11.1/spec/support/config_options_helper.rb +24 -0
- data/support/gems/rspec-core-2.11.1/spec/support/helper_methods.rb +5 -0
- data/support/gems/rspec-core-2.11.1/spec/support/matchers.rb +65 -0
- data/support/gems/rspec-core-2.11.1/spec/support/shared_example_groups.rb +41 -0
- data/support/gems/rspec-core-2.11.1/spec/support/spec_files.rb +44 -0
- data/support/gems/rspec-expectations-2.11.2/.document +5 -0
- data/support/gems/rspec-expectations-2.11.2/.yardopts +6 -0
- data/support/gems/rspec-expectations-2.11.2/Changelog.md +246 -0
- data/support/gems/rspec-expectations-2.11.2/License.txt +23 -0
- data/support/gems/rspec-expectations-2.11.2/README.md +224 -0
- data/support/gems/rspec-expectations-2.11.2/features/README.md +49 -0
- data/support/gems/rspec-expectations-2.11.2/features/Upgrade.md +53 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/README.md +90 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/be.feature +173 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/be_within.feature +46 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/cover.feature +45 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/end_with.feature +46 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/equality.feature +145 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/exist.feature +43 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/expect_change.feature +59 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/expect_error.feature +138 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/have.feature +103 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/include.feature +121 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/match.feature +50 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/operators.feature +221 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/predicates.feature +128 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/respond_to.feature +78 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/satisfy.feature +31 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/start_with.feature +46 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/throw_symbol.feature +85 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/types.feature +114 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/yield.feature +146 -0
- data/support/gems/rspec-expectations-2.11.2/features/custom_matchers/access_running_example.feature +53 -0
- data/support/gems/rspec-expectations-2.11.2/features/custom_matchers/define_diffable_matcher.feature +27 -0
- data/support/gems/rspec-expectations-2.11.2/features/custom_matchers/define_matcher.feature +340 -0
- data/support/gems/rspec-expectations-2.11.2/features/custom_matchers/define_matcher_outside_rspec.feature +38 -0
- data/support/gems/rspec-expectations-2.11.2/features/custom_matchers/define_matcher_with_fluent_interface.feature +24 -0
- data/support/gems/rspec-expectations-2.11.2/features/customized_message.feature +22 -0
- data/support/gems/rspec-expectations-2.11.2/features/diffing.feature +85 -0
- data/support/gems/rspec-expectations-2.11.2/features/implicit_docstrings.feature +52 -0
- data/support/gems/rspec-expectations-2.11.2/features/step_definitions/additional_cli_steps.rb +22 -0
- data/support/gems/rspec-expectations-2.11.2/features/support/env.rb +5 -0
- data/support/gems/rspec-expectations-2.11.2/features/syntax_configuration.feature +68 -0
- data/support/gems/rspec-expectations-2.11.2/features/test_frameworks/test_unit.feature +46 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec-expectations.rb +1 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations.rb +47 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/deprecation.rb +38 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/differ.rb +81 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/errors.rb +9 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/expectation_target.rb +58 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/extensions.rb +2 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/extensions/array.rb +9 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/extensions/object.rb +39 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/fail_with.rb +55 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/handler.rb +48 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/syntax.rb +110 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/version.rb +8 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers.rb +689 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/be_close.rb +9 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in.rb +39 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/base_matcher.rb +68 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/be.rb +185 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/be_instance_of.rb +11 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/be_kind_of.rb +11 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/be_within.rb +45 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/change.rb +132 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/cover.rb +21 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/eq.rb +22 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/eql.rb +23 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/equal.rb +44 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/exist.rb +26 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/has.rb +47 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/have.rb +107 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/include.rb +51 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/match.rb +12 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/match_array.rb +45 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/raise_error.rb +96 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/respond_to.rb +73 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/satisfy.rb +29 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/start_and_end_with.rb +48 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/throw_symbol.rb +93 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/yield.rb +219 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/compatibility.rb +14 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/configuration.rb +66 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/dsl.rb +24 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/extensions/instance_eval_with_args.rb +39 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/generated_descriptions.rb +36 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/matcher.rb +299 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/method_missing.rb +12 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/operator_matcher.rb +84 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/pretty.rb +60 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/expectations/differ_spec.rb +153 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/expectations/expectation_target_spec.rb +65 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/expectations/extensions/kernel_spec.rb +67 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/expectations/fail_with_spec.rb +70 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/expectations/handler_spec.rb +206 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/base_matcher_spec.rb +60 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/be_close_spec.rb +22 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/be_instance_of_spec.rb +36 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/be_kind_of_spec.rb +33 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/be_spec.rb +452 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/be_within_spec.rb +76 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/change_spec.rb +522 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/configuration_spec.rb +160 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/cover_spec.rb +65 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/description_generation_spec.rb +176 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/dsl_spec.rb +57 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/eq_spec.rb +50 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/eql_spec.rb +37 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/equal_spec.rb +57 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/exist_spec.rb +104 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/has_spec.rb +113 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/have_spec.rb +458 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/include_spec.rb +363 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/match_array_spec.rb +120 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/match_spec.rb +57 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/matcher_spec.rb +434 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/matchers_spec.rb +31 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/method_missing_spec.rb +24 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/operator_matcher_spec.rb +221 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/raise_error_spec.rb +339 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/respond_to_spec.rb +292 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/satisfy_spec.rb +40 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/start_with_end_with_spec.rb +174 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/throw_symbol_spec.rb +111 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/yield_spec.rb +374 -0
- data/support/gems/rspec-expectations-2.11.2/spec/spec_helper.rb +27 -0
- data/support/gems/rspec-expectations-2.11.2/spec/support/classes.rb +56 -0
- data/support/gems/rspec-expectations-2.11.2/spec/support/in_sub_process.rb +31 -0
- data/support/gems/rspec-expectations-2.11.2/spec/support/matchers.rb +22 -0
- data/support/gems/rspec-expectations-2.11.2/spec/support/ruby_version.rb +10 -0
- data/support/gems/rspec-mocks-2.11.1/.document +5 -0
- data/support/gems/rspec-mocks-2.11.1/.yardopts +6 -0
- data/support/gems/rspec-mocks-2.11.1/Changelog.md +199 -0
- data/support/gems/rspec-mocks-2.11.1/License.txt +23 -0
- data/support/gems/rspec-mocks-2.11.1/README.md +276 -0
- data/support/gems/rspec-mocks-2.11.1/features/README.md +67 -0
- data/support/gems/rspec-mocks-2.11.1/features/Scope.md +17 -0
- data/support/gems/rspec-mocks-2.11.1/features/Upgrade.md +22 -0
- data/support/gems/rspec-mocks-2.11.1/features/argument_matchers/README.md +27 -0
- data/support/gems/rspec-mocks-2.11.1/features/argument_matchers/explicit.feature +60 -0
- data/support/gems/rspec-mocks-2.11.1/features/argument_matchers/general_matchers.feature +85 -0
- data/support/gems/rspec-mocks-2.11.1/features/argument_matchers/type_matchers.feature +25 -0
- data/support/gems/rspec-mocks-2.11.1/features/message_expectations/README.md +58 -0
- data/support/gems/rspec-mocks-2.11.1/features/message_expectations/any_instance.feature +21 -0
- data/support/gems/rspec-mocks-2.11.1/features/message_expectations/block_local_expectations.feature.pending +55 -0
- data/support/gems/rspec-mocks-2.11.1/features/message_expectations/expect_message.feature +94 -0
- data/support/gems/rspec-mocks-2.11.1/features/message_expectations/receive_counts.feature +209 -0
- data/support/gems/rspec-mocks-2.11.1/features/message_expectations/warn_when_expectation_is_set_on_nil.feature +50 -0
- data/support/gems/rspec-mocks-2.11.1/features/method_stubs/README.md +43 -0
- data/support/gems/rspec-mocks-2.11.1/features/method_stubs/any_instance.feature +133 -0
- data/support/gems/rspec-mocks-2.11.1/features/method_stubs/as_null_object.feature +35 -0
- data/support/gems/rspec-mocks-2.11.1/features/method_stubs/simple_return_value.feature +64 -0
- data/support/gems/rspec-mocks-2.11.1/features/method_stubs/stub_chain.feature +51 -0
- data/support/gems/rspec-mocks-2.11.1/features/method_stubs/stub_implementation.feature +26 -0
- data/support/gems/rspec-mocks-2.11.1/features/method_stubs/to_ary.feature +47 -0
- data/support/gems/rspec-mocks-2.11.1/features/outside_rspec/configuration.feature +82 -0
- data/support/gems/rspec-mocks-2.11.1/features/outside_rspec/standalone.feature +32 -0
- data/support/gems/rspec-mocks-2.11.1/features/step_definitions/additional_cli_steps.rb +4 -0
- data/support/gems/rspec-mocks-2.11.1/features/stubbing_constants/README.md +62 -0
- data/support/gems/rspec-mocks-2.11.1/features/stubbing_constants/stub_defined_constant.feature +79 -0
- data/support/gems/rspec-mocks-2.11.1/features/stubbing_constants/stub_undefined_constant.feature +50 -0
- data/support/gems/rspec-mocks-2.11.1/features/support/env.rb +6 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks.rb +39 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/any_instance.rb +81 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/any_instance/chain.rb +77 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/any_instance/expectation_chain.rb +57 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/any_instance/message_chains.rb +60 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/any_instance/recorder.rb +197 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/any_instance/stub_chain.rb +37 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/any_instance/stub_chain_chain.rb +25 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/argument_list_matcher.rb +93 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/argument_matchers.rb +238 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/error_generator.rb +114 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/errors.rb +12 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/example_methods.rb +95 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/extensions/instance_exec.rb +34 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/extensions/marshal.rb +23 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/extensions/psych.rb +23 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/framework.rb +20 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/message_expectation.rb +488 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/method_double.rb +196 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/methods.rb +155 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/mock.rb +7 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/order_group.rb +40 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/proxy.rb +190 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/serialization.rb +34 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/space.rb +34 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/standalone.rb +3 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/stub_const.rb +280 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/test_double.rb +103 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/version.rb +7 -0
- data/support/gems/rspec-mocks-2.11.1/lib/spec/mocks.rb +2 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/and_yield_spec.rb +114 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/any_instance/message_chains_spec.rb +40 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/any_instance_spec.rb +825 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/any_number_of_times_spec.rb +30 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/argument_expectation_spec.rb +34 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/at_least_spec.rb +142 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/at_most_spec.rb +90 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/block_return_value_spec.rb +53 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_10260_spec.rb +8 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_10263_spec.rb +25 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_11545_spec.rb +32 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_496_spec.rb +17 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_600_spec.rb +22 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_7611_spec.rb +16 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_8165_spec.rb +31 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_830_spec.rb +21 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_957_spec.rb +22 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/double_spec.rb +12 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/failing_argument_matchers_spec.rb +95 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/hash_excluding_matcher_spec.rb +67 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/hash_including_matcher_spec.rb +90 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/mock_ordering_spec.rb +103 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/mock_space_spec.rb +58 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/mock_spec.rb +730 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/multiple_return_value_spec.rb +119 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/nil_expectation_warning_spec.rb +62 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/null_object_mock_spec.rb +106 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/once_counts_spec.rb +52 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/options_hash_spec.rb +35 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/partial_mock_spec.rb +156 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/partial_mock_using_mocks_directly_spec.rb +95 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/passing_argument_matchers_spec.rb +142 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/precise_counts_spec.rb +68 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/record_messages_spec.rb +26 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/serialization_spec.rb +111 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/stash_spec.rb +27 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/stub_chain_spec.rb +149 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/stub_const_spec.rb +309 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/stub_implementation_spec.rb +68 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/stub_spec.rb +238 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/stubbed_message_expectations_spec.rb +47 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/test_double_spec.rb +57 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/to_ary_spec.rb +40 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/twice_counts_spec.rb +66 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks_spec.rb +51 -0
- data/support/gems/rspec-mocks-2.11.1/spec/spec_helper.rb +15 -0
- data/support/gems/rspec-rails-2.11.0/.document +5 -0
- data/support/gems/rspec-rails-2.11.0/.yardopts +8 -0
- data/support/gems/rspec-rails-2.11.0/Changelog.md +293 -0
- data/support/gems/rspec-rails-2.11.0/License.txt +22 -0
- data/support/gems/rspec-rails-2.11.0/README.md +494 -0
- data/support/gems/rspec-rails-2.11.0/features/Autotest.md +24 -0
- data/support/gems/rspec-rails-2.11.0/features/Generators.md +8 -0
- data/support/gems/rspec-rails-2.11.0/features/GettingStarted.md +84 -0
- data/support/gems/rspec-rails-2.11.0/features/README.md +56 -0
- data/support/gems/rspec-rails-2.11.0/features/RailsVersions.md +4 -0
- data/support/gems/rspec-rails-2.11.0/features/Transactions.md +84 -0
- data/support/gems/rspec-rails-2.11.0/features/Upgrade.md +117 -0
- data/support/gems/rspec-rails-2.11.0/features/controller_specs/Cookies.md +57 -0
- data/support/gems/rspec-rails-2.11.0/features/controller_specs/README.md +45 -0
- data/support/gems/rspec-rails-2.11.0/features/controller_specs/anonymous_controller.feature +330 -0
- data/support/gems/rspec-rails-2.11.0/features/controller_specs/bypass_rescue.feature +75 -0
- data/support/gems/rspec-rails-2.11.0/features/controller_specs/controller_spec.feature +35 -0
- data/support/gems/rspec-rails-2.11.0/features/controller_specs/isolation_from_views.feature +87 -0
- data/support/gems/rspec-rails-2.11.0/features/controller_specs/render_views.feature +114 -0
- data/support/gems/rspec-rails-2.11.0/features/helper_specs/helper_spec.feature +96 -0
- data/support/gems/rspec-rails-2.11.0/features/mailer_specs/url_helpers.feature +38 -0
- data/support/gems/rspec-rails-2.11.0/features/matchers/README.md +18 -0
- data/support/gems/rspec-rails-2.11.0/features/matchers/new_record_matcher.feature +28 -0
- data/support/gems/rspec-rails-2.11.0/features/matchers/redirect_to_matcher.feature +40 -0
- data/support/gems/rspec-rails-2.11.0/features/matchers/relation_match_array.feature +20 -0
- data/support/gems/rspec-rails-2.11.0/features/matchers/render_template_matcher.feature +28 -0
- data/support/gems/rspec-rails-2.11.0/features/mocks/mock_model.feature +147 -0
- data/support/gems/rspec-rails-2.11.0/features/mocks/stub_model.feature +58 -0
- data/support/gems/rspec-rails-2.11.0/features/model_specs/README.md +21 -0
- data/support/gems/rspec-rails-2.11.0/features/model_specs/errors_on.feature +33 -0
- data/support/gems/rspec-rails-2.11.0/features/model_specs/transactional_examples.feature +109 -0
- data/support/gems/rspec-rails-2.11.0/features/request_specs/request_spec.feature +49 -0
- data/support/gems/rspec-rails-2.11.0/features/routing_specs/README.md +17 -0
- data/support/gems/rspec-rails-2.11.0/features/routing_specs/be_routable_matcher.feature +80 -0
- data/support/gems/rspec-rails-2.11.0/features/routing_specs/named_routes.feature +18 -0
- data/support/gems/rspec-rails-2.11.0/features/routing_specs/route_to_matcher.feature +90 -0
- data/support/gems/rspec-rails-2.11.0/features/step_definitions/additional_cli_steps.rb +4 -0
- data/support/gems/rspec-rails-2.11.0/features/step_definitions/model_steps.rb +3 -0
- data/support/gems/rspec-rails-2.11.0/features/support/env.rb +53 -0
- data/support/gems/rspec-rails-2.11.0/features/view_specs/inferred_controller_path.feature +44 -0
- data/support/gems/rspec-rails-2.11.0/features/view_specs/stub_template.feature +51 -0
- data/support/gems/rspec-rails-2.11.0/features/view_specs/view_spec.feature +174 -0
- data/support/gems/rspec-rails-2.11.0/lib/autotest/rails_rspec2.rb +84 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec.rb +25 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/controller/controller_generator.rb +33 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/controller/templates/controller_spec.rb +14 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/controller/templates/view_spec.rb +5 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/helper/helper_generator.rb +15 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/helper/templates/helper_spec.rb +15 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/install/install_generator.rb +24 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/install/templates/.rspec +1 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/install/templates/spec/spec_helper.rb +38 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/integration/integration_generator.rb +27 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/integration/templates/request_spec.rb +15 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/mailer/mailer_generator.rb +20 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/mailer/templates/fixture +3 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/mailer/templates/mailer_spec.rb +23 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/model/model_generator.rb +22 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/model/templates/fixtures.yml +19 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/model/templates/model_spec.rb +5 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/observer/observer_generator.rb +12 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/observer/templates/observer_spec.rb +5 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/scaffold/scaffold_generator.rb +158 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/scaffold/templates/controller_spec.rb +166 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/scaffold/templates/edit_spec.rb +31 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/scaffold/templates/index_spec.rb +32 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/scaffold/templates/new_spec.rb +30 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/scaffold/templates/routing_spec.rb +37 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/scaffold/templates/show_spec.rb +28 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/view/templates/view_spec.rb +5 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/view/view_generator.rb +21 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec-rails.rb +14 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails.rb +17 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/adapters.rb +79 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example.rb +38 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/controller_example_group.rb +128 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/helper_example_group.rb +40 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/mailer_example_group.rb +22 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/model_example_group.rb +10 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/rails_example_group.rb +14 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/request_example_group.rb +23 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/routing_example_group.rb +27 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/view_example_group.rb +155 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/extensions.rb +1 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/extensions/active_record/base.rb +45 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/fixture_support.rb +40 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers.rb +26 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers/be_a_new.rb +76 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers/be_new_record.rb +19 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers/have_extension.rb +35 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers/have_rendered.rb +40 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers/redirect_to.rb +37 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers/relation_match_array.rb +3 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers/routing_matchers.rb +107 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/mocks.rb +243 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/module_inclusion.rb +29 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/tasks/rspec.rake +56 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/vendor/capybara.rb +29 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/vendor/webrat.rb +33 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/version.rb +7 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/view_assigns.rb +45 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/view_rendering.rb +121 -0
- data/support/gems/rspec-rails-2.11.0/spec/autotest/rails_rspec2_spec.rb +36 -0
- data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/controller/controller_generator_spec.rb +86 -0
- data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/helper/helper_generator_spec.rb +30 -0
- data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/install/install_generator_spec.rb +18 -0
- data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/integration/integration_generator_spec.rb +44 -0
- data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/mailer/mailer_generator_spec.rb +48 -0
- data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/model/model_generator_spec.rb +52 -0
- data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/observer/observer_generator_spec.rb +21 -0
- data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/scaffold/scaffold_generator_spec.rb +107 -0
- data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/view/view_generator_spec.rb +41 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/assertion_adapter_spec.rb +28 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/configuration_spec.rb +26 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/deprecations_spec.rb +18 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/example/controller_example_group_spec.rb +100 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/example/helper_example_group_spec.rb +64 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/example/mailer_example_group_spec.rb +21 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/example/model_example_group_spec.rb +15 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/example/request_example_group_spec.rb +17 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/example/routing_example_group_spec.rb +32 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/example/view_example_group_spec.rb +214 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/extensions/active_model/errors_on_spec.rb +23 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/extensions/active_record/records_spec.rb +9 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/fixture_support_spec.rb +17 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/be_a_new_spec.rb +142 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/be_new_record_spec.rb +19 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/be_routable_spec.rb +41 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/errors_on_spec.rb +38 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/have_rendered_spec.rb +93 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/redirect_to_spec.rb +80 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/relation_match_array_spec.rb +20 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/route_to_spec.rb +152 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/mocks/mock_model_spec.rb +379 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/mocks/stub_model_spec.rb +154 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/setup_and_teardown_adapter_spec.rb +32 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/view_rendering_spec.rb +111 -0
- data/support/gems/rspec-rails-2.11.0/spec/spec_helper.rb +31 -0
- data/support/gems/rspec-rails-2.11.0/spec/support/ar_classes.rb +42 -0
- data/support/gems/rspec-rails-2.11.0/spec/support/helpers.rb +20 -0
- data/support/gems/rspec-rails-2.11.0/spec/support/matchers.rb +9 -0
- data/support/specifications/rspec-2.11.0.gemspec +39 -0
- data/support/specifications/rspec-core-2.11.1.gemspec +61 -0
- data/support/specifications/rspec-expectations-2.11.2.gemspec +40 -0
- data/support/specifications/rspec-mocks-2.11.1.gemspec +37 -0
- data/support/specifications/rspec-rails-2.11.0.gemspec +55 -0
- metadata +653 -0
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module RSpec
|
4
|
+
module Matchers
|
5
|
+
describe "eq" do
|
6
|
+
it "is diffable" do
|
7
|
+
eq(1).should be_diffable
|
8
|
+
end
|
9
|
+
|
10
|
+
it "matches when actual == expected" do
|
11
|
+
1.should eq(1)
|
12
|
+
end
|
13
|
+
|
14
|
+
it "does not match when actual != expected" do
|
15
|
+
1.should_not eq(2)
|
16
|
+
end
|
17
|
+
|
18
|
+
it "compares by sending == to actual (not expected)" do
|
19
|
+
called = false
|
20
|
+
actual = Class.new do
|
21
|
+
define_method :== do |other|
|
22
|
+
called = true
|
23
|
+
end
|
24
|
+
end.new
|
25
|
+
|
26
|
+
actual.should eq :anything # to trigger the matches? method
|
27
|
+
called.should be_true
|
28
|
+
end
|
29
|
+
|
30
|
+
it "describes itself" do
|
31
|
+
matcher = eq(1)
|
32
|
+
matcher.matches?(1)
|
33
|
+
matcher.description.should eq "eq 1"
|
34
|
+
end
|
35
|
+
|
36
|
+
it "provides message, expected and actual on #failure_message" do
|
37
|
+
matcher = eq("1")
|
38
|
+
matcher.matches?(1)
|
39
|
+
matcher.failure_message_for_should.should eq "\nexpected: \"1\"\n got: 1\n\n(compared using ==)\n"
|
40
|
+
end
|
41
|
+
|
42
|
+
it "provides message, expected and actual on #negative_failure_message" do
|
43
|
+
matcher = eq(1)
|
44
|
+
matcher.matches?(1)
|
45
|
+
matcher.failure_message_for_should_not.should eq "\nexpected: value != 1\n got: 1\n\n(compared using ==)\n"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module RSpec
|
4
|
+
module Matchers
|
5
|
+
describe "eql" do
|
6
|
+
it "is diffable" do
|
7
|
+
eql(1).should be_diffable
|
8
|
+
end
|
9
|
+
|
10
|
+
it "matches when actual.eql?(expected)" do
|
11
|
+
1.should eql(1)
|
12
|
+
end
|
13
|
+
|
14
|
+
it "does not match when !actual.eql?(expected)" do
|
15
|
+
1.should_not eql(2)
|
16
|
+
end
|
17
|
+
|
18
|
+
it "describes itself" do
|
19
|
+
matcher = eql(1)
|
20
|
+
matcher.matches?(1)
|
21
|
+
matcher.description.should == "eql 1"
|
22
|
+
end
|
23
|
+
|
24
|
+
it "provides message, expected and actual on #failure_message" do
|
25
|
+
matcher = eql("1")
|
26
|
+
matcher.matches?(1)
|
27
|
+
matcher.failure_message_for_should.should == "\nexpected: \"1\"\n got: 1\n\n(compared using eql?)\n"
|
28
|
+
end
|
29
|
+
|
30
|
+
it "provides message, expected and actual on #negative_failure_message" do
|
31
|
+
matcher = eql(1)
|
32
|
+
matcher.matches?(1)
|
33
|
+
matcher.failure_message_for_should_not.should == "\nexpected: value != 1\n got: 1\n\n(compared using eql?)\n"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
module RSpec
|
3
|
+
module Matchers
|
4
|
+
describe "equal" do
|
5
|
+
|
6
|
+
def inspect_object(o)
|
7
|
+
"#<#{o.class}:#{o.object_id}> => #{o.inspect}"
|
8
|
+
end
|
9
|
+
|
10
|
+
it "matches when actual.equal?(expected)" do
|
11
|
+
1.should equal(1)
|
12
|
+
end
|
13
|
+
|
14
|
+
it "does not match when !actual.equal?(expected)" do
|
15
|
+
"1".should_not equal("1")
|
16
|
+
end
|
17
|
+
|
18
|
+
it "describes itself" do
|
19
|
+
matcher = equal(1)
|
20
|
+
matcher.matches?(1)
|
21
|
+
matcher.description.should == "equal 1"
|
22
|
+
end
|
23
|
+
|
24
|
+
it "provides message on #failure_message" do
|
25
|
+
expected, actual = "1", "1"
|
26
|
+
matcher = equal(expected)
|
27
|
+
matcher.matches?(actual)
|
28
|
+
|
29
|
+
matcher.failure_message_for_should.should == <<-MESSAGE
|
30
|
+
|
31
|
+
expected #{inspect_object(expected)}
|
32
|
+
got #{inspect_object(actual)}
|
33
|
+
|
34
|
+
Compared using equal?, which compares object identity,
|
35
|
+
but expected and actual are not the same object. Use
|
36
|
+
'actual.should eq(expected)' if you don't care about
|
37
|
+
object identity in this example.
|
38
|
+
|
39
|
+
MESSAGE
|
40
|
+
end
|
41
|
+
|
42
|
+
it "provides message on #negative_failure_message" do
|
43
|
+
expected = actual = "1"
|
44
|
+
matcher = equal(expected)
|
45
|
+
matcher.matches?(actual)
|
46
|
+
matcher.failure_message_for_should_not.should == <<-MESSAGE
|
47
|
+
|
48
|
+
expected not #{inspect_object(expected)}
|
49
|
+
got #{inspect_object(actual)}
|
50
|
+
|
51
|
+
Compared using equal?, which compares object identity.
|
52
|
+
|
53
|
+
MESSAGE
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,104 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "exist matcher" do
|
4
|
+
context "when the object does not respond to #exist? or #exists?" do
|
5
|
+
subject { mock }
|
6
|
+
|
7
|
+
[:should, :should_not].each do |should_method|
|
8
|
+
describe "#{should_method} exist" do
|
9
|
+
it "raises an error" do
|
10
|
+
expect {
|
11
|
+
subject.send(should_method, exist)
|
12
|
+
}.to raise_error(NoMethodError)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
[:exist?, :exists?].each do |predicate|
|
19
|
+
context "when the object responds to ##{predicate}" do
|
20
|
+
describe "should exist" do
|
21
|
+
it "passes if #{predicate}" do
|
22
|
+
mock(predicate => true).should exist
|
23
|
+
end
|
24
|
+
|
25
|
+
it "fails if not #{predicate}" do
|
26
|
+
expect {
|
27
|
+
mock(predicate => false).should exist
|
28
|
+
}.to fail_with(/expected .* to exist/)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe "should not exist" do
|
33
|
+
it "passes if not #{predicate}" do
|
34
|
+
mock(predicate => false).should_not exist
|
35
|
+
end
|
36
|
+
|
37
|
+
it "fails if #{predicate}" do
|
38
|
+
expect {
|
39
|
+
mock(predicate => true).should_not exist
|
40
|
+
}.to fail_with(/expected .* not to exist/)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
context "when the object responds to #exist? and #exists?" do
|
47
|
+
context "when they both return falsey values" do
|
48
|
+
subject { mock(:exist? => false, :exists? => nil) }
|
49
|
+
|
50
|
+
describe "should_not exist" do
|
51
|
+
it "passes" do
|
52
|
+
subject.should_not exist
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
describe "should exist" do
|
57
|
+
it "fails" do
|
58
|
+
expect {
|
59
|
+
subject.should exist
|
60
|
+
}.to fail_with(/expected .* to exist/)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
context "when they both return truthy values" do
|
66
|
+
subject { mock(:exist? => true, :exists? => "something true") }
|
67
|
+
|
68
|
+
describe "should_not exist" do
|
69
|
+
it "fails" do
|
70
|
+
expect {
|
71
|
+
subject.should_not exist
|
72
|
+
}.to fail_with(/expected .* not to exist/)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
describe "should exist" do
|
77
|
+
it "passes" do
|
78
|
+
subject.should exist
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
context "when they return values with different truthiness" do
|
84
|
+
subject { mock(:exist? => true, :exists? => false) }
|
85
|
+
|
86
|
+
[:should, :should_not].each do |should_method|
|
87
|
+
describe "#{should_method} exist" do
|
88
|
+
it "raises an error" do
|
89
|
+
expect {
|
90
|
+
subject.send(should_method, exist)
|
91
|
+
}.to raise_error(/#exist\? and #exists\? returned different values/)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
it 'passes any provided arguments to the call to #exist?' do
|
99
|
+
object = mock
|
100
|
+
object.should_receive(:exist?).with(:foo, :bar) { true }
|
101
|
+
|
102
|
+
object.should exist(:foo, :bar)
|
103
|
+
end
|
104
|
+
end
|
@@ -0,0 +1,113 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "should have_sym(*args)" do
|
4
|
+
it "passes if #has_sym?(*args) returns true" do
|
5
|
+
{:a => "A"}.should have_key(:a)
|
6
|
+
end
|
7
|
+
|
8
|
+
it "fails if #has_sym?(*args) returns false" do
|
9
|
+
lambda {
|
10
|
+
{:b => "B"}.should have_key(:a)
|
11
|
+
}.should fail_with("expected #has_key?(:a) to return true, got false")
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'does not include any args in the failure message if no args were given to the matcher' do
|
15
|
+
o = Object.new
|
16
|
+
def o.has_some_stuff?; false; end
|
17
|
+
expect {
|
18
|
+
o.should have_some_stuff
|
19
|
+
}.to fail_with("expected #has_some_stuff? to return true, got false")
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'includes multiple args in the failure message if multiple args were given to the matcher' do
|
23
|
+
o = Object.new
|
24
|
+
def o.has_some_stuff?(*_); false; end
|
25
|
+
expect {
|
26
|
+
o.should have_some_stuff(:a, 7, "foo")
|
27
|
+
}.to fail_with('expected #has_some_stuff?(:a, 7, "foo") to return true, got false')
|
28
|
+
end
|
29
|
+
|
30
|
+
it "fails if #has_sym?(*args) returns nil" do
|
31
|
+
klass = Class.new do
|
32
|
+
def has_foo?
|
33
|
+
end
|
34
|
+
end
|
35
|
+
lambda {
|
36
|
+
klass.new.should have_foo
|
37
|
+
}.should fail_with(/expected #has_foo.* to return true, got false/)
|
38
|
+
end
|
39
|
+
|
40
|
+
it "fails if target does not respond to #has_sym?" do
|
41
|
+
lambda {
|
42
|
+
Object.new.should have_key(:a)
|
43
|
+
}.should raise_error(NoMethodError)
|
44
|
+
end
|
45
|
+
|
46
|
+
it "reraises an exception thrown in #has_sym?(*args)" do
|
47
|
+
o = Object.new
|
48
|
+
def o.has_sym?(*args)
|
49
|
+
raise "Funky exception"
|
50
|
+
end
|
51
|
+
lambda { o.should have_sym(:foo) }.should raise_error("Funky exception")
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
describe "should_not have_sym(*args)" do
|
56
|
+
it "passes if #has_sym?(*args) returns false" do
|
57
|
+
{:a => "A"}.should_not have_key(:b)
|
58
|
+
end
|
59
|
+
|
60
|
+
it "passes if #has_sym?(*args) returns nil" do
|
61
|
+
klass = Class.new do
|
62
|
+
def has_foo?
|
63
|
+
end
|
64
|
+
end
|
65
|
+
klass.new.should_not have_foo
|
66
|
+
end
|
67
|
+
|
68
|
+
it "fails if #has_sym?(*args) returns true" do
|
69
|
+
lambda {
|
70
|
+
{:a => "A"}.should_not have_key(:a)
|
71
|
+
}.should fail_with("expected #has_key?(:a) to return false, got true")
|
72
|
+
end
|
73
|
+
|
74
|
+
it "fails if target does not respond to #has_sym?" do
|
75
|
+
lambda {
|
76
|
+
Object.new.should have_key(:a)
|
77
|
+
}.should raise_error(NoMethodError)
|
78
|
+
end
|
79
|
+
|
80
|
+
it "reraises an exception thrown in #has_sym?(*args)" do
|
81
|
+
o = Object.new
|
82
|
+
def o.has_sym?(*args)
|
83
|
+
raise "Funky exception"
|
84
|
+
end
|
85
|
+
lambda { o.should_not have_sym(:foo) }.should raise_error("Funky exception")
|
86
|
+
end
|
87
|
+
|
88
|
+
it 'does not include any args in the failure message if no args were given to the matcher' do
|
89
|
+
o = Object.new
|
90
|
+
def o.has_some_stuff?; true; end
|
91
|
+
expect {
|
92
|
+
o.should_not have_some_stuff
|
93
|
+
}.to fail_with("expected #has_some_stuff? to return false, got true")
|
94
|
+
end
|
95
|
+
|
96
|
+
it 'includes multiple args in the failure message if multiple args were given to the matcher' do
|
97
|
+
o = Object.new
|
98
|
+
def o.has_some_stuff?(*_); true; end
|
99
|
+
expect {
|
100
|
+
o.should_not have_some_stuff(:a, 7, "foo")
|
101
|
+
}.to fail_with('expected #has_some_stuff?(:a, 7, "foo") to return false, got true')
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
describe "has" do
|
106
|
+
it "works when the target implements #send" do
|
107
|
+
o = {:a => "A"}
|
108
|
+
def o.send(*args); raise "DOH! Library developers shouldn't use #send!" end
|
109
|
+
lambda {
|
110
|
+
o.should have_key(:a)
|
111
|
+
}.should_not raise_error
|
112
|
+
end
|
113
|
+
end
|
@@ -0,0 +1,458 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'stringio'
|
3
|
+
|
4
|
+
describe "have matcher" do
|
5
|
+
|
6
|
+
before(:each) do
|
7
|
+
if defined?(::ActiveSupport::Inflector) && ::ActiveSupport::Inflector.respond_to?(:pluralize)
|
8
|
+
@active_support_was_defined = true
|
9
|
+
else
|
10
|
+
@active_support_was_defined = false
|
11
|
+
module ::ActiveSupport
|
12
|
+
class Inflector
|
13
|
+
def self.pluralize(string)
|
14
|
+
string.to_s + 's'
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def create_collection_owner_with(n)
|
22
|
+
owner = RSpec::Expectations::Helper::CollectionOwner.new
|
23
|
+
(1..n).each do |number|
|
24
|
+
owner.add_to_collection_with_length_method(number)
|
25
|
+
owner.add_to_collection_with_size_method(number)
|
26
|
+
owner.add_to_collection_with_count_method(number)
|
27
|
+
end
|
28
|
+
owner
|
29
|
+
end
|
30
|
+
|
31
|
+
describe "should have(n).items" do
|
32
|
+
|
33
|
+
it "passes if target has a collection of items with n members" do
|
34
|
+
owner = create_collection_owner_with(3)
|
35
|
+
owner.should have(3).items_in_collection_with_length_method
|
36
|
+
owner.should have(3).items_in_collection_with_size_method
|
37
|
+
owner.should have(3).items_in_collection_with_count_method
|
38
|
+
end
|
39
|
+
|
40
|
+
it "converts :no to 0" do
|
41
|
+
owner = create_collection_owner_with(0)
|
42
|
+
owner.should have(:no).items_in_collection_with_length_method
|
43
|
+
owner.should have(:no).items_in_collection_with_size_method
|
44
|
+
owner.should have(:no).items_in_collection_with_count_method
|
45
|
+
end
|
46
|
+
|
47
|
+
it "converts a String argument to Integer" do
|
48
|
+
owner = create_collection_owner_with(3)
|
49
|
+
owner.should have('3').items_in_collection_with_length_method
|
50
|
+
owner.should have('3').items_in_collection_with_size_method
|
51
|
+
owner.should have('3').items_in_collection_with_count_method
|
52
|
+
end
|
53
|
+
|
54
|
+
it "fails if target has a collection of items with < n members" do
|
55
|
+
owner = create_collection_owner_with(3)
|
56
|
+
lambda {
|
57
|
+
owner.should have(4).items_in_collection_with_length_method
|
58
|
+
}.should fail_with("expected 4 items_in_collection_with_length_method, got 3")
|
59
|
+
lambda {
|
60
|
+
owner.should have(4).items_in_collection_with_size_method
|
61
|
+
}.should fail_with("expected 4 items_in_collection_with_size_method, got 3")
|
62
|
+
lambda {
|
63
|
+
owner.should have(4).items_in_collection_with_count_method
|
64
|
+
}.should fail_with("expected 4 items_in_collection_with_count_method, got 3")
|
65
|
+
end
|
66
|
+
|
67
|
+
it "fails if target has a collection of items with > n members" do
|
68
|
+
owner = create_collection_owner_with(3)
|
69
|
+
lambda {
|
70
|
+
owner.should have(2).items_in_collection_with_length_method
|
71
|
+
}.should fail_with("expected 2 items_in_collection_with_length_method, got 3")
|
72
|
+
lambda {
|
73
|
+
owner.should have(2).items_in_collection_with_size_method
|
74
|
+
}.should fail_with("expected 2 items_in_collection_with_size_method, got 3")
|
75
|
+
lambda {
|
76
|
+
owner.should have(2).items_in_collection_with_count_method
|
77
|
+
}.should fail_with("expected 2 items_in_collection_with_count_method, got 3")
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
describe 'should have(1).item when ActiveSupport::Inflector is defined' do
|
82
|
+
|
83
|
+
it 'pluralizes the collection name' do
|
84
|
+
owner = create_collection_owner_with(1)
|
85
|
+
owner.should have(1).item
|
86
|
+
end
|
87
|
+
|
88
|
+
context "when ActiveSupport::Inflector is partially loaded without its inflectors" do
|
89
|
+
|
90
|
+
it "does not pluralize the collection name" do
|
91
|
+
(class << ::ActiveSupport::Inflector; self; end).send :undef_method, :pluralize
|
92
|
+
owner = create_collection_owner_with(1)
|
93
|
+
expect { owner.should have(1).item }.to raise_error(NoMethodError)
|
94
|
+
end
|
95
|
+
|
96
|
+
end
|
97
|
+
|
98
|
+
after(:each) do
|
99
|
+
unless @active_support_was_defined
|
100
|
+
Object.__send__ :remove_const, :ActiveSupport
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
describe 'should have(1).item when Inflector is defined' do
|
106
|
+
|
107
|
+
before(:each) do
|
108
|
+
if defined?(Inflector)
|
109
|
+
@inflector_was_defined = true
|
110
|
+
else
|
111
|
+
@inflector_was_defined = false
|
112
|
+
class ::Inflector
|
113
|
+
def self.pluralize(string)
|
114
|
+
string.to_s + 's'
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
it 'pluralizes the collection name' do
|
121
|
+
owner = create_collection_owner_with(1)
|
122
|
+
owner.should have(1).item
|
123
|
+
end
|
124
|
+
|
125
|
+
after(:each) do
|
126
|
+
unless @inflector_was_defined
|
127
|
+
Object.__send__ :remove_const, :Inflector
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
describe "should have(n).items where result responds to items but returns something other than a collection" do
|
133
|
+
it "provides a meaningful error" do
|
134
|
+
owner = Class.new do
|
135
|
+
def items
|
136
|
+
Object.new
|
137
|
+
end
|
138
|
+
end.new
|
139
|
+
lambda do
|
140
|
+
owner.should have(3).items
|
141
|
+
end.should raise_error("expected items to be a collection but it does not respond to #length, #size or #count")
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
describe "should_not have(n).items" do
|
146
|
+
|
147
|
+
it "passes if target has a collection of items with < n members" do
|
148
|
+
owner = create_collection_owner_with(3)
|
149
|
+
owner.should_not have(4).items_in_collection_with_length_method
|
150
|
+
owner.should_not have(4).items_in_collection_with_size_method
|
151
|
+
owner.should_not have(4).items_in_collection_with_count_method
|
152
|
+
end
|
153
|
+
|
154
|
+
it "passes if target has a collection of items with > n members" do
|
155
|
+
owner = create_collection_owner_with(3)
|
156
|
+
owner.should_not have(2).items_in_collection_with_length_method
|
157
|
+
owner.should_not have(2).items_in_collection_with_size_method
|
158
|
+
owner.should_not have(2).items_in_collection_with_count_method
|
159
|
+
end
|
160
|
+
|
161
|
+
it "fails if target has a collection of items with n members" do
|
162
|
+
owner = create_collection_owner_with(3)
|
163
|
+
lambda {
|
164
|
+
owner.should_not have(3).items_in_collection_with_length_method
|
165
|
+
}.should fail_with("expected target not to have 3 items_in_collection_with_length_method, got 3")
|
166
|
+
lambda {
|
167
|
+
owner.should_not have(3).items_in_collection_with_size_method
|
168
|
+
}.should fail_with("expected target not to have 3 items_in_collection_with_size_method, got 3")
|
169
|
+
lambda {
|
170
|
+
owner.should_not have(3).items_in_collection_with_count_method
|
171
|
+
}.should fail_with("expected target not to have 3 items_in_collection_with_count_method, got 3")
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
describe "should have_exactly(n).items" do
|
176
|
+
|
177
|
+
it "passes if target has a collection of items with n members" do
|
178
|
+
owner = create_collection_owner_with(3)
|
179
|
+
owner.should have_exactly(3).items_in_collection_with_length_method
|
180
|
+
owner.should have_exactly(3).items_in_collection_with_size_method
|
181
|
+
owner.should have_exactly(3).items_in_collection_with_count_method
|
182
|
+
end
|
183
|
+
|
184
|
+
it "converts :no to 0" do
|
185
|
+
owner = create_collection_owner_with(0)
|
186
|
+
owner.should have_exactly(:no).items_in_collection_with_length_method
|
187
|
+
owner.should have_exactly(:no).items_in_collection_with_size_method
|
188
|
+
owner.should have_exactly(:no).items_in_collection_with_count_method
|
189
|
+
end
|
190
|
+
|
191
|
+
it "fails if target has a collection of items with < n members" do
|
192
|
+
owner = create_collection_owner_with(3)
|
193
|
+
lambda {
|
194
|
+
owner.should have_exactly(4).items_in_collection_with_length_method
|
195
|
+
}.should fail_with("expected 4 items_in_collection_with_length_method, got 3")
|
196
|
+
lambda {
|
197
|
+
owner.should have_exactly(4).items_in_collection_with_size_method
|
198
|
+
}.should fail_with("expected 4 items_in_collection_with_size_method, got 3")
|
199
|
+
lambda {
|
200
|
+
owner.should have_exactly(4).items_in_collection_with_count_method
|
201
|
+
}.should fail_with("expected 4 items_in_collection_with_count_method, got 3")
|
202
|
+
end
|
203
|
+
|
204
|
+
it "fails if target has a collection of items with > n members" do
|
205
|
+
owner = create_collection_owner_with(3)
|
206
|
+
lambda {
|
207
|
+
owner.should have_exactly(2).items_in_collection_with_length_method
|
208
|
+
}.should fail_with("expected 2 items_in_collection_with_length_method, got 3")
|
209
|
+
lambda {
|
210
|
+
owner.should have_exactly(2).items_in_collection_with_size_method
|
211
|
+
}.should fail_with("expected 2 items_in_collection_with_size_method, got 3")
|
212
|
+
lambda {
|
213
|
+
owner.should have_exactly(2).items_in_collection_with_count_method
|
214
|
+
}.should fail_with("expected 2 items_in_collection_with_count_method, got 3")
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
describe "should have_at_least(n).items" do
|
219
|
+
|
220
|
+
it "passes if target has a collection of items with n members" do
|
221
|
+
owner = create_collection_owner_with(3)
|
222
|
+
owner.should have_at_least(3).items_in_collection_with_length_method
|
223
|
+
owner.should have_at_least(3).items_in_collection_with_size_method
|
224
|
+
owner.should have_at_least(3).items_in_collection_with_count_method
|
225
|
+
end
|
226
|
+
|
227
|
+
it "passes if target has a collection of items with > n members" do
|
228
|
+
owner = create_collection_owner_with(3)
|
229
|
+
owner.should have_at_least(2).items_in_collection_with_length_method
|
230
|
+
owner.should have_at_least(2).items_in_collection_with_size_method
|
231
|
+
owner.should have_at_least(2).items_in_collection_with_count_method
|
232
|
+
end
|
233
|
+
|
234
|
+
it "fails if target has a collection of items with < n members" do
|
235
|
+
owner = create_collection_owner_with(3)
|
236
|
+
lambda {
|
237
|
+
owner.should have_at_least(4).items_in_collection_with_length_method
|
238
|
+
}.should fail_with("expected at least 4 items_in_collection_with_length_method, got 3")
|
239
|
+
lambda {
|
240
|
+
owner.should have_at_least(4).items_in_collection_with_size_method
|
241
|
+
}.should fail_with("expected at least 4 items_in_collection_with_size_method, got 3")
|
242
|
+
lambda {
|
243
|
+
owner.should have_at_least(4).items_in_collection_with_count_method
|
244
|
+
}.should fail_with("expected at least 4 items_in_collection_with_count_method, got 3")
|
245
|
+
end
|
246
|
+
|
247
|
+
it "provides educational negative failure messages" do
|
248
|
+
#given
|
249
|
+
owner = create_collection_owner_with(3)
|
250
|
+
length_matcher = have_at_least(3).items_in_collection_with_length_method
|
251
|
+
size_matcher = have_at_least(3).items_in_collection_with_size_method
|
252
|
+
count_matcher = have_at_least(3).items_in_collection_with_count_method
|
253
|
+
|
254
|
+
#when
|
255
|
+
length_matcher.matches?(owner)
|
256
|
+
size_matcher.matches?(owner)
|
257
|
+
count_matcher.matches?(owner)
|
258
|
+
|
259
|
+
#then
|
260
|
+
length_matcher.failure_message_for_should_not.should eq <<-EOF
|
261
|
+
Isn't life confusing enough?
|
262
|
+
Instead of having to figure out the meaning of this:
|
263
|
+
should_not have_at_least(3).items_in_collection_with_length_method
|
264
|
+
We recommend that you use this instead:
|
265
|
+
should have_at_most(2).items_in_collection_with_length_method
|
266
|
+
EOF
|
267
|
+
|
268
|
+
size_matcher.failure_message_for_should_not.should eq <<-EOF
|
269
|
+
Isn't life confusing enough?
|
270
|
+
Instead of having to figure out the meaning of this:
|
271
|
+
should_not have_at_least(3).items_in_collection_with_size_method
|
272
|
+
We recommend that you use this instead:
|
273
|
+
should have_at_most(2).items_in_collection_with_size_method
|
274
|
+
EOF
|
275
|
+
count_matcher.failure_message_for_should_not.should eq <<-EOF
|
276
|
+
Isn't life confusing enough?
|
277
|
+
Instead of having to figure out the meaning of this:
|
278
|
+
should_not have_at_least(3).items_in_collection_with_count_method
|
279
|
+
We recommend that you use this instead:
|
280
|
+
should have_at_most(2).items_in_collection_with_count_method
|
281
|
+
EOF
|
282
|
+
end
|
283
|
+
end
|
284
|
+
|
285
|
+
describe "should have_at_most(n).items" do
|
286
|
+
it "passes if target has a collection of items with n members" do
|
287
|
+
owner = create_collection_owner_with(3)
|
288
|
+
owner.should have_at_most(3).items_in_collection_with_length_method
|
289
|
+
owner.should have_at_most(3).items_in_collection_with_size_method
|
290
|
+
owner.should have_at_most(3).items_in_collection_with_count_method
|
291
|
+
end
|
292
|
+
|
293
|
+
it "fails if target has a collection of items with > n members" do
|
294
|
+
owner = create_collection_owner_with(3)
|
295
|
+
lambda {
|
296
|
+
owner.should have_at_most(2).items_in_collection_with_length_method
|
297
|
+
}.should fail_with("expected at most 2 items_in_collection_with_length_method, got 3")
|
298
|
+
lambda {
|
299
|
+
owner.should have_at_most(2).items_in_collection_with_size_method
|
300
|
+
}.should fail_with("expected at most 2 items_in_collection_with_size_method, got 3")
|
301
|
+
lambda {
|
302
|
+
owner.should have_at_most(2).items_in_collection_with_count_method
|
303
|
+
}.should fail_with("expected at most 2 items_in_collection_with_count_method, got 3")
|
304
|
+
end
|
305
|
+
|
306
|
+
it "passes if target has a collection of items with < n members" do
|
307
|
+
owner = create_collection_owner_with(3)
|
308
|
+
owner.should have_at_most(4).items_in_collection_with_length_method
|
309
|
+
owner.should have_at_most(4).items_in_collection_with_size_method
|
310
|
+
owner.should have_at_most(4).items_in_collection_with_count_method
|
311
|
+
end
|
312
|
+
|
313
|
+
it "provides educational negative failure messages" do
|
314
|
+
#given
|
315
|
+
owner = create_collection_owner_with(3)
|
316
|
+
length_matcher = have_at_most(3).items_in_collection_with_length_method
|
317
|
+
size_matcher = have_at_most(3).items_in_collection_with_size_method
|
318
|
+
count_matcher = have_at_most(3).items_in_collection_with_count_method
|
319
|
+
|
320
|
+
#when
|
321
|
+
length_matcher.matches?(owner)
|
322
|
+
size_matcher.matches?(owner)
|
323
|
+
count_matcher.matches?(owner)
|
324
|
+
|
325
|
+
#then
|
326
|
+
length_matcher.failure_message_for_should_not.should eq <<-EOF
|
327
|
+
Isn't life confusing enough?
|
328
|
+
Instead of having to figure out the meaning of this:
|
329
|
+
should_not have_at_most(3).items_in_collection_with_length_method
|
330
|
+
We recommend that you use this instead:
|
331
|
+
should have_at_least(4).items_in_collection_with_length_method
|
332
|
+
EOF
|
333
|
+
|
334
|
+
size_matcher.failure_message_for_should_not.should eq <<-EOF
|
335
|
+
Isn't life confusing enough?
|
336
|
+
Instead of having to figure out the meaning of this:
|
337
|
+
should_not have_at_most(3).items_in_collection_with_size_method
|
338
|
+
We recommend that you use this instead:
|
339
|
+
should have_at_least(4).items_in_collection_with_size_method
|
340
|
+
EOF
|
341
|
+
|
342
|
+
count_matcher.failure_message_for_should_not.should eq <<-EOF
|
343
|
+
Isn't life confusing enough?
|
344
|
+
Instead of having to figure out the meaning of this:
|
345
|
+
should_not have_at_most(3).items_in_collection_with_count_method
|
346
|
+
We recommend that you use this instead:
|
347
|
+
should have_at_least(4).items_in_collection_with_count_method
|
348
|
+
EOF
|
349
|
+
end
|
350
|
+
end
|
351
|
+
|
352
|
+
describe "have(n).items(args, block)" do
|
353
|
+
it "passes args to target" do
|
354
|
+
target = mock("target")
|
355
|
+
target.should_receive(:items).with("arg1","arg2").and_return([1,2,3])
|
356
|
+
target.should have(3).items("arg1","arg2")
|
357
|
+
end
|
358
|
+
|
359
|
+
it "passes block to target" do
|
360
|
+
target = mock("target")
|
361
|
+
block = lambda { 5 }
|
362
|
+
target.should_receive(:items).with("arg1","arg2", block).and_return([1,2,3])
|
363
|
+
target.should have(3).items("arg1","arg2", block)
|
364
|
+
end
|
365
|
+
end
|
366
|
+
|
367
|
+
describe "have(n).items where target IS a collection" do
|
368
|
+
it "references the number of items IN the collection" do
|
369
|
+
[1,2,3].should have(3).items
|
370
|
+
end
|
371
|
+
|
372
|
+
it "fails when the number of items IN the collection is not as expected" do
|
373
|
+
lambda { [1,2,3].should have(7).items }.should fail_with("expected 7 items, got 3")
|
374
|
+
end
|
375
|
+
end
|
376
|
+
|
377
|
+
describe "have(n).characters where target IS a String" do
|
378
|
+
it "passes if the length is correct" do
|
379
|
+
"this string".should have(11).characters
|
380
|
+
end
|
381
|
+
|
382
|
+
it "fails if the length is incorrect" do
|
383
|
+
lambda { "this string".should have(12).characters }.should fail_with("expected 12 characters, got 11")
|
384
|
+
end
|
385
|
+
end
|
386
|
+
|
387
|
+
describe "have(n).things on an object which is not a collection nor contains one" do
|
388
|
+
it "fails" do
|
389
|
+
lambda { Object.new.should have(2).things }.should raise_error(NoMethodError) {|e| e.name.should eq :things }
|
390
|
+
end
|
391
|
+
end
|
392
|
+
|
393
|
+
describe RSpec::Matchers::BuiltIn::Have, "for a collection owner that implements #send" do
|
394
|
+
before(:each) do
|
395
|
+
@collection = Object.new
|
396
|
+
def @collection.floozles; [1,2] end
|
397
|
+
end
|
398
|
+
|
399
|
+
it "works in the straightforward case" do
|
400
|
+
lambda {
|
401
|
+
@collection.should have(2).floozles
|
402
|
+
}.should_not raise_error
|
403
|
+
end
|
404
|
+
|
405
|
+
it "works when doing automatic pluralization" do
|
406
|
+
lambda {
|
407
|
+
@collection.should have_at_least(1).floozle
|
408
|
+
}.should_not raise_error
|
409
|
+
end
|
410
|
+
|
411
|
+
it "blows up when the owner doesn't respond to that method" do
|
412
|
+
lambda {
|
413
|
+
@collection.should have(99).problems
|
414
|
+
}.should raise_error(NoMethodError, /problems/)
|
415
|
+
end
|
416
|
+
end
|
417
|
+
|
418
|
+
describe RSpec::Matchers::BuiltIn::Have do
|
419
|
+
it "has method_missing as private" do
|
420
|
+
described_class.private_instance_methods.should include_method(:method_missing)
|
421
|
+
end
|
422
|
+
|
423
|
+
it "does not respond_to? method_missing (because it's private)" do
|
424
|
+
formatter = described_class.new(0, StringIO.new)
|
425
|
+
formatter.should_not respond_to(:method_missing)
|
426
|
+
end
|
427
|
+
|
428
|
+
describe "respond_to?" do
|
429
|
+
before :each do
|
430
|
+
@have = described_class.new(:foo)
|
431
|
+
@a_method_which_have_defines = described_class.instance_methods.first
|
432
|
+
@a_method_which_object_defines = Object.instance_methods.first
|
433
|
+
end
|
434
|
+
|
435
|
+
it "is true for a method which Have defines" do
|
436
|
+
@have.should respond_to(@a_method_which_have_defines)
|
437
|
+
end
|
438
|
+
|
439
|
+
it "is true for a method that it's superclass (Object) defines" do
|
440
|
+
@have.should respond_to(@a_method_which_object_defines)
|
441
|
+
end
|
442
|
+
|
443
|
+
it "is false for a method which neither Object nor nor Have defines" do
|
444
|
+
@have.should_not respond_to(:foo_bar_baz)
|
445
|
+
end
|
446
|
+
|
447
|
+
it "is false if the owner doesn't respond to the method" do
|
448
|
+
have = described_class.new(99)
|
449
|
+
have.should_not respond_to(:problems)
|
450
|
+
end
|
451
|
+
|
452
|
+
it "is true if the owner responds to the method" do
|
453
|
+
have = described_class.new(:a_symbol)
|
454
|
+
have.should respond_to(:to_sym)
|
455
|
+
end
|
456
|
+
end
|
457
|
+
end
|
458
|
+
end
|