opal-rspec 0.7.0.rc.1 → 0.7.0.rc.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/opal/rspec/version.rb +1 -1
- data/opal-rspec.gemspec +5 -3
- data/rspec-core/upstream/.document +5 -0
- data/rspec-core/upstream/.gitignore +21 -0
- data/rspec-core/upstream/.rspec +2 -0
- data/rspec-core/upstream/.rubocop.yml +53 -0
- data/rspec-core/upstream/.rubocop_rspec_base.yml +130 -0
- data/rspec-core/upstream/.travis.yml +35 -0
- data/rspec-core/upstream/.yardopts +7 -0
- data/rspec-core/upstream/Changelog.md +1641 -0
- data/rspec-core/upstream/DEV-README.md +28 -0
- data/rspec-core/upstream/Gemfile +34 -0
- data/rspec-core/upstream/Gemfile-custom.sample +19 -0
- data/rspec-core/upstream/Guardfile +5 -0
- data/rspec-core/upstream/License.txt +25 -0
- data/rspec-core/upstream/README.md +243 -0
- data/rspec-core/upstream/Rakefile +85 -0
- data/rspec-core/upstream/benchmarks/README.md +4 -0
- data/rspec-core/upstream/benchmarks/boot_time_with_many_load_path_dirs.sh +123 -0
- data/rspec-core/upstream/benchmarks/call_v_yield.rb +81 -0
- data/rspec-core/upstream/benchmarks/check_inclusion.rb +125 -0
- data/rspec-core/upstream/benchmarks/define_method_v_attr_reader_v_def.rb +81 -0
- data/rspec-core/upstream/benchmarks/eager_vs_lazy_metadata.rb +126 -0
- data/rspec-core/upstream/benchmarks/eager_vs_lazy_metadata/define_examples.rb +22 -0
- data/rspec-core/upstream/benchmarks/filter_object.rb +35 -0
- data/rspec-core/upstream/benchmarks/index_v_take_while.rb +47 -0
- data/rspec-core/upstream/benchmarks/map_then_flatten_vs_flat_map_benchmarks.rb +94 -0
- data/rspec-core/upstream/benchmarks/require_relative_v_require.rb +75 -0
- data/rspec-core/upstream/benchmarks/respond_to_v_defined.rb +72 -0
- data/rspec-core/upstream/benchmarks/several_regexps_v_one_big_one.rb +86 -0
- data/rspec-core/upstream/benchmarks/sort_by_v_shuffle.rb +83 -0
- data/rspec-core/upstream/benchmarks/to_proc_v_not_to_proc.rb +539 -0
- data/rspec-core/upstream/cucumber.yml +6 -0
- data/rspec-core/upstream/exe/rspec +4 -0
- data/rspec-core/upstream/features/.nav +62 -0
- data/rspec-core/upstream/features/README.md +13 -0
- data/rspec-core/upstream/features/Upgrade.md +352 -0
- data/rspec-core/upstream/features/command_line/README.md +28 -0
- data/rspec-core/upstream/features/command_line/dry_run.feature +29 -0
- data/rspec-core/upstream/features/command_line/example_name_option.feature +98 -0
- data/rspec-core/upstream/features/command_line/exit_status.feature +66 -0
- data/rspec-core/upstream/features/command_line/fail_fast.feature +27 -0
- data/rspec-core/upstream/features/command_line/format_option.feature +86 -0
- data/rspec-core/upstream/features/command_line/init.feature +50 -0
- data/rspec-core/upstream/features/command_line/line_number_appended_to_path.feature +159 -0
- data/rspec-core/upstream/features/command_line/order.md +23 -0
- data/rspec-core/upstream/features/command_line/pattern_option.feature +42 -0
- data/rspec-core/upstream/features/command_line/rake_task.feature +158 -0
- data/rspec-core/upstream/features/command_line/randomization.feature +62 -0
- data/rspec-core/upstream/features/command_line/require_option.feature +45 -0
- data/rspec-core/upstream/features/command_line/ruby.feature +23 -0
- data/rspec-core/upstream/features/command_line/tag.feature +102 -0
- data/rspec-core/upstream/features/command_line/warnings_option.feature +29 -0
- data/rspec-core/upstream/features/configuration/alias_example_to.feature +57 -0
- data/rspec-core/upstream/features/configuration/backtrace_exclusion_patterns.feature +138 -0
- data/rspec-core/upstream/features/configuration/custom_settings.feature +84 -0
- data/rspec-core/upstream/features/configuration/default_path.feature +37 -0
- data/rspec-core/upstream/features/configuration/deprecation_stream.feature +87 -0
- data/rspec-core/upstream/features/configuration/enable_global_dsl.feature +60 -0
- data/rspec-core/upstream/features/configuration/exclude_pattern.feature +43 -0
- data/rspec-core/upstream/features/configuration/fail_fast.feature +79 -0
- data/rspec-core/upstream/features/configuration/failure_exit_code.feature +53 -0
- data/rspec-core/upstream/features/configuration/order_and_seed.feature +5 -0
- data/rspec-core/upstream/features/configuration/output_stream.feature +27 -0
- data/rspec-core/upstream/features/configuration/overriding_global_ordering.feature +90 -0
- data/rspec-core/upstream/features/configuration/pattern.feature +62 -0
- data/rspec-core/upstream/features/configuration/profile.feature +220 -0
- data/rspec-core/upstream/features/configuration/read_options_from_file.feature +95 -0
- data/rspec-core/upstream/features/configuration/run_all_when_everything_filtered.feature +78 -0
- data/rspec-core/upstream/features/configuration/zero_monkey_patching_mode.feature +106 -0
- data/rspec-core/upstream/features/core_standalone.feature +23 -0
- data/rspec-core/upstream/features/example_groups/aliasing.feature +48 -0
- data/rspec-core/upstream/features/example_groups/basic_structure.feature +55 -0
- data/rspec-core/upstream/features/example_groups/shared_context.feature +92 -0
- data/rspec-core/upstream/features/example_groups/shared_examples.feature +295 -0
- data/rspec-core/upstream/features/expectation_framework_integration/configure_expectation_framework.feature +167 -0
- data/rspec-core/upstream/features/filtering/exclusion_filters.feature +135 -0
- data/rspec-core/upstream/features/filtering/if_and_unless.feature +165 -0
- data/rspec-core/upstream/features/filtering/inclusion_filters.feature +101 -0
- data/rspec-core/upstream/features/formatters/configurable_colors.feature +32 -0
- data/rspec-core/upstream/features/formatters/custom_formatter.feature +37 -0
- data/rspec-core/upstream/features/formatters/json_formatter.feature +30 -0
- data/rspec-core/upstream/features/helper_methods/arbitrary_methods.feature +40 -0
- data/rspec-core/upstream/features/helper_methods/let.feature +50 -0
- data/rspec-core/upstream/features/helper_methods/modules.feature +146 -0
- data/rspec-core/upstream/features/hooks/around_hooks.feature +345 -0
- data/rspec-core/upstream/features/hooks/before_and_after_hooks.feature +434 -0
- data/rspec-core/upstream/features/hooks/filtering.feature +234 -0
- data/rspec-core/upstream/features/metadata/current_example.feature +57 -0
- data/rspec-core/upstream/features/metadata/described_class.feature +17 -0
- data/rspec-core/upstream/features/metadata/user_defined.feature +100 -0
- data/rspec-core/upstream/features/mock_framework_integration/use_any_framework.feature +106 -0
- data/rspec-core/upstream/features/mock_framework_integration/use_flexmock.feature +94 -0
- data/rspec-core/upstream/features/mock_framework_integration/use_mocha.feature +95 -0
- data/rspec-core/upstream/features/mock_framework_integration/use_rr.feature +96 -0
- data/rspec-core/upstream/features/mock_framework_integration/use_rspec.feature +113 -0
- data/rspec-core/upstream/features/pending_and_skipped_examples/README.md +3 -0
- data/rspec-core/upstream/features/pending_and_skipped_examples/pending_examples.feature +73 -0
- data/rspec-core/upstream/features/pending_and_skipped_examples/skipped_examples.feature +106 -0
- data/rspec-core/upstream/features/spec_files/arbitrary_file_suffix.feature +13 -0
- data/rspec-core/upstream/features/step_definitions/additional_cli_steps.rb +126 -0
- data/rspec-core/upstream/features/step_definitions/core_standalone_steps.rb +12 -0
- data/rspec-core/upstream/features/subject/explicit_subject.feature +187 -0
- data/rspec-core/upstream/features/subject/implicit_subject.feature +57 -0
- data/rspec-core/upstream/features/subject/one_liner_syntax.feature +69 -0
- data/rspec-core/upstream/features/support/env.rb +21 -0
- data/rspec-core/upstream/features/support/require_expect_syntax_in_aruba_specs.rb +29 -0
- data/rspec-core/upstream/features/support/rubinius.rb +6 -0
- data/rspec-core/upstream/lib/rspec/autorun.rb +2 -0
- data/rspec-core/upstream/lib/rspec/core.rb +169 -0
- data/rspec-core/upstream/lib/rspec/core/backport_random.rb +336 -0
- data/rspec-core/upstream/lib/rspec/core/backtrace_formatter.rb +66 -0
- data/rspec-core/upstream/lib/rspec/core/configuration.rb +1440 -0
- data/rspec-core/upstream/lib/rspec/core/configuration_options.rb +173 -0
- data/rspec-core/upstream/lib/rspec/core/drb.rb +111 -0
- data/rspec-core/upstream/lib/rspec/core/dsl.rb +93 -0
- data/rspec-core/upstream/lib/rspec/core/example.rb +502 -0
- data/rspec-core/upstream/lib/rspec/core/example_group.rb +606 -0
- data/rspec-core/upstream/lib/rspec/core/filter_manager.rb +259 -0
- data/rspec-core/upstream/lib/rspec/core/flat_map.rb +18 -0
- data/rspec-core/upstream/lib/rspec/core/formatters.rb +240 -0
- data/rspec-core/upstream/lib/rspec/core/formatters/base_formatter.rb +67 -0
- data/rspec-core/upstream/lib/rspec/core/formatters/base_text_formatter.rb +76 -0
- data/rspec-core/upstream/lib/rspec/core/formatters/console_codes.rb +64 -0
- data/rspec-core/upstream/lib/rspec/core/formatters/deprecation_formatter.rb +222 -0
- data/rspec-core/upstream/lib/rspec/core/formatters/documentation_formatter.rb +68 -0
- data/rspec-core/upstream/lib/rspec/core/formatters/helpers.rb +87 -0
- data/rspec-core/upstream/lib/rspec/core/formatters/html_formatter.rb +149 -0
- data/rspec-core/upstream/lib/rspec/core/formatters/html_printer.rb +403 -0
- data/rspec-core/upstream/lib/rspec/core/formatters/json_formatter.rb +94 -0
- data/rspec-core/upstream/lib/rspec/core/formatters/profile_formatter.rb +65 -0
- data/rspec-core/upstream/lib/rspec/core/formatters/progress_formatter.rb +28 -0
- data/rspec-core/upstream/lib/rspec/core/formatters/protocol.rb +163 -0
- data/rspec-core/upstream/lib/rspec/core/formatters/snippet_extractor.rb +104 -0
- data/rspec-core/upstream/lib/rspec/core/hooks.rb +591 -0
- data/rspec-core/upstream/lib/rspec/core/memoized_helpers.rb +472 -0
- data/rspec-core/upstream/lib/rspec/core/metadata.rb +437 -0
- data/rspec-core/upstream/lib/rspec/core/metadata_filter.rb +95 -0
- data/rspec-core/upstream/lib/rspec/core/minitest_assertions_adapter.rb +28 -0
- data/rspec-core/upstream/lib/rspec/core/mocking_adapters/flexmock.rb +31 -0
- data/rspec-core/upstream/lib/rspec/core/mocking_adapters/mocha.rb +57 -0
- data/rspec-core/upstream/lib/rspec/core/mocking_adapters/null.rb +14 -0
- data/rspec-core/upstream/lib/rspec/core/mocking_adapters/rr.rb +31 -0
- data/rspec-core/upstream/lib/rspec/core/mocking_adapters/rspec.rb +32 -0
- data/rspec-core/upstream/lib/rspec/core/notifications.rb +542 -0
- data/rspec-core/upstream/lib/rspec/core/option_parser.rb +222 -0
- data/rspec-core/upstream/lib/rspec/core/ordering.rb +155 -0
- data/rspec-core/upstream/lib/rspec/core/pending.rb +163 -0
- data/rspec-core/upstream/lib/rspec/core/project_initializer.rb +48 -0
- data/rspec-core/upstream/lib/rspec/core/project_initializer/.rspec +2 -0
- data/rspec-core/upstream/lib/rspec/core/project_initializer/spec/spec_helper.rb +89 -0
- data/rspec-core/upstream/lib/rspec/core/rake_task.rb +187 -0
- data/rspec-core/upstream/lib/rspec/core/reporter.rb +149 -0
- data/rspec-core/upstream/lib/rspec/core/ruby_project.rb +45 -0
- data/rspec-core/upstream/lib/rspec/core/runner.rb +158 -0
- data/rspec-core/upstream/lib/rspec/core/shared_context.rb +55 -0
- data/rspec-core/upstream/lib/rspec/core/shared_example_group.rb +182 -0
- data/rspec-core/upstream/lib/rspec/core/test_unit_assertions_adapter.rb +30 -0
- data/rspec-core/upstream/lib/rspec/core/version.rb +9 -0
- data/rspec-core/upstream/lib/rspec/core/warnings.rb +40 -0
- data/rspec-core/upstream/lib/rspec/core/world.rb +183 -0
- data/rspec-core/upstream/maintenance-branch +1 -0
- data/rspec-core/upstream/rspec-core.gemspec +53 -0
- data/rspec-core/upstream/script/clone_all_rspec_repos +24 -0
- data/rspec-core/upstream/script/console +8 -0
- data/rspec-core/upstream/script/functions.sh +168 -0
- data/rspec-core/upstream/script/ignores +72 -0
- data/rspec-core/upstream/script/list_method_cache_busters.sh +23 -0
- data/rspec-core/upstream/script/prevent_runtime_method_cache_busters +15 -0
- data/rspec-core/upstream/script/regen_fixtures.sh +39 -0
- data/rspec-core/upstream/script/rspec_with_simplecov +42 -0
- data/rspec-core/upstream/script/run_build +28 -0
- data/rspec-expectations/upstream/.document +5 -0
- data/rspec-expectations/upstream/.gitignore +17 -0
- data/rspec-expectations/upstream/.rspec +2 -0
- data/rspec-expectations/upstream/.rubocop.yml +5 -0
- data/rspec-expectations/upstream/.rubocop_rspec_base.yml +130 -0
- data/rspec-expectations/upstream/.travis.yml +35 -0
- data/rspec-expectations/upstream/.yardopts +6 -0
- data/rspec-expectations/upstream/Changelog.md +835 -0
- data/rspec-expectations/upstream/DEV-README.md +28 -0
- data/rspec-expectations/upstream/Gemfile +35 -0
- data/rspec-expectations/upstream/Gemfile-custom.sample +19 -0
- data/rspec-expectations/upstream/Guardfile +6 -0
- data/rspec-expectations/upstream/License.txt +24 -0
- data/rspec-expectations/upstream/README.md +278 -0
- data/rspec-expectations/upstream/Rakefile +78 -0
- data/rspec-expectations/upstream/Should.md +168 -0
- data/rspec-expectations/upstream/benchmarks/2.x_vs_3.x_matcher_dsl_implementation.rb +253 -0
- data/rspec-expectations/upstream/benchmarks/autoload_v_require.rb +25 -0
- data/rspec-expectations/upstream/benchmarks/cloning_matchers.rb +19 -0
- data/rspec-expectations/upstream/benchmarks/default_messages_as_methods_v_blocks.rb +27 -0
- data/rspec-expectations/upstream/benchmarks/example_spec.rb +9 -0
- data/rspec-expectations/upstream/benchmarks/include_v_superclass.rb +39 -0
- data/rspec-expectations/upstream/benchmarks/match_array/failing_with_distinct_items.rb +147 -0
- data/rspec-expectations/upstream/benchmarks/match_array/failing_with_duplicate_items.rb +122 -0
- data/rspec-expectations/upstream/benchmarks/match_array/passing_with_distinct_items.rb +154 -0
- data/rspec-expectations/upstream/benchmarks/match_array/passing_with_duplicate_items.rb +132 -0
- data/rspec-expectations/upstream/benchmarks/match_array/rubyprof/passing_with_distinct_items.rb +9 -0
- data/rspec-expectations/upstream/benchmarks/matcher_dsl_vs_classes.rb +180 -0
- data/rspec-expectations/upstream/benchmarks/method_to_proc.rb +72 -0
- data/rspec-expectations/upstream/benchmarks/set_vs_array_include.rb +68 -0
- data/rspec-expectations/upstream/cucumber.yml +10 -0
- data/rspec-expectations/upstream/features/.nav +41 -0
- data/rspec-expectations/upstream/features/README.md +49 -0
- data/rspec-expectations/upstream/features/built_in_matchers/README.md +137 -0
- data/rspec-expectations/upstream/features/built_in_matchers/all.feature +60 -0
- data/rspec-expectations/upstream/features/built_in_matchers/be.feature +175 -0
- data/rspec-expectations/upstream/features/built_in_matchers/be_within.feature +48 -0
- data/rspec-expectations/upstream/features/built_in_matchers/change.feature +66 -0
- data/rspec-expectations/upstream/features/built_in_matchers/comparisons.feature +96 -0
- data/rspec-expectations/upstream/features/built_in_matchers/contain_exactly.feature +64 -0
- data/rspec-expectations/upstream/features/built_in_matchers/cover.feature +47 -0
- data/rspec-expectations/upstream/features/built_in_matchers/end_with.feature +48 -0
- data/rspec-expectations/upstream/features/built_in_matchers/equality.feature +135 -0
- data/rspec-expectations/upstream/features/built_in_matchers/exist.feature +44 -0
- data/rspec-expectations/upstream/features/built_in_matchers/have_attributes.feature +47 -0
- data/rspec-expectations/upstream/features/built_in_matchers/include.feature +123 -0
- data/rspec-expectations/upstream/features/built_in_matchers/match.feature +49 -0
- data/rspec-expectations/upstream/features/built_in_matchers/output.feature +68 -0
- data/rspec-expectations/upstream/features/built_in_matchers/predicates.feature +181 -0
- data/rspec-expectations/upstream/features/built_in_matchers/raise_error.feature +144 -0
- data/rspec-expectations/upstream/features/built_in_matchers/respond_to.feature +83 -0
- data/rspec-expectations/upstream/features/built_in_matchers/satisfy.feature +32 -0
- data/rspec-expectations/upstream/features/built_in_matchers/start_with.feature +48 -0
- data/rspec-expectations/upstream/features/built_in_matchers/throw_symbol.feature +90 -0
- data/rspec-expectations/upstream/features/built_in_matchers/types.feature +116 -0
- data/rspec-expectations/upstream/features/built_in_matchers/yield.feature +156 -0
- data/rspec-expectations/upstream/features/composing_matchers.feature +246 -0
- data/rspec-expectations/upstream/features/compound_expectations.feature +52 -0
- data/rspec-expectations/upstream/features/custom_matchers/access_running_example.feature +48 -0
- data/rspec-expectations/upstream/features/custom_matchers/define_diffable_matcher.feature +29 -0
- data/rspec-expectations/upstream/features/custom_matchers/define_matcher.feature +337 -0
- data/rspec-expectations/upstream/features/custom_matchers/define_matcher_outside_rspec.feature +32 -0
- data/rspec-expectations/upstream/features/custom_matchers/define_matcher_with_fluent_interface.feature +51 -0
- data/rspec-expectations/upstream/features/customized_message.feature +39 -0
- data/rspec-expectations/upstream/features/define_negated_matcher.feature +29 -0
- data/rspec-expectations/upstream/features/diffing.feature +85 -0
- data/rspec-expectations/upstream/features/implicit_docstrings.feature +51 -0
- data/rspec-expectations/upstream/features/step_definitions/additional_cli_steps.rb +22 -0
- data/rspec-expectations/upstream/features/support/disallow_certain_apis.rb +34 -0
- data/rspec-expectations/upstream/features/support/env.rb +21 -0
- data/rspec-expectations/upstream/features/support/rubinius.rb +6 -0
- data/rspec-expectations/upstream/features/syntax_configuration.feature +92 -0
- data/rspec-expectations/upstream/features/test_frameworks/minitest.feature +44 -0
- data/rspec-expectations/upstream/lib/rspec/expectations.rb +68 -0
- data/rspec-expectations/upstream/lib/rspec/expectations/configuration.rb +147 -0
- data/rspec-expectations/upstream/lib/rspec/expectations/expectation_target.rb +119 -0
- data/rspec-expectations/upstream/lib/rspec/expectations/fail_with.rb +34 -0
- data/rspec-expectations/upstream/lib/rspec/expectations/handler.rb +167 -0
- data/rspec-expectations/upstream/lib/rspec/expectations/minitest_integration.rb +17 -0
- data/rspec-expectations/upstream/lib/rspec/expectations/syntax.rb +132 -0
- data/rspec-expectations/upstream/lib/rspec/expectations/version.rb +8 -0
- data/rspec-expectations/upstream/lib/rspec/matchers.rb +967 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/aliased_matcher.rb +116 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in.rb +52 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/all.rb +85 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/base_matcher.rb +132 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/be.rb +277 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/be_between.rb +77 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/be_instance_of.rb +22 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/be_kind_of.rb +16 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/be_within.rb +72 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/change.rb +337 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/compound.rb +258 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/contain_exactly.rb +249 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/cover.rb +24 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/eq.rb +75 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/eql.rb +34 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/equal.rb +81 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/exist.rb +86 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/has.rb +101 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/have_attributes.rb +84 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/include.rb +105 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/match.rb +29 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/operators.rb +119 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/output.rb +152 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/raise_error.rb +174 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/respond_to.rb +91 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/satisfy.rb +39 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/start_and_end_with.rb +82 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/throw_symbol.rb +132 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/built_in/yield.rb +420 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/composable.rb +183 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/dsl.rb +391 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/generated_descriptions.rb +42 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/matcher_delegator.rb +33 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/matcher_protocol.rb +99 -0
- data/rspec-expectations/upstream/lib/rspec/matchers/pretty.rb +77 -0
- data/rspec-expectations/upstream/maintenance-branch +1 -0
- data/rspec-expectations/upstream/rspec-expectations.gemspec +46 -0
- data/rspec-expectations/upstream/script/clone_all_rspec_repos +24 -0
- data/rspec-expectations/upstream/script/functions.sh +168 -0
- data/rspec-expectations/upstream/script/run_build +28 -0
- data/rspec-mocks/upstream/.autotest +7 -0
- data/rspec-mocks/upstream/.document +5 -0
- data/rspec-mocks/upstream/.gitignore +18 -0
- data/rspec-mocks/upstream/.rspec +2 -0
- data/rspec-mocks/upstream/.rubocop.yml +17 -0
- data/rspec-mocks/upstream/.rubocop_rspec_base.yml +130 -0
- data/rspec-mocks/upstream/.travis.yml +35 -0
- data/rspec-mocks/upstream/.yardopts +6 -0
- data/rspec-mocks/upstream/Changelog.md +817 -0
- data/rspec-mocks/upstream/DEV-README.md +28 -0
- data/rspec-mocks/upstream/Gemfile +34 -0
- data/rspec-mocks/upstream/Gemfile-custom.sample +19 -0
- data/rspec-mocks/upstream/Guardfile +8 -0
- data/rspec-mocks/upstream/License.txt +24 -0
- data/rspec-mocks/upstream/README.md +397 -0
- data/rspec-mocks/upstream/Rakefile +72 -0
- data/rspec-mocks/upstream/benchmarks/boot_time.sh +31 -0
- data/rspec-mocks/upstream/benchmarks/double_creation.rb +66 -0
- data/rspec-mocks/upstream/benchmarks/each_value_v_values_each.rb +58 -0
- data/rspec-mocks/upstream/benchmarks/find_original_method_early.rb +64 -0
- data/rspec-mocks/upstream/benchmarks/method_defined_at_any_visibility.rb +101 -0
- data/rspec-mocks/upstream/benchmarks/thread_safety.rb +24 -0
- data/rspec-mocks/upstream/benchmarks/transfer_nested_constants.rb +77 -0
- data/rspec-mocks/upstream/cucumber.yml +2 -0
- data/rspec-mocks/upstream/features/.nav +43 -0
- data/rspec-mocks/upstream/features/README.md +76 -0
- data/rspec-mocks/upstream/features/basics/allowing_messages.feature +35 -0
- data/rspec-mocks/upstream/features/basics/expecting_messages.feature +73 -0
- data/rspec-mocks/upstream/features/basics/null_object_doubles.feature +35 -0
- data/rspec-mocks/upstream/features/basics/partial_test_doubles.feature +70 -0
- data/rspec-mocks/upstream/features/basics/scope.feature +99 -0
- data/rspec-mocks/upstream/features/basics/spies.feature +144 -0
- data/rspec-mocks/upstream/features/basics/test_doubles.feature +41 -0
- data/rspec-mocks/upstream/features/configuring_responses/README.md +12 -0
- data/rspec-mocks/upstream/features/configuring_responses/block_implementation.feature +131 -0
- data/rspec-mocks/upstream/features/configuring_responses/calling_the_original_implementation.feature +52 -0
- data/rspec-mocks/upstream/features/configuring_responses/raising_an_error.feature +28 -0
- data/rspec-mocks/upstream/features/configuring_responses/returning_a_value.feature +52 -0
- data/rspec-mocks/upstream/features/configuring_responses/throwing.feature +36 -0
- data/rspec-mocks/upstream/features/configuring_responses/wrapping_the_original_implementation.feature +53 -0
- data/rspec-mocks/upstream/features/configuring_responses/yielding.feature +76 -0
- data/rspec-mocks/upstream/features/mutating_constants/README.md +78 -0
- data/rspec-mocks/upstream/features/mutating_constants/hide_defined_constant.feature +64 -0
- data/rspec-mocks/upstream/features/mutating_constants/hide_undefined_constant.feature +22 -0
- data/rspec-mocks/upstream/features/mutating_constants/stub_defined_constant.feature +77 -0
- data/rspec-mocks/upstream/features/mutating_constants/stub_undefined_constant.feature +50 -0
- data/rspec-mocks/upstream/features/old_syntax/README.md +35 -0
- data/rspec-mocks/upstream/features/old_syntax/any_instance.feature +105 -0
- data/rspec-mocks/upstream/features/old_syntax/should_receive.feature +90 -0
- data/rspec-mocks/upstream/features/old_syntax/stub.feature +51 -0
- data/rspec-mocks/upstream/features/old_syntax/stub_chain.feature +69 -0
- data/rspec-mocks/upstream/features/old_syntax/unstub.feature +43 -0
- data/rspec-mocks/upstream/features/outside_rspec/minitest.feature +80 -0
- data/rspec-mocks/upstream/features/outside_rspec/standalone.feature +33 -0
- data/rspec-mocks/upstream/features/setting_constraints/README.md +6 -0
- data/rspec-mocks/upstream/features/setting_constraints/matching_arguments.feature +97 -0
- data/rspec-mocks/upstream/features/setting_constraints/message_order.feature +63 -0
- data/rspec-mocks/upstream/features/setting_constraints/receive_counts.feature +189 -0
- data/rspec-mocks/upstream/features/step_definitions/additional_cli_steps.rb +21 -0
- data/rspec-mocks/upstream/features/support/disallow_certain_apis.rb +24 -0
- data/rspec-mocks/upstream/features/support/env.rb +22 -0
- data/rspec-mocks/upstream/features/support/rubinius.rb +6 -0
- data/rspec-mocks/upstream/features/verifying_doubles/README.md +13 -0
- data/rspec-mocks/upstream/features/verifying_doubles/class_doubles.feature +70 -0
- data/rspec-mocks/upstream/features/verifying_doubles/dynamic_classes.feature +73 -0
- data/rspec-mocks/upstream/features/verifying_doubles/instance_doubles.feature +101 -0
- data/rspec-mocks/upstream/features/verifying_doubles/object_doubles.feature +62 -0
- data/rspec-mocks/upstream/features/verifying_doubles/partial_doubles.feature +34 -0
- data/rspec-mocks/upstream/features/working_with_legacy_code/README.md +3 -0
- data/rspec-mocks/upstream/features/working_with_legacy_code/any_instance.feature +115 -0
- data/rspec-mocks/upstream/features/working_with_legacy_code/message_chains.feature +79 -0
- data/rspec-mocks/upstream/lib/rspec/mocks.rb +126 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/any_instance.rb +10 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/any_instance/chain.rb +109 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/any_instance/expect_chain_chain.rb +35 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/any_instance/expectation_chain.rb +48 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/any_instance/message_chains.rb +85 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/any_instance/proxy.rb +116 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/any_instance/recorder.rb +267 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/any_instance/stub_chain.rb +45 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/any_instance/stub_chain_chain.rb +27 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/argument_list_matcher.rb +72 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/argument_matchers.rb +282 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/configuration.rb +157 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/error_generator.rb +253 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/example_methods.rb +379 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/instance_method_stasher.rb +135 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/marshal_extension.rb +41 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/matchers/expectation_customization.rb +20 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/matchers/have_received.rb +121 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/matchers/receive.rb +106 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/matchers/receive_message_chain.rb +66 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/matchers/receive_messages.rb +71 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/message_chain.rb +91 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/message_expectation.rb +694 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/method_double.rb +260 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/method_reference.rb +155 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/mutate_const.rb +324 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/object_reference.rb +91 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/order_group.rb +81 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/proxy.rb +431 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/space.rb +221 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/standalone.rb +3 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/syntax.rb +329 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/targets.rb +97 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/test_double.rb +135 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/verifying_double.rb +127 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/verifying_message_expecation.rb +62 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/verifying_proxy.rb +171 -0
- data/rspec-mocks/upstream/lib/rspec/mocks/version.rb +9 -0
- data/rspec-mocks/upstream/maintenance-branch +1 -0
- data/rspec-mocks/upstream/rspec-mocks.gemspec +44 -0
- data/rspec-mocks/upstream/script/clone_all_rspec_repos +24 -0
- data/rspec-mocks/upstream/script/functions.sh +168 -0
- data/rspec-mocks/upstream/script/ignores +55 -0
- data/rspec-mocks/upstream/script/list_method_cache_busters.sh +22 -0
- data/rspec-mocks/upstream/script/run_build +28 -0
- data/rspec-support/upstream/.gitignore +19 -0
- data/rspec-support/upstream/.rspec +4 -0
- data/rspec-support/upstream/.rubocop.yml +1 -0
- data/rspec-support/upstream/.rubocop_rspec_base.yml +130 -0
- data/rspec-support/upstream/.travis.yml +35 -0
- data/rspec-support/upstream/Changelog.md +77 -0
- data/rspec-support/upstream/Gemfile +21 -0
- data/rspec-support/upstream/LICENSE.txt +22 -0
- data/rspec-support/upstream/README.md +17 -0
- data/rspec-support/upstream/Rakefile +30 -0
- data/rspec-support/upstream/benchmarks/caller.rb +81 -0
- data/rspec-support/upstream/lib/rspec/support.rb +76 -0
- data/rspec-support/upstream/lib/rspec/support/caller_filter.rb +63 -0
- data/rspec-support/upstream/lib/rspec/support/differ.rb +214 -0
- data/rspec-support/upstream/lib/rspec/support/directory_maker.rb +61 -0
- data/rspec-support/upstream/lib/rspec/support/encoded_string.rb +69 -0
- data/rspec-support/upstream/lib/rspec/support/fuzzy_matcher.rb +48 -0
- data/rspec-support/upstream/lib/rspec/support/hunk_generator.rb +47 -0
- data/rspec-support/upstream/lib/rspec/support/matcher_definition.rb +31 -0
- data/rspec-support/upstream/lib/rspec/support/method_signature_verifier.rb +272 -0
- data/rspec-support/upstream/lib/rspec/support/os.rb +18 -0
- data/rspec-support/upstream/lib/rspec/support/recursive_const_methods.rb +76 -0
- data/rspec-support/upstream/lib/rspec/support/ruby_features.rb +45 -0
- data/rspec-support/upstream/lib/rspec/support/spec.rb +72 -0
- data/rspec-support/upstream/lib/rspec/support/spec/deprecation_helpers.rb +60 -0
- data/rspec-support/upstream/lib/rspec/support/spec/formatting_support.rb +9 -0
- data/rspec-support/upstream/lib/rspec/support/spec/in_sub_process.rb +43 -0
- data/rspec-support/upstream/lib/rspec/support/spec/prevent_load_time_warnings.rb +44 -0
- data/rspec-support/upstream/lib/rspec/support/spec/shell_out.rb +69 -0
- data/rspec-support/upstream/lib/rspec/support/spec/stderr_splitter.rb +52 -0
- data/rspec-support/upstream/lib/rspec/support/spec/with_isolated_directory.rb +9 -0
- data/rspec-support/upstream/lib/rspec/support/spec/with_isolated_stderr.rb +13 -0
- data/rspec-support/upstream/lib/rspec/support/version.rb +7 -0
- data/rspec-support/upstream/lib/rspec/support/version_checker.rb +53 -0
- data/rspec-support/upstream/lib/rspec/support/warnings.rb +39 -0
- data/rspec-support/upstream/maintenance-branch +1 -0
- data/rspec-support/upstream/rspec-support.gemspec +34 -0
- data/rspec-support/upstream/script/clone_all_rspec_repos +24 -0
- data/rspec-support/upstream/script/functions.sh +168 -0
- data/rspec-support/upstream/script/run_build +28 -0
- data/rspec/upstream/.document +2 -0
- data/rspec/upstream/.gitignore +11 -0
- data/rspec/upstream/Gemfile +7 -0
- data/rspec/upstream/License.txt +24 -0
- data/rspec/upstream/README.md +47 -0
- data/rspec/upstream/Rakefile +25 -0
- data/rspec/upstream/certs/rspec.pem +22 -0
- data/rspec/upstream/lib/rspec.rb +3 -0
- data/rspec/upstream/lib/rspec/version.rb +5 -0
- data/rspec/upstream/rspec.gemspec +40 -0
- metadata +462 -53
- data/rspec-core/spec/files_to_exclude.txt +0 -12
- data/rspec-core/spec/filters.rb +0 -211
- data/rspec-core/spec/fixes/missing_constants.rb +0 -34
- data/rspec-core/spec/fixes/sandboxing.rb +0 -72
- data/rspec-core/spec/fixes/shared_examples.rb +0 -6
- data/rspec-core/spec/requires.rb +0 -41
- data/rspec-expectations/spec/files_to_exclude.txt +0 -2
- data/rspec-expectations/spec/filters.rb +0 -188
- data/rspec-expectations/spec/fixes/missing_constants.rb +0 -10
- data/rspec-expectations/spec/fixes/shared_examples.rb +0 -15
- data/rspec-expectations/spec/requires.rb +0 -32
- data/rspec-mocks/spec/files_to_exclude.txt +0 -11
- data/rspec-mocks/spec/filters.rb +0 -98
- data/rspec-mocks/spec/fixes/shared_examples.rb +0 -6
- data/rspec-mocks/spec/requires.rb +0 -22
- data/rspec-support/spec/files_to_exclude.txt +0 -26
- data/rspec-support/spec/filters.rb +0 -17
- data/rspec-support/spec/fixes/missing_constants.rb +0 -3
- data/rspec-support/spec/fixes/shared_examples.rb +0 -4
- data/rspec-support/spec/requires.rb +0 -30
- data/spec-opal-passing/spec_helper.rb +0 -3
- data/spec-opal-passing/tautology_spec.rb +0 -21
- data/spec-opal-rspec/core/example_group_spec.rb +0 -145
- data/spec-opal-rspec/core/failed_example_notification_spec.rb +0 -31
- data/spec-opal-rspec/core/hooks_spec.rb +0 -113
- data/spec-opal-rspec/core/memoized_helpers_spec.rb +0 -36
- data/spec-opal-rspec/core/metadata_spec.rb +0 -48
- data/spec-opal-rspec/expectations/be_instance_of_spec.rb +0 -11
- data/spec-opal-rspec/expectations/dsl_spec.rb +0 -66
- data/spec-opal-rspec/expectations/expectation_target_spec.rb +0 -21
- data/spec-opal-rspec/expectations/yield_spec.rb +0 -11
- data/spec-opal/after_hooks_spec.rb +0 -142
- data/spec-opal/around_hooks_spec.rb +0 -77
- data/spec-opal/async_spec.rb +0 -134
- data/spec-opal/before_hooks_spec.rb +0 -185
- data/spec-opal/browser-formatter/opal_browser_formatter_spec.rb +0 -14
- data/spec-opal/example_spec.rb +0 -176
- data/spec-opal/legacy_async_spec.rb +0 -189
- data/spec-opal/matchers_spec.rb +0 -207
- data/spec-opal/mock_spec.rb +0 -65
- data/spec-opal/other/color_on_by_default_spec.rb +0 -9
- data/spec-opal/other/dummy_spec.rb +0 -5
- data/spec-opal/other/formatter_dependency.rb +0 -3
- data/spec-opal/other/ignored_spec.opal +0 -5
- data/spec-opal/other/test_formatter.rb +0 -9
- data/spec-opal/should_syntax_spec.rb +0 -19
- data/spec-opal/skip_pending_spec.rb +0 -45
- data/spec-opal/spec_helper.rb +0 -8
- data/spec-opal/sprockets_runner_js_errors.rb.erb +0 -18
- data/spec-opal/subject_spec.rb +0 -89
@@ -0,0 +1,72 @@
|
|
1
|
+
# grep -v -f <this file> doesn't work properly when empty, so this line is here.
|
2
|
+
|
3
|
+
# The `alias_method` calls below are only executed at file load time
|
4
|
+
# (when the method cache will be busted by defining methods anyway).
|
5
|
+
lib/rspec/core/configuration.rb: alias_method alias_name, name
|
6
|
+
lib/rspec/core/configuration.rb: alias_method "#{alias_name}=", "#{name}="
|
7
|
+
lib/rspec/core/configuration.rb: names.each {|name| alias_method "#{name}?", name}
|
8
|
+
lib/rspec/core/configuration.rb: alias_method :formatter=, :add_formatter
|
9
|
+
lib/rspec/core/configuration.rb: alias_method :alias_it_should_behave_like_to, :alias_it_behaves_like_to
|
10
|
+
lib/rspec/core/configuration.rb: alias_method :filter_run, :filter_run_including
|
11
|
+
lib/rspec/core/configuration.rb: alias_method :filter=, :inclusion_filter=
|
12
|
+
lib/rspec/core/configuration.rb: alias_method :filter, :inclusion_filter
|
13
|
+
lib/rspec/core/example.rb: alias_method :pending?, :pending
|
14
|
+
lib/rspec/core/example_group.rb: alias_method :display_name, :description
|
15
|
+
lib/rspec/core/example_group.rb: alias_method :describes, :described_class
|
16
|
+
lib/rspec/core/example_group.rb: # Works like `alias_method :name, :example` with the added benefit of
|
17
|
+
lib/rspec/core/example_group.rb: # Works like `alias_method :name, :it_behaves_like` with the added
|
18
|
+
lib/rspec/core/example_group.rb: alias_method :context, :describe
|
19
|
+
lib/rspec/core/hooks.rb: alias_method :append_before, :before
|
20
|
+
lib/rspec/core/hooks.rb: alias_method :prepend_after, :after
|
21
|
+
lib/rspec/core/shared_example_group.rb: alias_method :shared_context, :shared_examples
|
22
|
+
lib/rspec/core/shared_example_group.rb: alias_method :share_examples_for, :shared_examples
|
23
|
+
lib/rspec/core/shared_example_group.rb: alias_method :shared_examples_for, :shared_examples
|
24
|
+
lib/rspec/core/shared_example_group.rb: alias_method :shared_context, :shared_examples
|
25
|
+
lib/rspec/core/shared_example_group.rb: alias_method :share_examples_for, :shared_examples
|
26
|
+
lib/rspec/core/shared_example_group.rb: alias_method :shared_examples_for, :shared_examples
|
27
|
+
lib/rspec/core/example_group.rb: alias_method :describe, :example_group
|
28
|
+
lib/rspec/core/example_group.rb: alias_method :context, :example_group
|
29
|
+
|
30
|
+
# The `alias_method` calls below happen when users define a named let.
|
31
|
+
# It happens at spec definition time, not spec run time.
|
32
|
+
lib/rspec/core/memoized_helpers.rb: alias_method :subject, name
|
33
|
+
|
34
|
+
# These `const_set` calls happen at spec definition time,
|
35
|
+
# not at spec run time, so they are OK.
|
36
|
+
lib/rspec/core/example_group.rb: const_scope.const_set(name, group)
|
37
|
+
lib/rspec/core/memoized_helpers.rb: example_group.const_set(:NamedSubjectPreventSuper, self)
|
38
|
+
lib/rspec/core/memoized_helpers.rb: example_group.const_set(:LetDefinitions, mod)
|
39
|
+
|
40
|
+
# These mentions of `extend` get executed at spec definition time
|
41
|
+
# (unless the user changes their RSpec config at spec run time, but
|
42
|
+
# there's no way to work around that).
|
43
|
+
lib/rspec/core/configuration.rb: def extend(mod, \*filters)
|
44
|
+
lib/rspec/core/configuration.rb: include_or_extend_modules << \[:extend, mod, Metadata.build_hash_from(filters)\]
|
45
|
+
lib/rspec/core/configuration.rb: host.extend(mod) unless host.singleton_class < mod
|
46
|
+
lib/rspec/core/configuration.rb: host.extend(mod) unless (class << host; self; end).included_modules.include?(mod)
|
47
|
+
lib/rspec/core/configuration.rb: extend RSpec::SharedContext
|
48
|
+
lib/rspec/core/dsl.rb:extend RSpec::Core::DSL
|
49
|
+
lib/rspec/core/example_group.rb: extend Hooks
|
50
|
+
lib/rspec/core/example_group.rb: extend SharedExampleGroup
|
51
|
+
lib/rspec/core/memoized_helpers.rb: mod.extend(ClassMethods)
|
52
|
+
lib/rspec/core/shared_example_group.rb:extend RSpec::Core::SharedExampleGroup::TopLevelDSL
|
53
|
+
|
54
|
+
# This use of `extend` only happens on 1.8.7, when a shared example group
|
55
|
+
# is defined (to provide the Proc#source_location method on the provided
|
56
|
+
# block). It should only happen at spec definition time (unless users are
|
57
|
+
# defining shared example groups at spec run time).
|
58
|
+
lib/rspec/core/shared_example_group.rb: block.extend Module.new {
|
59
|
+
|
60
|
+
# This happens when an example group is defined, not at spec run time.
|
61
|
+
lib/rspec/core/example_group.rb: subclass = Class.new(parent)
|
62
|
+
|
63
|
+
# This happens at file load time.
|
64
|
+
lib/rspec/core/formatters/deprecation_formatter.rb: DeprecationError = Class.new(StandardError)
|
65
|
+
|
66
|
+
# This enables / disable monkey patching and only happens on demand
|
67
|
+
lib/rspec/core/dsl.rb: change_global_dsl { undef_method method_name }
|
68
|
+
lib/rspec/core/shared_example_group.rb: undef shared_examples
|
69
|
+
lib/rspec/core/shared_example_group.rb: undef shared_context
|
70
|
+
lib/rspec/core/shared_example_group.rb: undef share_examples_for
|
71
|
+
lib/rspec/core/shared_example_group.rb: undef shared_examples_for
|
72
|
+
lib/rspec/core/shared_example_group.rb: undef shared_example_groups
|
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
# set -x
|
3
|
+
|
4
|
+
# This list is from https://charlie.bz/blog/things-that-clear-rubys-method-cache
|
5
|
+
|
6
|
+
IGNORE_FILE=/tmp/cache_busters_ignore
|
7
|
+
COMMENT_LINE_RE="^(\w|\/)+\.rb: +#"
|
8
|
+
|
9
|
+
cat script/ignores | grep -v "^$" | ruby -ne 'puts $_.split(/\s+###/)[0]' > $IGNORE_FILE
|
10
|
+
|
11
|
+
egrep 'def [a-z]*\..*' -R lib | grep -v "def self" | grep -v -f $IGNORE_FILE | egrep -v "$COMMENT_LINE_RE"
|
12
|
+
grep undef -R lib | grep -v -f $IGNORE_FILE | egrep -v "$COMMENT_LINE_RE"
|
13
|
+
grep alias_method -R lib | grep -v -f $IGNORE_FILE | egrep -v "$COMMENT_LINE_RE"
|
14
|
+
grep remove_method -R lib | grep -v -f $IGNORE_FILE | egrep -v "$COMMENT_LINE_RE"
|
15
|
+
grep const_set -R lib | grep -v -f $IGNORE_FILE | egrep -v "$COMMENT_LINE_RE"
|
16
|
+
grep remove_const -R lib | grep -v -f $IGNORE_FILE | egrep -v "$COMMENT_LINE_RE"
|
17
|
+
egrep '\bextend\b' -R lib | grep -v -f $IGNORE_FILE | egrep -v "$COMMENT_LINE_RE"
|
18
|
+
grep 'Class.new' -R lib | grep -v -f $IGNORE_FILE | egrep -v "$COMMENT_LINE_RE"
|
19
|
+
grep private_constant -R lib | grep -v -f $IGNORE_FILE | egrep -v "$COMMENT_LINE_RE"
|
20
|
+
grep public_constant -R lib | grep -v -f $IGNORE_FILE | egrep -v "$COMMENT_LINE_RE"
|
21
|
+
grep "Marshal.load" -R lib | grep -v -f $IGNORE_FILE | egrep -v "$COMMENT_LINE_RE"
|
22
|
+
grep "OpenStruct.new" -R lib | grep -v -f $IGNORE_FILE | egrep -v "$COMMENT_LINE_RE"
|
23
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
method_cache_busters = `script/list_method_cache_busters.sh`.split("\n").map(&:chomp)
|
4
|
+
|
5
|
+
if method_cache_busters.any?
|
6
|
+
puts "=" * 80
|
7
|
+
puts "Found #{method_cache_busters.size} new constructs that bust the method cache."
|
8
|
+
puts "These should be eliminated or added to the `ignores` file."
|
9
|
+
puts
|
10
|
+
puts "For more information, see https://charlie.bz/blog/things-that-clear-rubys-method-cache"
|
11
|
+
puts
|
12
|
+
puts method_cache_busters.join("\n")
|
13
|
+
puts "=" * 80
|
14
|
+
exit(1)
|
15
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# This script likely won't work as is for you, but is a good template for
|
4
|
+
# iterating over all rubies and regenerating HTML fixtures.
|
5
|
+
|
6
|
+
set -e
|
7
|
+
|
8
|
+
source /usr/local/share/chruby/chruby.sh
|
9
|
+
|
10
|
+
function switch_ruby() {
|
11
|
+
chruby $1
|
12
|
+
}
|
13
|
+
|
14
|
+
function regen() {
|
15
|
+
bundle check || bundle install
|
16
|
+
GENERATE=1 bundle exec rspec ./spec/rspec/core/formatters/ || true
|
17
|
+
}
|
18
|
+
|
19
|
+
for ruby in \
|
20
|
+
jruby-1.7.9 \
|
21
|
+
1.9.3-p392 \
|
22
|
+
2.0.0-p247 \
|
23
|
+
2.1.0-p0 \
|
24
|
+
rbx-2.2.3 \
|
25
|
+
ree-1.8.7-2012.02;
|
26
|
+
do
|
27
|
+
switch_ruby $ruby
|
28
|
+
ruby -v
|
29
|
+
if [ $(echo $ruby | grep jruby) ]
|
30
|
+
then
|
31
|
+
export JRUBY_OPTS=--1.8
|
32
|
+
regen
|
33
|
+
export JRUBY_OPTS=--1.9
|
34
|
+
regen
|
35
|
+
else
|
36
|
+
regen
|
37
|
+
fi
|
38
|
+
done
|
39
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Turn on verbose to make sure we not generating any ruby warning
|
4
|
+
$VERBOSE = true
|
5
|
+
|
6
|
+
# So our "did they run the rspec command?" detection logic thinks
|
7
|
+
# that we run `rspec`.
|
8
|
+
$0 = "rspec"
|
9
|
+
|
10
|
+
# This is necessary for when `--standalone` is being used.
|
11
|
+
$:.unshift File.expand_path '../../bundle', __FILE__
|
12
|
+
|
13
|
+
# For the travis build we put the bundle directory up a directory
|
14
|
+
# so it can be shared among the repos for faster bundle installs.
|
15
|
+
$:.unshift File.expand_path '../../../bundle', __FILE__
|
16
|
+
|
17
|
+
require 'bundler/setup'
|
18
|
+
|
19
|
+
# To use simplecov while running rspec-core's test suite, we must
|
20
|
+
# load simplecov _before_ loading any of rspec-core's files.
|
21
|
+
# So, this executable exists purely as a wrapper script that
|
22
|
+
# first loads simplecov, and then loads rspec.
|
23
|
+
begin
|
24
|
+
# Simplecov emits some ruby warnings when loaded, so silence them.
|
25
|
+
old_verbose, $VERBOSE = $VERBOSE, false
|
26
|
+
|
27
|
+
unless ENV['NO_COVERAGE'] || RUBY_VERSION < '1.9.3'
|
28
|
+
require 'simplecov'
|
29
|
+
|
30
|
+
SimpleCov.start do
|
31
|
+
add_filter "./bundle/"
|
32
|
+
add_filter "./tmp/"
|
33
|
+
add_filter "./spec/"
|
34
|
+
minimum_coverage(RUBY_PLATFORM == 'java' ? 94 : 97)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
rescue LoadError
|
38
|
+
ensure
|
39
|
+
$VERBOSE = old_verbose
|
40
|
+
end
|
41
|
+
|
42
|
+
load File.expand_path("../../exe/rspec", __FILE__)
|
@@ -0,0 +1,28 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
# This file was generated on 2014-08-23T21:27:12-07:00 from the rspec-dev repo.
|
3
|
+
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
|
4
|
+
|
5
|
+
set -e -x
|
6
|
+
source script/functions.sh
|
7
|
+
|
8
|
+
# Allow repos to override the default functions and add their own
|
9
|
+
if [ -f script/custom_build_functions.sh ]; then
|
10
|
+
source script/custom_build_functions.sh
|
11
|
+
fi
|
12
|
+
|
13
|
+
run_specs_and_record_done
|
14
|
+
run_cukes
|
15
|
+
|
16
|
+
if documentation_enforced; then
|
17
|
+
check_documentation_coverage
|
18
|
+
fi
|
19
|
+
|
20
|
+
if style_and_lint_enforced; then
|
21
|
+
check_style_and_lint
|
22
|
+
fi
|
23
|
+
|
24
|
+
if is_mri; then
|
25
|
+
run_all_spec_suites
|
26
|
+
else
|
27
|
+
echo "Skipping the rest of the build on non-MRI rubies"
|
28
|
+
fi
|
@@ -0,0 +1,130 @@
|
|
1
|
+
# This file was generated on 2014-08-23T21:27:12-07:00 from the rspec-dev repo.
|
2
|
+
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
|
3
|
+
|
4
|
+
# This file contains defaults for RSpec projects. Individual projects
|
5
|
+
# can customize by inheriting this file and overriding particular settings.
|
6
|
+
|
7
|
+
AccessModifierIndentation:
|
8
|
+
EnforcedStyle: outdent
|
9
|
+
|
10
|
+
# "Use alias_method instead of alias"
|
11
|
+
# We're fine with `alias`.
|
12
|
+
Alias:
|
13
|
+
Enabled: false
|
14
|
+
|
15
|
+
AlignParameters:
|
16
|
+
EnforcedStyle: with_first_parameter
|
17
|
+
|
18
|
+
# "Avoid the use of the case equality operator ==="
|
19
|
+
# We prefer using `Class#===` over `Object#is_a?` because `Class#===`
|
20
|
+
# is less likely to be monkey patched than `is_a?` on a user object.
|
21
|
+
CaseEquality:
|
22
|
+
Enabled: false
|
23
|
+
|
24
|
+
# Warns when the class is excessively long.
|
25
|
+
ClassLength:
|
26
|
+
Max: 100
|
27
|
+
|
28
|
+
CollectionMethods:
|
29
|
+
PreferredMethods:
|
30
|
+
reduce: 'inject'
|
31
|
+
|
32
|
+
# Over time we'd like to get this down, but this is what we're at now.
|
33
|
+
CyclomaticComplexity:
|
34
|
+
Max: 10
|
35
|
+
|
36
|
+
# We use YARD to enforce documentation. It works better than rubocop's
|
37
|
+
# enforcement...rubocop complains about the places we re-open
|
38
|
+
# `RSpec::Expectations` and `RSpec::Matchers` w/o having doc commments.
|
39
|
+
Documentation:
|
40
|
+
Enabled: false
|
41
|
+
|
42
|
+
# We still support 1.8.7 which requires trailing dots
|
43
|
+
DotPosition:
|
44
|
+
EnforcedStyle: trailing
|
45
|
+
|
46
|
+
DoubleNegation:
|
47
|
+
Enabled: false
|
48
|
+
|
49
|
+
# each_with_object is unavailable on 1.8.7 so we have to disable this one.
|
50
|
+
EachWithObject:
|
51
|
+
Enabled: false
|
52
|
+
|
53
|
+
Encoding:
|
54
|
+
EnforcedStyle: when_needed
|
55
|
+
|
56
|
+
FormatString:
|
57
|
+
EnforcedStyle: percent
|
58
|
+
|
59
|
+
# As long as we support ruby 1.8.7 we have to use hash rockets.
|
60
|
+
HashSyntax:
|
61
|
+
EnforcedStyle: hash_rockets
|
62
|
+
|
63
|
+
# We can't use the new lambda syntax, since we still support 1.8.7.
|
64
|
+
Lambda:
|
65
|
+
Enabled: false
|
66
|
+
|
67
|
+
# Over time we'd like to get this down, but this is what we're at now.
|
68
|
+
LineLength:
|
69
|
+
Max: 100
|
70
|
+
|
71
|
+
# Over time we'd like to get this down, but this is what we're at now.
|
72
|
+
MethodLength:
|
73
|
+
Max: 15
|
74
|
+
|
75
|
+
# Who cares what we call the argument for binary operator methods?
|
76
|
+
OpMethod:
|
77
|
+
Enabled: false
|
78
|
+
|
79
|
+
PercentLiteralDelimiters:
|
80
|
+
PreferredDelimiters:
|
81
|
+
'%': () # double-quoted string
|
82
|
+
'%i': '[]' # array of symbols
|
83
|
+
'%q': () # single-quoted string
|
84
|
+
'%Q': () # double-quoted string
|
85
|
+
'%r': '{}' # regular expression pattern
|
86
|
+
'%s': () # a symbol
|
87
|
+
'%w': '[]' # array of single-quoted strings
|
88
|
+
'%W': '[]' # array of double-quoted strings
|
89
|
+
'%x': () # a shell command as a string
|
90
|
+
|
91
|
+
# We have too many special cases where we allow generator methods or prefer a
|
92
|
+
# prefixed predicate due to it's improved readability.
|
93
|
+
PredicateName:
|
94
|
+
Enabled: false
|
95
|
+
|
96
|
+
# On 1.8 `proc` is `lambda`, so we use `Proc.new` to ensure we get real procs on all supported versions.
|
97
|
+
# http://batsov.com/articles/2014/02/04/the-elements-of-style-in-ruby-number-12-proc-vs-proc-dot-new/
|
98
|
+
Proc:
|
99
|
+
Enabled: false
|
100
|
+
|
101
|
+
RedundantReturn:
|
102
|
+
AllowMultipleReturnValues: true
|
103
|
+
|
104
|
+
# We have to rescue Exception in the `raise_error` matcher for it to work properly.
|
105
|
+
RescueException:
|
106
|
+
Enabled: false
|
107
|
+
|
108
|
+
# We haven't adopted the `fail` to signal exceptions vs `raise` for re-raises convention.
|
109
|
+
SignalException:
|
110
|
+
Enabled: false
|
111
|
+
|
112
|
+
# We've tended to use no space, so it's less of a change to stick with that.
|
113
|
+
SpaceAroundEqualsInParameterDefault:
|
114
|
+
EnforcedStyle: no_space
|
115
|
+
|
116
|
+
# We don't care about single vs double qoutes.
|
117
|
+
StringLiterals:
|
118
|
+
Enabled: false
|
119
|
+
|
120
|
+
# This rule favors constant names from the English standard library which we don't load.
|
121
|
+
Style/SpecialGlobalVars:
|
122
|
+
Enabled: false
|
123
|
+
|
124
|
+
Style/TrailingComma:
|
125
|
+
Enabled: false
|
126
|
+
|
127
|
+
TrivialAccessors:
|
128
|
+
AllowDSLWriters: true
|
129
|
+
AllowPredicates: true
|
130
|
+
ExactNameMatch: true
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# This file was generated on 2014-08-23T21:27:12-07:00 from the rspec-dev repo.
|
2
|
+
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
|
3
|
+
|
4
|
+
language: ruby
|
5
|
+
sudo: false
|
6
|
+
before_install:
|
7
|
+
- "script/clone_all_rspec_repos"
|
8
|
+
# Downgrade bundler to work around https://github.com/bundler/bundler/issues/3004
|
9
|
+
# Note this doesn't work on JRUBY 2.0.0 mode so we don't do it
|
10
|
+
- if [ -z "$JRUBY_OPTS" ]; then gem install bundler -v=1.5.3 && alias bundle="bundle _1.5.3_"; fi
|
11
|
+
bundler_args: "--binstubs --standalone --without documentation --path ../bundle"
|
12
|
+
script: "script/run_build"
|
13
|
+
rvm:
|
14
|
+
- 1.8.7
|
15
|
+
- 1.9.2
|
16
|
+
- 1.9.3
|
17
|
+
- 2.0.0
|
18
|
+
- 2.1.0
|
19
|
+
- 2.1.1
|
20
|
+
- 2.1.2
|
21
|
+
- ruby-head
|
22
|
+
- ree
|
23
|
+
- jruby-18mode
|
24
|
+
- jruby
|
25
|
+
- jruby-head
|
26
|
+
- rbx
|
27
|
+
matrix:
|
28
|
+
include:
|
29
|
+
- rvm: jruby
|
30
|
+
env: JRUBY_OPTS='--2.0'
|
31
|
+
allow_failures:
|
32
|
+
- rvm: jruby-head
|
33
|
+
- rvm: ruby-head
|
34
|
+
- rvm: rbx
|
35
|
+
fast_finish: true
|
@@ -0,0 +1,835 @@
|
|
1
|
+
### 3.1.2 / 2014-09-26
|
2
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.1.1...v3.1.2)
|
3
|
+
|
4
|
+
Bug Fixes:
|
5
|
+
|
6
|
+
* Fix `define_negated_matcher` so that matchers that support fluent
|
7
|
+
interfaces continue to be negated after you use the chained method.
|
8
|
+
(Myron Marston, #656)
|
9
|
+
* Fix `define_negated_matcher` so that the matchers fail with an
|
10
|
+
appropriate failure message. (Myron Marston, #659)
|
11
|
+
|
12
|
+
### 3.1.1 / 2014-09-15
|
13
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.1.0...v3.1.1)
|
14
|
+
|
15
|
+
Bug Fixes:
|
16
|
+
|
17
|
+
* Fix regression in `all` matcher in 3.1.0 that prevented it from
|
18
|
+
working on objects that are not `Enumerable` but do implement
|
19
|
+
`each_with_index` (such as an ActiveRecord proxy). (Jori Hardman, #647)
|
20
|
+
|
21
|
+
### 3.1.0 / 2014-09-04
|
22
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.0.4...v3.1.0)
|
23
|
+
|
24
|
+
Enhancements:
|
25
|
+
|
26
|
+
* Add `have_attributes` matcher, that passes if actual's attribute
|
27
|
+
values match the expected attributes hash:
|
28
|
+
`Person = Struct.new(:name, :age)`
|
29
|
+
`person = Person.new("Bob", 32)`
|
30
|
+
`expect(person).to have_attributes(:name => "Bob", :age => 32)`.
|
31
|
+
(Adam Farhi, #571)
|
32
|
+
* Extended compound matcher support to block matchers, for cases like:
|
33
|
+
`expect { ... }.to change { x }.to(3).and change { y }.to(4)`. (Myron
|
34
|
+
Marston, #567)
|
35
|
+
* Include chained methods in custom matcher description and failure message
|
36
|
+
when new `include_chain_clauses_in_custom_matcher_descriptions` config
|
37
|
+
option is enabled. (Dan Oved, #600)
|
38
|
+
* Add `thrice` modifier to `yield_control` matcher as a synonym for
|
39
|
+
`exactly(3).times`. (Dennis Taylor, #615)
|
40
|
+
* Add `RSpec::Matchers.define_negated_matcher`, which defines a negated
|
41
|
+
version of the named matcher. (Adam Farhi, Myron Marston, #618)
|
42
|
+
* Document and support negation of `contain_exactly`/`match_array`.
|
43
|
+
(Jon Rowe, #626).
|
44
|
+
|
45
|
+
Bug Fixes:
|
46
|
+
|
47
|
+
* Rename private `LegacyMacherAdapter` constant to `LegacyMatcherAdapter`
|
48
|
+
to fix typo. (Abdelkader Boudih, #563)
|
49
|
+
* Fix `all` matcher so that it fails properly (rather than raising a
|
50
|
+
`NoMethodError`) when matched against a non-enumerable. (Hao Su, #622)
|
51
|
+
|
52
|
+
### 3.0.4 / 2014-08-14
|
53
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.0.3...v3.0.4)
|
54
|
+
|
55
|
+
Bug Fixes:
|
56
|
+
|
57
|
+
* Fix `start_with` and `end_with` so that they work properly with
|
58
|
+
structs. (Myron Marston, #620)
|
59
|
+
* Fix failure message generation so that structs are printed properly
|
60
|
+
in failures. Previously failure messages would represent them as
|
61
|
+
an array. (Myron Marston, #620)
|
62
|
+
* Fix composable matcher support so that it does not wrongly treat
|
63
|
+
structs as arrays. (Myron Marston, #620)
|
64
|
+
|
65
|
+
### 3.0.3 / 2014-07-21
|
66
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.0.2...v3.0.3)
|
67
|
+
|
68
|
+
Bug Fixes:
|
69
|
+
|
70
|
+
* Fix issue with detection of generic operator matchers so they work
|
71
|
+
correctly when undefined. (Myron Marston, #597)
|
72
|
+
* Don't inadvertently define `BasicObject` in 1.8.7. (Chris Griego, #603)
|
73
|
+
* Fix `include` matcher so that it fails gracefully when matched against
|
74
|
+
an object that does not respond to `include?`. (Myron Marston, #607)
|
75
|
+
|
76
|
+
### 3.0.2 / 2014-06-19
|
77
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.0.1...v3.0.2)
|
78
|
+
|
79
|
+
Bug Fixes:
|
80
|
+
|
81
|
+
* Fix regression in `contain_exactly` (AKA `match_array`) that caused it
|
82
|
+
to wrongly pass when the expected array was empty. (Myron Marston, #581)
|
83
|
+
* Provide a better error message when you use the `change(obj, :msg)`
|
84
|
+
form of the change matcher but forget the message argument. (Alex
|
85
|
+
Sunderland, #585)
|
86
|
+
* Make the `contain_exactly` matcher work with arrays that contain hashes in
|
87
|
+
arbitrary ordering. (Sam Phippen, #578)
|
88
|
+
|
89
|
+
### 3.0.1 / 2014-06-12
|
90
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.0.0...v3.0.1)
|
91
|
+
|
92
|
+
Bug Fixes:
|
93
|
+
|
94
|
+
* Add a missing `require` that would cause the `respond_to` matcher to
|
95
|
+
fail when used in a project where the rest of RSpec (e.g. core and
|
96
|
+
expecatations) weren't being used. (Myron Marston, #566)
|
97
|
+
* Structs are no longer treated as arrays when diffed. (Jon Rowe, #576)
|
98
|
+
|
99
|
+
### 3.0.0 / 2014-06-01
|
100
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.0.0.rc1...v3.0.0)
|
101
|
+
|
102
|
+
No code changes. Just taking it out of pre-release.
|
103
|
+
|
104
|
+
### 3.0.0.rc1 / 2014-05-18
|
105
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.0.0.beta2...v3.0.0.rc1)
|
106
|
+
|
107
|
+
Breaking Changes for 3.0.0:
|
108
|
+
|
109
|
+
* Remove `matcher_execution_context` attribute from DSL-defined
|
110
|
+
custom matchers. (Myron Marston)
|
111
|
+
* Remove `RSpec::Matchers::Pretty#_pretty_print`. (Myron Marston)
|
112
|
+
* Remove `RSpec::Matchers::Pretty#expected_to_sentence`. (Myron Marston)
|
113
|
+
* Rename `RSpec::Matchers::Configuration` constant to
|
114
|
+
`RSpec::Expectations::Configuration`. (Myron Marston)
|
115
|
+
* Prevent `have_xyz` predicate matchers using private methods.
|
116
|
+
(Adrian Gonzalez)
|
117
|
+
* Block matchers must now implement `supports_block_expectations?`.
|
118
|
+
(Myron Marston)
|
119
|
+
* Stop supporting `require 'rspec-expectations'`.
|
120
|
+
Use `require 'rspec/expectations'` instead. (Myron Marston)
|
121
|
+
|
122
|
+
Bug Fixes:
|
123
|
+
|
124
|
+
* Fix `NoMethodError` triggered by beta2 when `YARD` was loaded in
|
125
|
+
the test environment. (Myron Marston)
|
126
|
+
* Fix `be_xyz` matcher to accept a `do...end` block. (Myron Marston)
|
127
|
+
* Fix composable matcher failure message generation logic
|
128
|
+
so that it does not blow up when given `$stdout` or `$stderr`.
|
129
|
+
(Myron Marston)
|
130
|
+
* Fix `change` matcher to work properly with `IO` objects.
|
131
|
+
(Myron Marston)
|
132
|
+
* Fix `exist` matcher so that it can be used in composed matcher
|
133
|
+
expressions involving objects that do not implement `exist?` or
|
134
|
+
`exists?`. (Daniel Fone)
|
135
|
+
* Fix composable matcher match logic so that it clones matchers
|
136
|
+
before using them in order to work properly with matchers
|
137
|
+
that use internal memoization based on a given `actual` value.
|
138
|
+
(Myron Marston)
|
139
|
+
* Fix `be_xyz` and `has_xyz` predicate matchers so that they can
|
140
|
+
be used in composed matcher expressions involving objects that
|
141
|
+
do not implement the predicate method. (Daniel Fone)
|
142
|
+
|
143
|
+
Enhancements:
|
144
|
+
|
145
|
+
* Document the remaining public APIs. rspec-expectations now has 100% of
|
146
|
+
the public API documented and will remain that way (as new undocumented
|
147
|
+
methods will fail the build). (Myron Marston)
|
148
|
+
* Improve the formatting of BigDecimal objects in `eq` matcher failure
|
149
|
+
messages. (Daniel Fone)
|
150
|
+
* Improve the failure message for `be_xyz` predicate matchers so
|
151
|
+
that it includes the `inspect` output of the receiver.
|
152
|
+
(Erik Michaels-Ober, Sam Phippen)
|
153
|
+
* Add `all` matcher, to allow you to specify that a given matcher
|
154
|
+
matches all elements in a collection:
|
155
|
+
`expect([1, 3, 5]).to all( be_odd )`. (Adam Farhi)
|
156
|
+
* Add boolean aliases (`&`/`|`) for compound operators (`and`/`or`). (Adam Farhi)
|
157
|
+
* Give users a clear error when they wrongly use a value matcher
|
158
|
+
in a block expectation expression (e.g. `expect { 3 }.to eq(3)`)
|
159
|
+
or vice versa. (Myron Marston)
|
160
|
+
|
161
|
+
### 3.0.0.beta2 / 2014-02-17
|
162
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.0.0.beta1...v3.0.0.beta2)
|
163
|
+
|
164
|
+
Breaking Changes for 3.0.0:
|
165
|
+
|
166
|
+
* Remove deprecated support for accessing the `RSpec` constant using
|
167
|
+
`Rspec` or `Spec`. (Myron Marston)
|
168
|
+
* Remove deprecated `RSpec::Expectations.differ=`. (Myron Marston)
|
169
|
+
* Remove support for deprecated `expect(...).should`. (Myron Marston)
|
170
|
+
* Explicitly disallow `expect { }.not_to change { }` with `by`,
|
171
|
+
`by_at_least`, `by_at_most` or `to`. These have never been supported
|
172
|
+
but did not raise explicit errors. (Myron Marston)
|
173
|
+
* Provide `===` rather than `==` as an alias of `matches?` for
|
174
|
+
all matchers. The semantics of `===` are closer to an RSpec
|
175
|
+
matcher than `==`. (Myron Marston)
|
176
|
+
* Remove deprecated `RSpec::Matchers::OperatorMatcher` constant.
|
177
|
+
(Myron Marston)
|
178
|
+
* Make `RSpec::Expectations::ExpectationNotMetError` subclass
|
179
|
+
`Exception` rather than `StandardError` so they can bypass
|
180
|
+
a bare `rescue` in end-user code (e.g. when an expectation is
|
181
|
+
set from within a rspec-mocks stub implementation). (Myron Marston)
|
182
|
+
* Remove Test::Unit and Minitest 4.x integration. (Myron Marston)
|
183
|
+
|
184
|
+
Enhancements:
|
185
|
+
|
186
|
+
* Simplify the failure message of the `be` matcher when matching against:
|
187
|
+
`true`, `false` and `nil`. (Sam Phippen)
|
188
|
+
* Update matcher protocol and custom matcher DSL to better align
|
189
|
+
with the newer `expect` syntax. If you want your matchers to
|
190
|
+
maintain compatibility with multiple versions of RSpec, you can
|
191
|
+
alias the new names to the old. (Myron Marston)
|
192
|
+
* `failure_message_for_should` => `failure_message`
|
193
|
+
* `failure_message_for_should_not` => `failure_message_when_negated`
|
194
|
+
* `match_for_should` => `match`
|
195
|
+
* `match_for_should_not` => `match_when_negated`
|
196
|
+
* Improve generated descriptions from `change` matcher. (Myron Marston)
|
197
|
+
* Add support for compound matcher expressions using `and` and `or`.
|
198
|
+
Simply chain them off of any existing matcher to create an expression
|
199
|
+
like `expect(alphabet).to start_with("a").and end_with("z")`.
|
200
|
+
(Eloy Espinaco)
|
201
|
+
* Add `contain_exactly` as a less ambiguous version of `match_array`.
|
202
|
+
Note that it expects the expected array to be splatted as
|
203
|
+
individual args: `expect(array).to contain_exactly(1, 2)` is
|
204
|
+
the same as `expect(array).to match_array([1, 2])`. (Myron Marston)
|
205
|
+
* Update `contain_exactly`/`match_array` so that it can match against
|
206
|
+
other non-array collections (such as a `Set`). (Myron Marston)
|
207
|
+
* Update built-in matchers so that they can accept matchers as arguments
|
208
|
+
to allow you to compose matchers in arbitrary ways. (Myron Marston)
|
209
|
+
* Add `RSpec::Matchers::Composable` mixin that can be used to make
|
210
|
+
a custom matcher composable as well. Note that custom matchers
|
211
|
+
defined via `RSpec::Matchers.define` already have this. (Myron
|
212
|
+
Marston)
|
213
|
+
* Define noun-phrase aliases for built-in matchers, which can be
|
214
|
+
used when creating composed matcher expressions that read better
|
215
|
+
and provide better failure messages. (Myron Marston)
|
216
|
+
* Add `RSpec::Matchers.alias_matcher` so users can define their own
|
217
|
+
matcher aliases. The `description` of the matcher will reflect the
|
218
|
+
alternate matcher name. (Myron Marston)
|
219
|
+
* Add explicit `be_between` matcher. `be_between` has worked for a
|
220
|
+
long time as a dynamic predicate matcher, but the failure message
|
221
|
+
was suboptimal. The new matcher provides a much better failure
|
222
|
+
message. (Erik Michaels-Ober)
|
223
|
+
* Enhance the `be_between` matcher to allow for `inclusive` or `exclusive`
|
224
|
+
comparison (e.g. inclusive of min/max or exclusive of min/max).
|
225
|
+
(Pedro Gimenez)
|
226
|
+
* Make failure message for `not_to be #{operator}` less confusing by
|
227
|
+
only saying it's confusing when comparison operators are used.
|
228
|
+
(Prathamesh Sonpatki)
|
229
|
+
* Improve failure message of `eq` matcher when `Time` or `DateTime`
|
230
|
+
objects are used so that the full sub-second precision is included.
|
231
|
+
(Thomas Holmes, Jeff Wallace)
|
232
|
+
* Add `output` matcher for expecting that a block outputs `to_stdout`
|
233
|
+
or `to_stderr`. (Luca Pette, Matthias Günther)
|
234
|
+
* Forward a provided block on to the `has_xyz?` method call when
|
235
|
+
the `have_xyz` matcher is used. (Damian Galarza)
|
236
|
+
* Provide integration with Minitest 5.x. Require
|
237
|
+
`rspec/expectations/minitest_integration` after loading minitest
|
238
|
+
to use rspec-expectations with minitest. (Myron Marston)
|
239
|
+
|
240
|
+
Bug Fixes:
|
241
|
+
|
242
|
+
* Fix wrong matcher descriptions with falsey expected value (yujinakayama)
|
243
|
+
* Fix `expect { }.not_to change { }.from(x)` so that the matcher only
|
244
|
+
passes if the starting value is `x`. (Tyler Rick, Myron Marston)
|
245
|
+
* Fix hash diffing, so that it colorizes properly and doesn't consider trailing
|
246
|
+
commas when performing the diff. (Jared Norman)
|
247
|
+
* Fix built-in matchers to fail normally rather than raising
|
248
|
+
`ArgumentError` when given an object of the wrong type to match
|
249
|
+
against, so that they work well in composite matcher expressions like
|
250
|
+
`expect([1.51, "foo"]).to include(a_string_matching(/foo/), a_value_within(0.1).of(1.5))`.
|
251
|
+
(Myron Marston)
|
252
|
+
|
253
|
+
Deprecations:
|
254
|
+
|
255
|
+
* Retain support for RSpec 2 matcher protocol (e.g. for matchers
|
256
|
+
in 3rd party extension gems like `shoulda`), but it will print
|
257
|
+
a deprecation warning. (Myron Marston)
|
258
|
+
|
259
|
+
### 3.0.0.beta1 / 2013-11-07
|
260
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.99.2...v3.0.0.beta1)
|
261
|
+
|
262
|
+
Breaking Changes for 3.0.0:
|
263
|
+
|
264
|
+
* Remove explicit support for 1.8.6. (Jon Rowe)
|
265
|
+
* Remove the deprecated `be_close` matcher, preferring `be_within` instead.
|
266
|
+
(Sam Phippen)
|
267
|
+
* Remove the deprecated `have`, `have_at_least` and `have_at_most` matchers.
|
268
|
+
You can continue using those matchers through https://github.com/rspec/rspec-collection_matchers,
|
269
|
+
or you can rewrite your expectations with something like
|
270
|
+
`expect(your_object.size).to eq(num)`. (Hugo Baraúna)
|
271
|
+
* Rename `be_true` and `be_false` to `be_truthy` and `be_falsey`. (Sam Phippen)
|
272
|
+
* Make `expect { }.to_not raise_error(SomeSpecificClass, message)`,
|
273
|
+
`expect { }.to_not raise_error(SomeSpecificClass)` and
|
274
|
+
`expect { }.to_not raise_error(message)` invalid, since they are prone
|
275
|
+
to hiding failures. Instead, use `expect { }.to_not raise_error` (with no
|
276
|
+
args). (Sam Phippen)
|
277
|
+
* Within `RSpec::Matchers.define` blocks, helper methods made available
|
278
|
+
either via `def self.helper` or `extend HelperModule` are no longer
|
279
|
+
available to the `match` block (or any of the others). Instead
|
280
|
+
`include` your helper module and define the helper method as an
|
281
|
+
instance method. (Myron Marston)
|
282
|
+
* Force upgrading Diff::LCS for encoding compatability with diffs. (Jon Rowe)
|
283
|
+
|
284
|
+
Enhancements:
|
285
|
+
|
286
|
+
* Support `do..end` style block with `raise_error` matcher. (Yuji Nakayama)
|
287
|
+
* Rewrote custom matcher DSL to simplify its implementation and solve a
|
288
|
+
few issues. (Myron Marston)
|
289
|
+
* Allow early `return` from within custom matcher DSL blocks. (Myron
|
290
|
+
Marston)
|
291
|
+
* The custom matcher DSL's `chain` can now accept a block. (Myron
|
292
|
+
Marston)
|
293
|
+
* Support setting an expectation on a `raise_error` matcher via a chained
|
294
|
+
`with_message` method call. (Sam Phippen)
|
295
|
+
|
296
|
+
Bug Fixes:
|
297
|
+
|
298
|
+
* Allow `include` and `match` matchers to be used from within a
|
299
|
+
DSL-defined custom matcher's `match` block. (Myron Marston)
|
300
|
+
* Correct encoding error message on diff failure (Jon Rowe)
|
301
|
+
|
302
|
+
Deprecations:
|
303
|
+
|
304
|
+
* Using the old `:should` syntax without explicitly configuring it is deprecated.
|
305
|
+
It will continue to work but will emit a deprecation warning in RSpec 3 if
|
306
|
+
you do not explicitly enable it. (Sam Phippen)
|
307
|
+
|
308
|
+
### 2.99.2 / 2014-07-21
|
309
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.99.1...v2.99.2)
|
310
|
+
|
311
|
+
Bug Fixes:
|
312
|
+
|
313
|
+
* Fix regression in `Expectations#method_handle_for` where proxy objects
|
314
|
+
with method delegated would wrongly not return a method handle.
|
315
|
+
(Jon Rowe, #594)
|
316
|
+
* Fix issue with detection of generic operator matchers so they work
|
317
|
+
correctly when undefined. (Myron Marston, #597)
|
318
|
+
|
319
|
+
### 2.99.1 / 2014-06-19
|
320
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.99.0...v2.99.1)
|
321
|
+
|
322
|
+
Bug Fixes:
|
323
|
+
|
324
|
+
* Fix typo in custom matcher `expected` deprecation warning -- it's
|
325
|
+
`expected_as_array`, not `expected_array`. (Frederick Cheung, #562)
|
326
|
+
|
327
|
+
### 2.99.0 / 2014-06-01
|
328
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.99.0.rc1...v2.99.0)
|
329
|
+
|
330
|
+
Enhancements:
|
331
|
+
|
332
|
+
* Special case deprecation message for `errors_on` with `rspec-rails` to be more useful.
|
333
|
+
(Aaron Kromer)
|
334
|
+
|
335
|
+
### 2.99.0.rc1 / 2014-05-18
|
336
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.99.0.beta2...2.99.0.rc1)
|
337
|
+
|
338
|
+
Deprecations:
|
339
|
+
|
340
|
+
* Deprecate `matcher_execution_context` attribute on DSL-defined
|
341
|
+
custom matchers. (Myron Marston)
|
342
|
+
* Deprecate `RSpec::Matchers::Pretty#_pretty_print`. (Myron Marston)
|
343
|
+
* Deprecate `RSpec::Matchers::Pretty#expected_to_sentence`. (Myron Marston)
|
344
|
+
* Deprecate `RSpec::Matchers::Configuration` in favor of
|
345
|
+
`RSpec::Expectations::Configuration`. (Myron Marston)
|
346
|
+
* Deprecate `be_xyz` predicate matcher on an object that doesn't respond to
|
347
|
+
`xyz?` or `xyzs?`. (Daniel Fone)
|
348
|
+
* Deprecate `have_xyz` matcher on an object that doesn't respond to `has_xyz?`.
|
349
|
+
(Daniel Fone)
|
350
|
+
* Deprecate `have_xyz` matcher on an object that has a private method `has_xyz?`.
|
351
|
+
(Jon Rowe)
|
352
|
+
* Issue a deprecation warning when a block expectation expression is
|
353
|
+
used with a matcher that doesn't explicitly support block expectations
|
354
|
+
via `supports_block_expectations?`. (Myron Marston)
|
355
|
+
* Deprecate `require 'rspec-expectations'`. Use
|
356
|
+
`require 'rspec/expectations'` instead. (Myron Marston)
|
357
|
+
|
358
|
+
### 2.99.0.beta2 / 2014-02-17
|
359
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.99.0.beta1...v2.99.0.beta2)
|
360
|
+
|
361
|
+
Deprecations:
|
362
|
+
|
363
|
+
* Deprecate chaining `by`, `by_at_least`, `by_at_most` or `to` off of
|
364
|
+
`expect { }.not_to change { }`. The docs have always said these are
|
365
|
+
not supported for the negative form but now they explicitly raise
|
366
|
+
errors in RSpec 3. (Myron Marston)
|
367
|
+
* Change the semantics of `expect { }.not_to change { x }.from(y)`.
|
368
|
+
In RSpec 2.x, this expectation would only fail if `x` started with
|
369
|
+
the value of `y` and changed. If it started with a different value
|
370
|
+
and changed, it would pass. In RSpec 3, it will pass only if the
|
371
|
+
value starts at `y` and it does not change. (Myron Marston)
|
372
|
+
* Deprecate `matcher == value` as an alias for `matcher.matches?(value)`,
|
373
|
+
in favor of `matcher === value`. (Myron Marston)
|
374
|
+
* Deprecate `RSpec::Matchers::OperatorMatcher` in favor of
|
375
|
+
`RSpec::Matchers::BuiltIn::OperatorMatcher`. (Myron Marston)
|
376
|
+
* Deprecate auto-integration with Test::Unit and minitest.
|
377
|
+
Instead, include `RSpec::Matchers` in the appropriate test case
|
378
|
+
base class yourself. (Myron Marston)
|
379
|
+
* Deprecate treating `#expected` on a DSL-generated custom matcher
|
380
|
+
as an array when only 1 argument is passed to the matcher method.
|
381
|
+
In RSpec 3 it will be the single value in order to make diffs
|
382
|
+
work properly. (Jon Rowe)
|
383
|
+
|
384
|
+
### 2.99.0.beta1 / 2013-11-07
|
385
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.14.4...v2.99.0.beta1)
|
386
|
+
|
387
|
+
Deprecations
|
388
|
+
|
389
|
+
* Deprecate `have`, `have_at_least` and `have_at_most`. You can continue using those
|
390
|
+
matchers through https://github.com/rspec/rspec-collection_matchers, or
|
391
|
+
you can rewrite your expectations with something like
|
392
|
+
`expect(your_object.size).to eq(num)`. (Hugo Baraúna)
|
393
|
+
* Deprecate `be_xyz` predicate matcher when `xyz?` is a private method.
|
394
|
+
(Jon Rowe)
|
395
|
+
* Deprecate `be_true`/`be_false` in favour of `be_truthy`/`be_falsey`
|
396
|
+
(for Ruby's conditional semantics) or `be true`/`be false`
|
397
|
+
(for exact equality). (Sam Phippen)
|
398
|
+
* Deprecate calling helper methods from a custom matcher with the wrong
|
399
|
+
scope. (Myron Marston)
|
400
|
+
* `def self.foo` / `extend Helper` can be used to add macro methods
|
401
|
+
(e.g. methods that call the custom matcher DSL methods), but should
|
402
|
+
not be used to define helper methods called from within the DSL
|
403
|
+
blocks.
|
404
|
+
* `def foo` / `include Helper` is the opposite: it's for helper methods
|
405
|
+
callable from within a DSL block, but not for defining macros.
|
406
|
+
* RSpec 2.x allowed helper methods defined either way to be used for
|
407
|
+
either purpose, but RSpec 3.0 will not.
|
408
|
+
|
409
|
+
### 2.14.5 / 2014-02-01
|
410
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.14.4...v2.14.5)
|
411
|
+
|
412
|
+
Bug fixes
|
413
|
+
|
414
|
+
* Fix wrong matcher descriptions with falsey expected value
|
415
|
+
(yujinakayama)
|
416
|
+
|
417
|
+
### 2.14.4 / 2013-11-06
|
418
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.14.3...v2.14.4)
|
419
|
+
|
420
|
+
Bug fixes
|
421
|
+
|
422
|
+
* Make the `match` matcher produce a diff output. (Jon Rowe, Ben Moss)
|
423
|
+
* Choose encoding for diff's more intelligently, and when all else fails fall
|
424
|
+
back to default internal encoding with replacing characters. (Jon Rowe)
|
425
|
+
|
426
|
+
### 2.14.3 / 2013-09-22
|
427
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.14.2...v2.14.3)
|
428
|
+
|
429
|
+
Bug fixes
|
430
|
+
|
431
|
+
* Fix operator matchers (`should` syntax) when `method` is redefined on target.
|
432
|
+
(Brandon Turner)
|
433
|
+
* Fix diffing of hashes with object based keys. (Jon Rowe)
|
434
|
+
* Fix operator matchers (`should` syntax) when operator is defined via
|
435
|
+
`method_missing` (Jon Rowe)
|
436
|
+
|
437
|
+
### 2.14.2 / 2013-08-14
|
438
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.14.1...v2.14.2)
|
439
|
+
|
440
|
+
Bug fixes
|
441
|
+
|
442
|
+
* Fix `be_<predicate>` matcher to not support operator chaining like the
|
443
|
+
`be` matcher does (e.g. `be == 5`). This led to some odd behaviors
|
444
|
+
since `be_<predicate> == anything` returned a `BeComparedTo` matcher
|
445
|
+
and was thus always truthy. This was a consequence of the implementation
|
446
|
+
(e.g. subclassing the basic `Be` matcher) and was not intended behavior.
|
447
|
+
(Myron Marston).
|
448
|
+
* Fix `change` matcher to compare using `==` in addition to `===`. This
|
449
|
+
is important for an expression like:
|
450
|
+
`expect {}.to change { a.class }.from(ClassA).to(ClassB)` because
|
451
|
+
`SomeClass === SomeClass` returns false. (Myron Marston)
|
452
|
+
|
453
|
+
### 2.14.1 / 2013-08-08
|
454
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.14.0...2.14.1)
|
455
|
+
|
456
|
+
Bug fixes
|
457
|
+
|
458
|
+
* Ensure diff output uses the same encoding as the encoding of
|
459
|
+
the string being diff'd to prevent `Encoding::UndefinedConversionError`
|
460
|
+
errors (Jon Rowe).
|
461
|
+
|
462
|
+
### 2.14.0 / 2013-07-06
|
463
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.14.0.rc1...v2.14.0)
|
464
|
+
|
465
|
+
Bug fixes
|
466
|
+
|
467
|
+
* Values that are not matchers use `#inspect`, rather than `#description` for
|
468
|
+
documentation output (Andy Lindeman, Sam Phippen).
|
469
|
+
* Make `expect(a).to be_within(x).percent_of(y)` work with negative y
|
470
|
+
(Katsuhiko Nishimra).
|
471
|
+
* Make the `be_predicate` matcher work as expected used with `expect{...}.to
|
472
|
+
change...` (Sam Phippen).
|
473
|
+
|
474
|
+
### 2.14.0.rc1 / 2013-05-27
|
475
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.13.0...v2.14.0.rc1)
|
476
|
+
|
477
|
+
Enhancements
|
478
|
+
|
479
|
+
* Enhance `yield_control` so that you can specify an exact or relative
|
480
|
+
number of times: `expect { }.to yield_control.exactly(3).times`,
|
481
|
+
`expect { }.to yield_control.at_least(2).times`, etc (Bartek
|
482
|
+
Borkowski).
|
483
|
+
* Make the differ that is used when an expectation fails better handle arrays
|
484
|
+
by splitting each element of the array onto its own line. (Sam Phippen)
|
485
|
+
* Accept duck-typed strings that respond to `:to_str` as expectation messages.
|
486
|
+
(Toby Ovod-Everett)
|
487
|
+
|
488
|
+
Bug fixes
|
489
|
+
|
490
|
+
* Fix differ to not raise errors when dealing with differently-encoded
|
491
|
+
strings (Jon Rowe).
|
492
|
+
* Fix `expect(something).to be_within(x).percent_of(y)` where x and y are both
|
493
|
+
integers (Sam Phippen).
|
494
|
+
* Fix `have` matcher to handle the fact that on ruby 2.0,
|
495
|
+
`Enumerator#size` may return nil (Kenta Murata).
|
496
|
+
* Fix `expect { raise s }.to raise_error(s)` where s is an error instance
|
497
|
+
on ruby 2.0 (Sam Phippen).
|
498
|
+
* Fix `expect(object).to raise_error` passing. This now warns the user and
|
499
|
+
fails the spec (tomykaira).
|
500
|
+
|
501
|
+
Deprecations
|
502
|
+
|
503
|
+
* Deprecate `expect { }.not_to raise_error(SpecificErrorClass)` or
|
504
|
+
`expect { }.not_to raise_error("some specific message")`. Using
|
505
|
+
these was prone to hiding failures as they would allow _any other
|
506
|
+
error_ to pass. (Sam Phippen and David Chelimsky)
|
507
|
+
|
508
|
+
### 2.13.0 / 2013-02-23
|
509
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.12.1...v2.13.0)
|
510
|
+
|
511
|
+
Enhancements
|
512
|
+
|
513
|
+
* Add support for percent deltas to `be_within` matcher:
|
514
|
+
`expect(value).to be_within(10).percent_of(expected)`
|
515
|
+
(Myron Marston).
|
516
|
+
* Add support to `include` matcher to allow it to be given a list
|
517
|
+
of matchers as the expecteds to match against (Luke Redpath).
|
518
|
+
|
519
|
+
Bug fixes
|
520
|
+
|
521
|
+
* Fix `change` matcher so that it dups strings in order to handle
|
522
|
+
mutated strings (Myron Marston).
|
523
|
+
* Fix `should be =~ /some regex/` / `expect(...).to be =~ /some regex/`.
|
524
|
+
Previously, these either failed with a confusing `undefined method
|
525
|
+
matches?' for false:FalseClass` error or were no-ops that didn't
|
526
|
+
actually verify anything (Myron Marston).
|
527
|
+
* Add compatibility for diff-lcs 1.2 and relax the version
|
528
|
+
constraint (Peter Goldstein).
|
529
|
+
* Fix DSL-generated matchers to allow multiple instances of the
|
530
|
+
same matcher in the same example to have different description
|
531
|
+
and failure messages based on the expected value (Myron Marston).
|
532
|
+
* Prevent `undefined method #split for Array` error when dumping
|
533
|
+
the diff of an array of multiline strings (Myron Marston).
|
534
|
+
* Don't blow up when comparing strings that are in an encoding
|
535
|
+
that is not ASCII compatible (Myron Marston).
|
536
|
+
* Remove confusing "Check the implementation of #==" message
|
537
|
+
printed for empty diffs (Myron Marston).
|
538
|
+
|
539
|
+
### 2.12.1 / 2012-12-15
|
540
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.12.0...v2.12.1)
|
541
|
+
|
542
|
+
Bug fixes
|
543
|
+
|
544
|
+
* Improve the failure message for an expression like
|
545
|
+
`{}.should =~ {}`. (Myron Marston and Andy Lindeman)
|
546
|
+
* Provide a `match_regex` alias so that custom matchers
|
547
|
+
built using the matcher DSL can use it (since `match`
|
548
|
+
is a different method in that context).
|
549
|
+
(Steven Harman)
|
550
|
+
|
551
|
+
### 2.12.0 / 2012-11-12
|
552
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.11.3...v2.12.0)
|
553
|
+
|
554
|
+
Enhancements
|
555
|
+
|
556
|
+
* Colorize diffs if the `--color` option is configured. (Alex Coplan)
|
557
|
+
* Include backtraces in unexpected errors handled by `raise_error`
|
558
|
+
matcher (Myron Marston)
|
559
|
+
* Print a warning when users accidentally pass a non-string argument
|
560
|
+
as an expectation message (Sam Phippen)
|
561
|
+
* `=~` and `match_array` matchers output a more useful error message when
|
562
|
+
the actual value is not an array (or an object that responds to `#to_ary`)
|
563
|
+
(Sam Phippen)
|
564
|
+
|
565
|
+
Bug fixes
|
566
|
+
|
567
|
+
* Fix `include` matcher so that `expect({}).to include(:a => nil)`
|
568
|
+
fails as it should (Sam Phippen).
|
569
|
+
* Fix `be_an_instance_of` matcher so that `Class#to_s` is used in the
|
570
|
+
description rather than `Class#inspect`, since some classes (like
|
571
|
+
`ActiveRecord::Base`) define a long, verbose `#inspect`.
|
572
|
+
(Tom Stuart)
|
573
|
+
|
574
|
+
### 2.11.3 / 2012-09-04
|
575
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.11.2...v2.11.3)
|
576
|
+
|
577
|
+
Bug fixes
|
578
|
+
|
579
|
+
* Fix (and deprecate) `expect { }.should` syntax so that it works even
|
580
|
+
though it was never a documented or intended syntax. It worked as a
|
581
|
+
consequence of the implementation of `expect` in RSpec 2.10 and
|
582
|
+
earlier. (Myron Marston)
|
583
|
+
* Ensure #== is defined on built in matchers so that they can be composed.
|
584
|
+
For example:
|
585
|
+
|
586
|
+
expect {
|
587
|
+
user.emailed!
|
588
|
+
}.to change { user.last_emailed_at }.to be_within(1.second).of(Time.zone.now)
|
589
|
+
|
590
|
+
### 2.11.2 / 2012-07-25
|
591
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.11.1...v2.11.2)
|
592
|
+
|
593
|
+
Bug fixes
|
594
|
+
|
595
|
+
* Define `should` and `should_not` on `Object` rather than `BasicObject`
|
596
|
+
on MacRuby. On MacRuby, `BasicObject` is defined but is not the root
|
597
|
+
of the object hierarchy. (Gabriel Gilder)
|
598
|
+
|
599
|
+
### 2.11.1 / 2012-07-08
|
600
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.11.0...v2.11.1)
|
601
|
+
|
602
|
+
Bug fixes
|
603
|
+
|
604
|
+
* Constrain `actual` in `be_within` matcher to values that respond to `-` instead
|
605
|
+
of requiring a specific type.
|
606
|
+
* `Time`, for example, is a legit alternative.
|
607
|
+
|
608
|
+
### 2.11.0 / 2012-07-07
|
609
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.10.0...v2.11.0)
|
610
|
+
|
611
|
+
Enhancements
|
612
|
+
|
613
|
+
* Expand `expect` syntax so that it supports expections on bare values
|
614
|
+
in addition to blocks (Myron Marston).
|
615
|
+
* Add configuration options to control available expectation syntaxes
|
616
|
+
(Myron Marston):
|
617
|
+
* `RSpec.configuration.expect_with(:rspec) { |c| c.syntax = :expect }`
|
618
|
+
* `RSpec.configuration.expect_with(:rspec) { |c| c.syntax = :should }`
|
619
|
+
* `RSpec.configuration.expect_with(:rspec) { |c| c.syntax = [:should, :expect] }`
|
620
|
+
* `RSpec.configuration.add_should_and_should_not_to Delegator`
|
621
|
+
|
622
|
+
Bug fixes
|
623
|
+
|
624
|
+
* Allow only `Numeric` values to be the "actual" in the `be_within` matcher.
|
625
|
+
This prevents confusing error messages. (Su Zhang @zhangsu)
|
626
|
+
* Define `should` and `should_not` on `BasicObject` rather than `Kernel`
|
627
|
+
on 1.9. This makes `should` and `should_not` work properly with
|
628
|
+
`BasicObject`-subclassed proxy objects like `Delegator`. (Myron
|
629
|
+
Marston)
|
630
|
+
|
631
|
+
### 2.10.0 / 2012-05-03
|
632
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.9.1...v2.10.0)
|
633
|
+
|
634
|
+
Enhancements
|
635
|
+
|
636
|
+
* Add new `start_with` and `end_with` matchers (Jeremy Wadsack)
|
637
|
+
* Add new matchers for specifying yields (Myron Marston):
|
638
|
+
* `expect {...}.to yield_control`
|
639
|
+
* `expect {...}.to yield_with_args(1, 2, 3)`
|
640
|
+
* `expect {...}.to yield_with_no_args`
|
641
|
+
* `expect {...}.to yield_successive_args(1, 2, 3)`
|
642
|
+
* `match_unless_raises` takes multiple exception args
|
643
|
+
|
644
|
+
Bug fixes
|
645
|
+
|
646
|
+
* Fix `be_within` matcher to be inclusive of delta.
|
647
|
+
* Fix message-specific specs to pass on Rubinius (John Firebaugh)
|
648
|
+
|
649
|
+
### 2.9.1 / 2012-04-03
|
650
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.9.0...v2.9.1)
|
651
|
+
|
652
|
+
Bug fixes
|
653
|
+
|
654
|
+
* Provide a helpful message if the diff between two objects is empty.
|
655
|
+
* Fix bug diffing single strings with multiline strings.
|
656
|
+
* Fix for error with using custom matchers inside other custom matchers
|
657
|
+
(mirasrael)
|
658
|
+
* Fix using execution context methods in nested DSL matchers (mirasrael)
|
659
|
+
|
660
|
+
### 2.9.0 / 2012-03-17
|
661
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.8.0...v2.9.0)
|
662
|
+
|
663
|
+
Enhancements
|
664
|
+
|
665
|
+
* Move built-in matcher classes to RSpec::Matchers::BuiltIn to reduce pollution
|
666
|
+
of RSpec::Matchers (which is included in every example).
|
667
|
+
* Autoload files with matcher classes to improve load time.
|
668
|
+
|
669
|
+
Bug fixes
|
670
|
+
|
671
|
+
* Align `respond_to?` and `method_missing` in DSL-defined matchers.
|
672
|
+
* Clear out user-defined instance variables between invocations of DSL-defined
|
673
|
+
matchers.
|
674
|
+
* Dup the instance of a DSL generated matcher so its state is not changed by
|
675
|
+
subsequent invocations.
|
676
|
+
* Treat expected args consistently across positive and negative expectations
|
677
|
+
(thanks to Ralf Kistner for the heads up)
|
678
|
+
|
679
|
+
### 2.8.0 / 2012-01-04
|
680
|
+
|
681
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.8.0.rc2...v2.8.0)
|
682
|
+
|
683
|
+
Enhancements
|
684
|
+
|
685
|
+
* Better diff output for Hash (Philippe Creux)
|
686
|
+
* Eliminate Ruby warnings (Olek Janiszewski)
|
687
|
+
|
688
|
+
### 2.8.0.rc2 / 2011-12-19
|
689
|
+
|
690
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.8.0.rc1...v2.8.0.rc2)
|
691
|
+
|
692
|
+
No changes for this release. Just releasing with the other rspec gems.
|
693
|
+
|
694
|
+
### 2.8.0.rc1 / 2011-11-06
|
695
|
+
|
696
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.7.0...v2.8.0.rc1)
|
697
|
+
|
698
|
+
Enhancements
|
699
|
+
|
700
|
+
* Use classes for the built-in matchers (they're faster).
|
701
|
+
* Eliminate Ruby warnings (Matijs van Zuijlen)
|
702
|
+
|
703
|
+
### 2.7.0 / 2011-10-16
|
704
|
+
|
705
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.6.0...v2.7.0)
|
706
|
+
|
707
|
+
Enhancements
|
708
|
+
|
709
|
+
* `HaveMatcher` converts argument using `to_i` (Alex Bepple & Pat Maddox)
|
710
|
+
* Improved failure message for the `have_xxx` matcher (Myron Marston)
|
711
|
+
* `HaveMatcher` supports `count` (Matthew Bellantoni)
|
712
|
+
* Change matcher dups `Enumerable` before the action, supporting custom
|
713
|
+
`Enumerable` types like `CollectionProxy` in Rails (David Chelimsky)
|
714
|
+
|
715
|
+
Bug fixes
|
716
|
+
|
717
|
+
* Fix typo in `have(n).xyz` documentation (Jean Boussier)
|
718
|
+
* fix `safe_sort` for ruby 1.9.2 (`Kernel` now defines `<=>` for Object) (Peter
|
719
|
+
van Hardenberg)
|
720
|
+
|
721
|
+
### 2.6.0 / 2011-05-12
|
722
|
+
|
723
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.5.0...v2.6.0)
|
724
|
+
|
725
|
+
Enhancements
|
726
|
+
|
727
|
+
* `change` matcher accepts regexps (Robert Davis)
|
728
|
+
* better descriptions for `have_xxx` matchers (Magnus Bergmark)
|
729
|
+
* `range.should cover(*values)` (Anders Furseth)
|
730
|
+
|
731
|
+
Bug fixes
|
732
|
+
|
733
|
+
* Removed non-ascii characters that were choking rcov (Geoffrey Byers)
|
734
|
+
* change matcher dups arrays and hashes so their before/after states can be
|
735
|
+
compared correctly.
|
736
|
+
* Fix the order of inclusion of RSpec::Matchers in Test::Unit::TestCase and
|
737
|
+
MiniTest::Unit::TestCase to prevent a SystemStackError (Myron Marston)
|
738
|
+
|
739
|
+
### 2.5.0 / 2011-02-05
|
740
|
+
|
741
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.4.0...v2.5.0)
|
742
|
+
|
743
|
+
Enhancements
|
744
|
+
|
745
|
+
* `should exist` works with `exist?` or `exists?` (Myron Marston)
|
746
|
+
* `expect { ... }.not_to do_something` (in addition to `to_not`)
|
747
|
+
|
748
|
+
Documentation
|
749
|
+
|
750
|
+
* improved docs for raise_error matcher (James Almond)
|
751
|
+
|
752
|
+
### 2.4.0 / 2011-01-02
|
753
|
+
|
754
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.3.0...v2.4.0)
|
755
|
+
|
756
|
+
No functional changes in this release, which was made to align with the
|
757
|
+
rspec-core-2.4.0 release.
|
758
|
+
|
759
|
+
Enhancements
|
760
|
+
|
761
|
+
* improved RDoc for change matcher (Jo Liss)
|
762
|
+
|
763
|
+
### 2.3.0 / 2010-12-12
|
764
|
+
|
765
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.2.1...v2.3.0)
|
766
|
+
|
767
|
+
Enhancements
|
768
|
+
|
769
|
+
* diff strings when include matcher fails (Mike Sassak)
|
770
|
+
|
771
|
+
### 2.2.0 / 2010-11-28
|
772
|
+
|
773
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.1.0...v2.2.0)
|
774
|
+
|
775
|
+
### 2.1.0 / 2010-11-07
|
776
|
+
|
777
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.0.1...v2.1.0)
|
778
|
+
|
779
|
+
Enhancements
|
780
|
+
|
781
|
+
* `be_within(delta).of(expected)` matcher (Myron Marston)
|
782
|
+
* Lots of new Cucumber features (Myron Marston)
|
783
|
+
* Raise error if you try `should != expected` on Ruby-1.9 (Myron Marston)
|
784
|
+
* Improved failure messages from `throw_symbol` (Myron Marston)
|
785
|
+
|
786
|
+
Bug fixes
|
787
|
+
|
788
|
+
* Eliminate hard dependency on `RSpec::Core` (Myron Marston)
|
789
|
+
* `have_matcher` - use pluralize only when ActiveSupport inflections are indeed
|
790
|
+
defined (Josep M Bach)
|
791
|
+
* throw_symbol matcher no longer swallows exceptions (Myron Marston)
|
792
|
+
* fix matcher chaining to avoid name collisions (Myron Marston)
|
793
|
+
|
794
|
+
### 2.0.0 / 2010-10-10
|
795
|
+
|
796
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.0.0.rc...v2.0.0)
|
797
|
+
|
798
|
+
Enhancements
|
799
|
+
|
800
|
+
* Add match_for_should_not method to matcher DSL (Myron Marston)
|
801
|
+
|
802
|
+
Bug fixes
|
803
|
+
|
804
|
+
* `respond_to` matcher works correctly with `should_not` with multiple methods
|
805
|
+
(Myron Marston)
|
806
|
+
* `include` matcher works correctly with `should_not` with multiple values
|
807
|
+
(Myron Marston)
|
808
|
+
|
809
|
+
### 2.0.0.rc / 2010-10-05
|
810
|
+
|
811
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.0.0.beta.22...v2.0.0.rc)
|
812
|
+
|
813
|
+
Enhancements
|
814
|
+
|
815
|
+
* `require 'rspec/expectations'` in a T::U or MiniUnit suite (Josep M. Bach)
|
816
|
+
|
817
|
+
Bug fixes
|
818
|
+
|
819
|
+
* change by 0 passes/fails correctly (Len Smith)
|
820
|
+
* Add description to satisfy matcher
|
821
|
+
|
822
|
+
### 2.0.0.beta.22 / 2010-09-12
|
823
|
+
|
824
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.0.0.beta.20...v2.0.0.beta.22)
|
825
|
+
|
826
|
+
Enhancements
|
827
|
+
|
828
|
+
* diffing improvements
|
829
|
+
* diff multiline strings
|
830
|
+
* don't diff single line strings
|
831
|
+
* don't diff numbers (silly)
|
832
|
+
* diff regexp + multiline string
|
833
|
+
|
834
|
+
Bug fixes
|
835
|
+
* `should[_not]` change now handles boolean values correctly
|