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,19 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "autotest/discover.rb" do
|
4
|
+
context "with ./.rspec present" do
|
5
|
+
it "adds 'rspec2' to the list of discoveries" do
|
6
|
+
File.stub(:exist?).with("./.rspec") { true }
|
7
|
+
Autotest.should_receive(:add_discovery)
|
8
|
+
load File.expand_path("../../../lib/autotest/discover.rb", __FILE__)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
context "with ./.rspec absent" do
|
13
|
+
it "does not add 'rspec2' to the list of discoveries" do
|
14
|
+
File.stub(:exist?) { false }
|
15
|
+
Autotest.should_not_receive(:add_discovery)
|
16
|
+
load File.expand_path("../../../lib/autotest/discover.rb", __FILE__)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "failed_results_re for autotest" do
|
4
|
+
def run_example
|
5
|
+
group = RSpec::Core::ExampleGroup.describe("group")
|
6
|
+
group.example("example") { yield }
|
7
|
+
io = StringIO.new
|
8
|
+
formatter = RSpec::Core::Formatters::BaseTextFormatter.new(io)
|
9
|
+
reporter = RSpec::Core::Reporter.new(formatter)
|
10
|
+
|
11
|
+
group.run(reporter)
|
12
|
+
reporter.report(1, nil) {}
|
13
|
+
io.string
|
14
|
+
end
|
15
|
+
|
16
|
+
shared_examples "autotest failed_results_re" do
|
17
|
+
it "matches a failure" do
|
18
|
+
output = run_example { fail }
|
19
|
+
output.should match(Autotest::Rspec2.new.failed_results_re)
|
20
|
+
output.should include(__FILE__.sub(File.expand_path('.'),'.'))
|
21
|
+
end
|
22
|
+
|
23
|
+
it "does not match when there are no failures" do
|
24
|
+
output = run_example { } # pass
|
25
|
+
output.should_not match(Autotest::Rspec2.new.failed_results_re)
|
26
|
+
output.should_not include(__FILE__.sub(File.expand_path('.'),'.'))
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context "with color enabled" do
|
31
|
+
before do
|
32
|
+
RSpec.configuration.stub(:color_enabled? => true)
|
33
|
+
end
|
34
|
+
|
35
|
+
include_examples "autotest failed_results_re"
|
36
|
+
end
|
37
|
+
|
38
|
+
context "with color disabled " do
|
39
|
+
before do
|
40
|
+
RSpec.configuration.stub(:color_enabled? => false)
|
41
|
+
end
|
42
|
+
|
43
|
+
include_examples "autotest failed_results_re"
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,123 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Autotest::Rspec2 do
|
4
|
+
let(:rspec_autotest) { Autotest::Rspec2.new }
|
5
|
+
let(:spec_cmd) { File.expand_path("../../../exe/rspec", __FILE__) }
|
6
|
+
let(:ruby_cmd) { "ruby" }
|
7
|
+
|
8
|
+
before do
|
9
|
+
File.stub(:exist?) { false }
|
10
|
+
end
|
11
|
+
|
12
|
+
it "uses autotest's prefix" do
|
13
|
+
rspec_autotest.prefix = "this is the prefix "
|
14
|
+
rspec_autotest.
|
15
|
+
make_test_cmd({'a' => 'b'}).should match(/this is the prefix/)
|
16
|
+
end
|
17
|
+
|
18
|
+
describe "commands" do
|
19
|
+
before do
|
20
|
+
rspec_autotest.stub(:ruby => ruby_cmd)
|
21
|
+
files = %w[file_one file_two]
|
22
|
+
@files_to_test = {
|
23
|
+
files[0] => [],
|
24
|
+
files[1] => []
|
25
|
+
}
|
26
|
+
# this is not the inner representation of Autotest!
|
27
|
+
rspec_autotest.files_to_test = @files_to_test
|
28
|
+
@to_test = files.map { |f| File.expand_path(f) }.join ' '
|
29
|
+
end
|
30
|
+
|
31
|
+
it "makes the appropriate test command" do
|
32
|
+
actual_command = rspec_autotest.make_test_cmd(@files_to_test)
|
33
|
+
expected_command = /#{ruby_cmd}.*'#{spec_cmd}' (.*)/
|
34
|
+
|
35
|
+
actual_command.should match(expected_command)
|
36
|
+
|
37
|
+
actual_command =~ expected_command
|
38
|
+
$1.should =~ /#{File.expand_path('file_one')}/
|
39
|
+
$1.should =~ /#{File.expand_path('file_two')}/
|
40
|
+
end
|
41
|
+
|
42
|
+
it "returns a blank command for no files" do
|
43
|
+
rspec_autotest.make_test_cmd({}).should eq('')
|
44
|
+
end
|
45
|
+
|
46
|
+
it "quotes the paths of files to test" do
|
47
|
+
cmd = rspec_autotest.make_test_cmd(@files_to_test)
|
48
|
+
@files_to_test.keys.each do |file_to_test|
|
49
|
+
cmd.should match(/'#{File.expand_path(file_to_test)}'/)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
it "gives '--tty' to #{Autotest::Rspec2::RSPEC_EXECUTABLE}, not '--autotest'" do
|
54
|
+
cmd = rspec_autotest.make_test_cmd(@files_to_test)
|
55
|
+
cmd.should match(' --tty ')
|
56
|
+
cmd.should_not match(' --autotest ')
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
describe "mappings" do
|
61
|
+
before do
|
62
|
+
@lib_file = "lib/something.rb"
|
63
|
+
@spec_file = "spec/something_spec.rb"
|
64
|
+
rspec_autotest.hook :initialize
|
65
|
+
end
|
66
|
+
|
67
|
+
it "finds the spec file for a given lib file" do
|
68
|
+
rspec_autotest.should map_specs([@spec_file]).to(@lib_file)
|
69
|
+
end
|
70
|
+
|
71
|
+
it "finds the spec file if given a spec file" do
|
72
|
+
rspec_autotest.should map_specs([@spec_file]).to(@spec_file)
|
73
|
+
end
|
74
|
+
|
75
|
+
it "ignores files in spec dir that aren't specs" do
|
76
|
+
rspec_autotest.should map_specs([]).to("spec/spec_helper.rb")
|
77
|
+
end
|
78
|
+
|
79
|
+
it "ignores untracked files (in @file)" do
|
80
|
+
rspec_autotest.should map_specs([]).to("lib/untracked_file")
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
describe "consolidating failures" do
|
85
|
+
let(:subject_file) { "lib/autotest/some.rb" }
|
86
|
+
let(:spec_file) { "spec/autotest/some_spec.rb" }
|
87
|
+
|
88
|
+
it "returns no failures if no failures were given in the output" do
|
89
|
+
rspec_autotest.consolidate_failures([[]]).should eq({})
|
90
|
+
end
|
91
|
+
|
92
|
+
it "returns a hash with the spec filename => spec name for each failure or error" do
|
93
|
+
failures = [ [ "false should be false", spec_file ] ]
|
94
|
+
rspec_autotest.consolidate_failures(failures).should eq({
|
95
|
+
spec_file => ["false should be false"]
|
96
|
+
})
|
97
|
+
end
|
98
|
+
|
99
|
+
context "when subject file appears before the spec file in the backtrace" do
|
100
|
+
let(:failures) do
|
101
|
+
[ [ "false should be false", "#{subject_file}:143:\n#{spec_file}:203:" ] ]
|
102
|
+
end
|
103
|
+
|
104
|
+
it "excludes the subject file" do
|
105
|
+
rspec_autotest.consolidate_failures(failures).keys.should_not include(subject_file)
|
106
|
+
end
|
107
|
+
|
108
|
+
it "includes the spec file" do
|
109
|
+
rspec_autotest.consolidate_failures(failures).keys.should include(spec_file)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
describe "normalizing file names" do
|
115
|
+
it "ensures that a single file appears in files_to_test only once" do
|
116
|
+
@files_to_test = {}
|
117
|
+
['filename.rb', './filename.rb', File.expand_path('filename.rb')].each do |file|
|
118
|
+
@files_to_test[file] = []
|
119
|
+
end
|
120
|
+
rspec_autotest.normalize(@files_to_test).should have(1).file
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
@@ -0,0 +1,137 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'command line', :ui do
|
4
|
+
let(:stderr) { StringIO.new }
|
5
|
+
let(:stdout) { StringIO.new }
|
6
|
+
|
7
|
+
before :all do
|
8
|
+
write_file 'spec/order_spec.rb', """
|
9
|
+
describe 'group 1' do
|
10
|
+
specify('group 1 example 1') {}
|
11
|
+
specify('group 1 example 2') {}
|
12
|
+
specify('group 1 example 3') {}
|
13
|
+
specify('group 1 example 4') {}
|
14
|
+
specify('group 1 example 5') {}
|
15
|
+
specify('group 1 example 6') {}
|
16
|
+
specify('group 1 example 5') {}
|
17
|
+
specify('group 1 example 7') {}
|
18
|
+
specify('group 1 example 8') {}
|
19
|
+
specify('group 1 example 9') {}
|
20
|
+
specify('group 1 example 10') {}
|
21
|
+
|
22
|
+
describe 'group 1-1' do
|
23
|
+
specify('group 1-1 example 1') {}
|
24
|
+
specify('group 1-1 example 2') {}
|
25
|
+
specify('group 1-1 example 3') {}
|
26
|
+
specify('group 1-1 example 4') {}
|
27
|
+
specify('group 1-1 example 5') {}
|
28
|
+
specify('group 1-1 example 6') {}
|
29
|
+
specify('group 1-1 example 7') {}
|
30
|
+
specify('group 1-1 example 8') {}
|
31
|
+
specify('group 1-1 example 9') {}
|
32
|
+
specify('group 1-1 example 10') {}
|
33
|
+
end
|
34
|
+
|
35
|
+
describe('group 1-2') { specify('example') {} }
|
36
|
+
describe('group 1-3') { specify('example') {} }
|
37
|
+
describe('group 1-4') { specify('example') {} }
|
38
|
+
describe('group 1-5') { specify('example') {} }
|
39
|
+
describe('group 1-6') { specify('example') {} }
|
40
|
+
describe('group 1-7') { specify('example') {} }
|
41
|
+
describe('group 1-8') { specify('example') {} }
|
42
|
+
describe('group 1-9') { specify('example') {} }
|
43
|
+
describe('group 1-10') { specify('example') {} }
|
44
|
+
end
|
45
|
+
|
46
|
+
describe('group 2') { specify('example') {} }
|
47
|
+
describe('group 3') { specify('example') {} }
|
48
|
+
describe('group 4') { specify('example') {} }
|
49
|
+
describe('group 5') { specify('example') {} }
|
50
|
+
describe('group 6') { specify('example') {} }
|
51
|
+
describe('group 7') { specify('example') {} }
|
52
|
+
describe('group 8') { specify('example') {} }
|
53
|
+
describe('group 9') { specify('example') {} }
|
54
|
+
describe('group 10') { specify('example') {} }
|
55
|
+
"""
|
56
|
+
end
|
57
|
+
|
58
|
+
describe '--order rand' do
|
59
|
+
it 'runs the examples and groups in a different order each time' do
|
60
|
+
run_command 'tmp/aruba/spec/order_spec.rb --order rand -f doc'
|
61
|
+
RSpec.configuration.seed = srand && srand # reset seed in same process
|
62
|
+
run_command 'tmp/aruba/spec/order_spec.rb --order rand -f doc'
|
63
|
+
|
64
|
+
stdout.string.should match(/Randomized with seed \d+/)
|
65
|
+
|
66
|
+
top_level_groups {|first_run, second_run| first_run.should_not eq(second_run)}
|
67
|
+
nested_groups {|first_run, second_run| first_run.should_not eq(second_run)}
|
68
|
+
examples('group 1') {|first_run, second_run| first_run.should_not eq(second_run)}
|
69
|
+
examples('group 1-1') {|first_run, second_run| first_run.should_not eq(second_run)}
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
describe '--order rand:SEED' do
|
74
|
+
it 'runs the examples and groups in the same order each time' do
|
75
|
+
2.times { run_command 'tmp/aruba/spec/order_spec.rb --order rand:123 -f doc' }
|
76
|
+
|
77
|
+
stdout.string.should match(/Randomized with seed 123/)
|
78
|
+
|
79
|
+
top_level_groups {|first_run, second_run| first_run.should eq(second_run)}
|
80
|
+
nested_groups {|first_run, second_run| first_run.should eq(second_run)}
|
81
|
+
examples('group 1') {|first_run, second_run| first_run.should eq(second_run)}
|
82
|
+
examples('group 1-1') {|first_run, second_run| first_run.should eq(second_run)}
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
describe '--seed SEED' do
|
87
|
+
it "forces '--order rand' and runs the examples and groups in the same order each time" do
|
88
|
+
2.times { run_command 'tmp/aruba/spec/order_spec.rb --seed 123 -f doc' }
|
89
|
+
|
90
|
+
stdout.string.should match(/Randomized with seed \d+/)
|
91
|
+
|
92
|
+
top_level_groups {|first_run, second_run| first_run.should eq(second_run)}
|
93
|
+
nested_groups {|first_run, second_run| first_run.should eq(second_run)}
|
94
|
+
examples('group 1') {|first_run, second_run| first_run.should eq(second_run)}
|
95
|
+
examples('group 1-1') {|first_run, second_run| first_run.should eq(second_run)}
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
describe '--order default on CLI with --order rand in .rspec' do
|
100
|
+
it "overrides --order rand with --order default" do
|
101
|
+
write_file '.rspec', '--order rand'
|
102
|
+
|
103
|
+
run_command 'tmp/aruba/spec/order_spec.rb --order default -f doc'
|
104
|
+
|
105
|
+
stdout.string.should_not match(/Randomized/)
|
106
|
+
|
107
|
+
stdout.string.should match(
|
108
|
+
/group 1.*group 1 example 1.*group 1 example 2.*group 1-1.*group 1-2.*group 2.*/m
|
109
|
+
)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
def examples(group)
|
114
|
+
yield split_in_half(stdout.string.scan(/^\s+#{group} example.*$/))
|
115
|
+
end
|
116
|
+
|
117
|
+
def top_level_groups
|
118
|
+
yield example_groups_at_level(0)
|
119
|
+
end
|
120
|
+
|
121
|
+
def nested_groups
|
122
|
+
yield example_groups_at_level(2)
|
123
|
+
end
|
124
|
+
|
125
|
+
def example_groups_at_level(level)
|
126
|
+
split_in_half(stdout.string.scan(/^\s{#{level*2}}group.*$/))
|
127
|
+
end
|
128
|
+
|
129
|
+
def split_in_half(array)
|
130
|
+
length, midpoint = array.length, array.length / 2
|
131
|
+
return array.slice(0, midpoint), array.slice(midpoint, length)
|
132
|
+
end
|
133
|
+
|
134
|
+
def run_command(cmd)
|
135
|
+
RSpec::Core::Runner.run(cmd.split, stderr, stdout)
|
136
|
+
end
|
137
|
+
end
|
@@ -0,0 +1,108 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "stringio"
|
3
|
+
require 'tmpdir'
|
4
|
+
|
5
|
+
module RSpec::Core
|
6
|
+
describe CommandLine do
|
7
|
+
|
8
|
+
let(:out) { StringIO.new }
|
9
|
+
let(:err) { StringIO.new }
|
10
|
+
let(:config) { RSpec::configuration }
|
11
|
+
let(:world) { RSpec::world }
|
12
|
+
|
13
|
+
before { config.stub :run_hook }
|
14
|
+
|
15
|
+
it "configures streams before command line options" do
|
16
|
+
config.stub :load_spec_files
|
17
|
+
|
18
|
+
# this is necessary to ensure that color works correctly on windows
|
19
|
+
config.should_receive(:error_stream=).ordered
|
20
|
+
config.should_receive(:output_stream=).ordered
|
21
|
+
config.should_receive(:force).at_least(:once).ordered
|
22
|
+
|
23
|
+
command_line = build_command_line
|
24
|
+
command_line.run err, out
|
25
|
+
end
|
26
|
+
|
27
|
+
it "assigns ConfigurationOptions built from Array of options to @options" do
|
28
|
+
config_options = ConfigurationOptions.new(%w[--color])
|
29
|
+
command_line = CommandLine.new(%w[--color])
|
30
|
+
command_line.instance_eval { @options.options }.should eq(config_options.parse_options)
|
31
|
+
end
|
32
|
+
|
33
|
+
it "assigns submitted ConfigurationOptions to @options" do
|
34
|
+
config_options = ConfigurationOptions.new(%w[--color])
|
35
|
+
command_line = CommandLine.new(config_options)
|
36
|
+
command_line.instance_eval { @options }.should be(config_options)
|
37
|
+
end
|
38
|
+
|
39
|
+
describe "#run" do
|
40
|
+
context "running files" do
|
41
|
+
include_context "spec files"
|
42
|
+
|
43
|
+
it "returns 0 if spec passes" do
|
44
|
+
command_line = build_command_line passing_spec_filename
|
45
|
+
command_line.run(err, out).should eq 0
|
46
|
+
end
|
47
|
+
|
48
|
+
it "returns 1 if spec fails" do
|
49
|
+
command_line = build_command_line failing_spec_filename
|
50
|
+
command_line.run(err, out).should eq 1
|
51
|
+
end
|
52
|
+
|
53
|
+
it "returns 2 if spec fails and --failure-exit-code is 2" do
|
54
|
+
command_line = build_command_line failing_spec_filename, "--failure-exit-code", "2"
|
55
|
+
command_line.run(err, out).should eq 2
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
context "running hooks" do
|
60
|
+
before { config.stub :load_spec_files }
|
61
|
+
|
62
|
+
it "runs before suite hooks" do
|
63
|
+
config.should_receive(:run_hook).with(:before, :suite)
|
64
|
+
command_line = build_command_line
|
65
|
+
command_line.run err, out
|
66
|
+
end
|
67
|
+
|
68
|
+
it "runs after suite hooks" do
|
69
|
+
config.should_receive(:run_hook).with(:after, :suite)
|
70
|
+
command_line = build_command_line
|
71
|
+
command_line.run err, out
|
72
|
+
end
|
73
|
+
|
74
|
+
it "runs after suite hooks even after an error" do
|
75
|
+
config.should_receive(:run_hook).with(:before, :suite).and_raise "this error"
|
76
|
+
config.should_receive(:run_hook).with(:after , :suite)
|
77
|
+
expect do
|
78
|
+
command_line = build_command_line
|
79
|
+
command_line.run err, out
|
80
|
+
end.to raise_error
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
describe "#run with custom output" do
|
86
|
+
before { config.stub :files_to_run => [] }
|
87
|
+
|
88
|
+
let(:output_file) { File.new("#{Dir.tmpdir}/command_line_spec_output.txt", 'w') }
|
89
|
+
|
90
|
+
it "doesn't override output_stream" do
|
91
|
+
config.output_stream = output_file
|
92
|
+
command_line = build_command_line
|
93
|
+
command_line.run err, out
|
94
|
+
command_line.instance_eval { @configuration.output_stream }.should eq output_file
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
def build_command_line *args
|
99
|
+
CommandLine.new build_config_options(*args)
|
100
|
+
end
|
101
|
+
|
102
|
+
def build_config_options *args
|
103
|
+
options = ConfigurationOptions.new args
|
104
|
+
options.parse_options
|
105
|
+
options
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
File without changes
|
@@ -0,0 +1,377 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'ostruct'
|
3
|
+
|
4
|
+
describe RSpec::Core::ConfigurationOptions, :fakefs do
|
5
|
+
include ConfigOptionsHelper
|
6
|
+
|
7
|
+
it "warns when HOME env var is not set", :unless => (RUBY_PLATFORM == 'java') do
|
8
|
+
begin
|
9
|
+
orig_home = ENV.delete("HOME")
|
10
|
+
coo = RSpec::Core::ConfigurationOptions.new([])
|
11
|
+
coo.should_receive(:warn)
|
12
|
+
coo.parse_options
|
13
|
+
ensure
|
14
|
+
ENV["HOME"] = orig_home
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe "#configure" do
|
19
|
+
it "sends libs before requires" do
|
20
|
+
opts = config_options_object(*%w[--require a/path -I a/lib])
|
21
|
+
config = double("config").as_null_object
|
22
|
+
config.should_receive(:libs=).ordered
|
23
|
+
config.should_receive(:requires=).ordered
|
24
|
+
opts.configure(config)
|
25
|
+
end
|
26
|
+
|
27
|
+
it "sends requires before formatter" do
|
28
|
+
opts = config_options_object(*%w[--require a/path -f a/formatter])
|
29
|
+
config = double("config").as_null_object
|
30
|
+
config.should_receive(:requires=).ordered
|
31
|
+
config.should_receive(:add_formatter).ordered
|
32
|
+
opts.configure(config)
|
33
|
+
end
|
34
|
+
|
35
|
+
it "sends default_path before files_or_directories_to_run" do
|
36
|
+
opts = config_options_object(*%w[--default_path spec])
|
37
|
+
config = double("config").as_null_object
|
38
|
+
config.should_receive(:force).with(:default_path => 'spec').ordered
|
39
|
+
config.should_receive(:files_or_directories_to_run=).ordered
|
40
|
+
opts.configure(config)
|
41
|
+
end
|
42
|
+
|
43
|
+
it "sends pattern before files_or_directories_to_run" do
|
44
|
+
opts = config_options_object(*%w[--pattern **/*.spec])
|
45
|
+
config = double("config").as_null_object
|
46
|
+
config.should_receive(:force).with(:pattern => '**/*.spec').ordered
|
47
|
+
config.should_receive(:files_or_directories_to_run=).ordered
|
48
|
+
opts.configure(config)
|
49
|
+
end
|
50
|
+
|
51
|
+
it "assigns inclusion_filter" do
|
52
|
+
opts = config_options_object(*%w[--tag awesome])
|
53
|
+
config = RSpec::Core::Configuration.new
|
54
|
+
opts.configure(config)
|
55
|
+
config.inclusion_filter.should have_key(:awesome)
|
56
|
+
end
|
57
|
+
|
58
|
+
it "merges the :exclusion_filter option with the default exclusion_filter" do
|
59
|
+
opts = config_options_object(*%w[--tag ~slow])
|
60
|
+
config = RSpec::Core::Configuration.new
|
61
|
+
opts.configure(config)
|
62
|
+
config.exclusion_filter.should have_key(:slow)
|
63
|
+
end
|
64
|
+
|
65
|
+
it "forces color_enabled" do
|
66
|
+
opts = config_options_object(*%w[--color])
|
67
|
+
config = RSpec::Core::Configuration.new
|
68
|
+
config.should_receive(:force).with(:color => true)
|
69
|
+
opts.configure(config)
|
70
|
+
end
|
71
|
+
|
72
|
+
[
|
73
|
+
["--failure-exit-code", "3", :failure_exit_code, 3 ],
|
74
|
+
["--pattern", "foo/bar", :pattern, "foo/bar"],
|
75
|
+
["--failure-exit-code", "37", :failure_exit_code, 37],
|
76
|
+
["--default_path", "behavior", :default_path, "behavior"],
|
77
|
+
["--order", "rand", :order, "rand"],
|
78
|
+
["--seed", "37", :order, "rand:37"],
|
79
|
+
["--drb-port", "37", :drb_port, 37]
|
80
|
+
].each do |cli_option, cli_value, config_key, config_value|
|
81
|
+
it "forces #{config_key}" do
|
82
|
+
opts = config_options_object(*[cli_option, cli_value].compact)
|
83
|
+
config = RSpec::Core::Configuration.new
|
84
|
+
config.should_receive(:force) do |pair|
|
85
|
+
pair.keys.first.should eq(config_key)
|
86
|
+
pair.values.first.should eq(config_value)
|
87
|
+
end
|
88
|
+
opts.configure(config)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
it "sets debug directly" do
|
93
|
+
opts = config_options_object("--debug")
|
94
|
+
config = RSpec::Core::Configuration.new
|
95
|
+
config.should_receive(:debug=).with(true)
|
96
|
+
opts.configure(config)
|
97
|
+
end
|
98
|
+
|
99
|
+
it "merges --require specified by multiple configuration sources" do
|
100
|
+
ENV['SPEC_OPTS'] = "--require file_from_env"
|
101
|
+
opts = config_options_object(*%w[--require file_from_opts])
|
102
|
+
config = RSpec::Core::Configuration.new
|
103
|
+
config.should_receive(:requires=).with(["file_from_opts", "file_from_env"])
|
104
|
+
opts.configure(config)
|
105
|
+
end
|
106
|
+
|
107
|
+
it "merges --I specified by multiple configuration sources" do
|
108
|
+
ENV['SPEC_OPTS'] = "-I dir_from_env"
|
109
|
+
opts = config_options_object(*%w[-I dir_from_opts])
|
110
|
+
config = RSpec::Core::Configuration.new
|
111
|
+
config.should_receive(:libs=).with(["dir_from_opts", "dir_from_env"])
|
112
|
+
opts.configure(config)
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
describe "-c, --color, and --colour" do
|
117
|
+
it "sets :color => true" do
|
118
|
+
parse_options('-c').should include(:color => true)
|
119
|
+
parse_options('--color').should include(:color => true)
|
120
|
+
parse_options('--colour').should include(:color => true)
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
describe "--no-color" do
|
125
|
+
it "sets :color => false" do
|
126
|
+
parse_options('--no-color').should include(:color => false)
|
127
|
+
end
|
128
|
+
|
129
|
+
it "overrides previous :color => true" do
|
130
|
+
parse_options('--color', '--no-color').should include(:color => false)
|
131
|
+
end
|
132
|
+
|
133
|
+
it "gets overriden by a subsequent :color => true" do
|
134
|
+
parse_options('--no-color', '--color').should include(:color => true)
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
describe "-I" do
|
139
|
+
example "adds to :libs" do
|
140
|
+
parse_options('-I', 'a_dir').should include(:libs => ['a_dir'])
|
141
|
+
end
|
142
|
+
example "can be used more than once" do
|
143
|
+
parse_options('-I', 'dir_1', '-I', 'dir_2').should include(:libs => ['dir_1','dir_2'])
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
describe '--require' do
|
148
|
+
example "requires files" do
|
149
|
+
parse_options('--require', 'a/path').should include(:requires => ['a/path'])
|
150
|
+
end
|
151
|
+
example "can be used more than once" do
|
152
|
+
parse_options('--require', 'path/1', '--require', 'path/2').should include(:requires => ['path/1','path/2'])
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
describe "--format, -f" do
|
157
|
+
it "sets :formatter" do
|
158
|
+
[['--format', 'd'], ['-f', 'd'], '-fd'].each do |args|
|
159
|
+
parse_options(*args).should include(:formatters => [['d']])
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
example "can accept a class name" do
|
164
|
+
parse_options('-fSome::Formatter::Class').should include(:formatters => [['Some::Formatter::Class']])
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
describe "--profile, -p" do
|
169
|
+
it "sets :profile_examples => true" do
|
170
|
+
parse_options('-p').should include(:profile_examples => true)
|
171
|
+
parse_options('--profile').should include(:profile_examples => true)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
describe '--line_number' do
|
176
|
+
it "sets :line_number" do
|
177
|
+
parse_options('-l','3').should include(:line_numbers => ['3'])
|
178
|
+
parse_options('--line_number','3').should include(:line_numbers => ['3'])
|
179
|
+
end
|
180
|
+
|
181
|
+
it "can be specified multiple times" do
|
182
|
+
parse_options('-l','3', '-l', '6').should include(:line_numbers => ['3', '6'])
|
183
|
+
parse_options('--line_number','3', '--line_number', '6').should include(:line_numbers => ['3', '6'])
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
describe "--example" do
|
188
|
+
it "sets :full_description" do
|
189
|
+
parse_options('--example','foo').should include(:full_description => [/foo/])
|
190
|
+
parse_options('-e','bar').should include(:full_description => [/bar/])
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
describe "--backtrace, -b" do
|
195
|
+
it "sets full_backtrace on config" do
|
196
|
+
parse_options("--backtrace").should include(:full_backtrace => true)
|
197
|
+
parse_options("-b").should include(:full_backtrace => true)
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
describe "--debug, -d" do
|
202
|
+
it "sets :debug => true" do
|
203
|
+
parse_options("--debug").should include(:debug => true)
|
204
|
+
parse_options("-d").should include(:debug => true)
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
describe "--fail-fast" do
|
209
|
+
it "defaults to false" do
|
210
|
+
parse_options[:fail_fast].should be_false
|
211
|
+
end
|
212
|
+
|
213
|
+
it "sets fail_fast on config" do
|
214
|
+
parse_options("--fail-fast")[:fail_fast].should be_true
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
describe "--failure-exit-code" do
|
219
|
+
it "sets :failure_exit_code" do
|
220
|
+
parse_options('--failure-exit-code', '0').should include(:failure_exit_code => 0)
|
221
|
+
parse_options('--failure-exit-code', '1').should include(:failure_exit_code => 1)
|
222
|
+
parse_options('--failure-exit-code', '2').should include(:failure_exit_code => 2)
|
223
|
+
end
|
224
|
+
|
225
|
+
it "overrides previous :failure_exit_code" do
|
226
|
+
parse_options('--failure-exit-code', '2', '--failure-exit-code', '3').should include(:failure_exit_code => 3)
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
describe "--options" do
|
231
|
+
it "sets :custom_options_file" do
|
232
|
+
parse_options(*%w[-O my.opts]).should include(:custom_options_file => "my.opts")
|
233
|
+
parse_options(*%w[--options my.opts]).should include(:custom_options_file => "my.opts")
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
describe "--drb, -X" do
|
238
|
+
context "combined with --debug" do
|
239
|
+
it "turns off the debugger if --drb is specified first" do
|
240
|
+
config_options_object("--drb", "--debug").drb_argv.should_not include("--debug")
|
241
|
+
config_options_object("--drb", "-d" ).drb_argv.should_not include("--debug")
|
242
|
+
config_options_object("-X", "--debug").drb_argv.should_not include("--debug")
|
243
|
+
config_options_object("-X", "-d" ).drb_argv.should_not include("--debug")
|
244
|
+
end
|
245
|
+
|
246
|
+
it "turns off the debugger option if --drb is specified later" do
|
247
|
+
config_options_object("--debug", "--drb").drb_argv.should_not include("--debug")
|
248
|
+
config_options_object("-d", "--drb").drb_argv.should_not include("--debug")
|
249
|
+
config_options_object("--debug", "-X" ).drb_argv.should_not include("--debug")
|
250
|
+
config_options_object("-d", "-X" ).drb_argv.should_not include("--debug")
|
251
|
+
end
|
252
|
+
|
253
|
+
it "turns off the debugger option if --drb is specified in the options file" do
|
254
|
+
File.open("./.rspec", "w") {|f| f << "--drb"}
|
255
|
+
config_options_object("--debug").drb_argv.should_not include("--debug")
|
256
|
+
config_options_object("-d" ).drb_argv.should_not include("--debug")
|
257
|
+
end
|
258
|
+
|
259
|
+
it "turns off the debugger option if --debug is specified in the options file" do
|
260
|
+
File.open("./.rspec", "w") {|f| f << "--debug"}
|
261
|
+
config_options_object("--drb").drb_argv.should_not include("--debug")
|
262
|
+
config_options_object("-X" ).drb_argv.should_not include("--debug")
|
263
|
+
end
|
264
|
+
end
|
265
|
+
|
266
|
+
it "does not send --drb back to the parser after parsing options" do
|
267
|
+
config_options_object("--drb", "--color").drb_argv.should_not include("--drb")
|
268
|
+
end
|
269
|
+
|
270
|
+
end
|
271
|
+
|
272
|
+
describe "--no-drb" do
|
273
|
+
it "disables drb" do
|
274
|
+
parse_options("--no-drb").should include(:drb => false)
|
275
|
+
end
|
276
|
+
|
277
|
+
it "overrides a previous drb => true" do
|
278
|
+
parse_options("--drb", "--no-drb").should include(:drb => false)
|
279
|
+
end
|
280
|
+
|
281
|
+
it "gets overriden by a subsquent drb => true" do
|
282
|
+
parse_options("--no-drb", "--drb").should include(:drb => true)
|
283
|
+
end
|
284
|
+
end
|
285
|
+
|
286
|
+
|
287
|
+
describe "files_or_directories_to_run" do
|
288
|
+
it "parses files from '-c file.rb dir/file.rb'" do
|
289
|
+
parse_options("-c", "file.rb", "dir/file.rb").should include(
|
290
|
+
:files_or_directories_to_run => ["file.rb", "dir/file.rb"]
|
291
|
+
)
|
292
|
+
end
|
293
|
+
|
294
|
+
it "parses dir from 'dir'" do
|
295
|
+
parse_options("dir").should include(:files_or_directories_to_run => ["dir"])
|
296
|
+
end
|
297
|
+
|
298
|
+
it "parses dir and files from 'spec/file1_spec.rb, spec/file2_spec.rb'" do
|
299
|
+
parse_options("dir", "spec/file1_spec.rb", "spec/file2_spec.rb").should include(
|
300
|
+
:files_or_directories_to_run => ["dir", "spec/file1_spec.rb", "spec/file2_spec.rb"]
|
301
|
+
)
|
302
|
+
end
|
303
|
+
|
304
|
+
it "provides no files or directories if spec directory does not exist" do
|
305
|
+
FileTest.stub(:directory?).with("spec").and_return false
|
306
|
+
parse_options().should include(:files_or_directories_to_run => [])
|
307
|
+
end
|
308
|
+
end
|
309
|
+
|
310
|
+
describe "default_path" do
|
311
|
+
it "gets set before files_or_directories_to_run" do
|
312
|
+
config = double("config").as_null_object
|
313
|
+
config.should_receive(:force).with(:default_path => 'foo').ordered
|
314
|
+
config.should_receive(:files_or_directories_to_run=).ordered
|
315
|
+
opts = config_options_object("--default_path", "foo")
|
316
|
+
opts.configure(config)
|
317
|
+
end
|
318
|
+
end
|
319
|
+
|
320
|
+
describe "#filter_manager" do
|
321
|
+
it "returns the same object as RSpec::configuration.filter_manager" do
|
322
|
+
config_options_object.filter_manager.
|
323
|
+
should be(RSpec::configuration.filter_manager)
|
324
|
+
end
|
325
|
+
end
|
326
|
+
|
327
|
+
describe "sources: ~/.rspec, ./.rspec, custom, CLI, and SPEC_OPTS" do
|
328
|
+
before(:each) do
|
329
|
+
FileUtils.mkpath(File.expand_path("~"))
|
330
|
+
end
|
331
|
+
|
332
|
+
it "merges global, local, SPEC_OPTS, and CLI" do
|
333
|
+
File.open("./.rspec", "w") {|f| f << "--line 37"}
|
334
|
+
File.open("~/.rspec", "w") {|f| f << "--color"}
|
335
|
+
ENV["SPEC_OPTS"] = "--debug --example 'foo bar'"
|
336
|
+
options = parse_options("--drb")
|
337
|
+
options[:color].should be_true
|
338
|
+
options[:line_numbers].should eq(["37"])
|
339
|
+
options[:debug].should be_true
|
340
|
+
options[:full_description].should eq([/foo\ bar/])
|
341
|
+
options[:drb].should be_true
|
342
|
+
end
|
343
|
+
|
344
|
+
it "prefers SPEC_OPTS over CLI" do
|
345
|
+
ENV["SPEC_OPTS"] = "--format spec_opts"
|
346
|
+
parse_options("--format", "cli")[:formatters].should eq([['spec_opts']])
|
347
|
+
end
|
348
|
+
|
349
|
+
it "prefers CLI over file options" do
|
350
|
+
File.open("./.rspec", "w") {|f| f << "--format local"}
|
351
|
+
File.open("~/.rspec", "w") {|f| f << "--format global"}
|
352
|
+
parse_options("--format", "cli")[:formatters].should eq([['cli']])
|
353
|
+
end
|
354
|
+
|
355
|
+
it "prefers local file options over global" do
|
356
|
+
File.open("./.rspec", "w") {|f| f << "--format local"}
|
357
|
+
File.open("~/.rspec", "w") {|f| f << "--format global"}
|
358
|
+
parse_options[:formatters].should eq([['local']])
|
359
|
+
end
|
360
|
+
|
361
|
+
context "with custom options file" do
|
362
|
+
it "ignores local and global options files" do
|
363
|
+
File.open("./.rspec", "w") {|f| f << "--format local"}
|
364
|
+
File.open("~/.rspec", "w") {|f| f << "--format global"}
|
365
|
+
File.open("./custom.opts", "w") {|f| f << "--color"}
|
366
|
+
options = parse_options("-O", "./custom.opts")
|
367
|
+
options[:format].should be_nil
|
368
|
+
options[:color].should be_true
|
369
|
+
end
|
370
|
+
it "parses -e 'full spec description'" do
|
371
|
+
File.open("./custom.opts", "w") {|f| f << "-e 'The quick brown fox jumps over the lazy dog'"}
|
372
|
+
options = parse_options("-O", "./custom.opts")
|
373
|
+
options[:full_description].should eq([/The\ quick\ brown\ fox\ jumps\ over\ the\ lazy\ dog/])
|
374
|
+
end
|
375
|
+
end
|
376
|
+
end
|
377
|
+
end
|