Hello community, here is the log from the commit of package rubygem-rspec-expectations for openSUSE:Factory checked in at 2018-11-01 19:10:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-rspec-expectations (Old) and /work/SRC/openSUSE:Factory/.rubygem-rspec-expectations.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "rubygem-rspec-expectations" Thu Nov 1 19:10:33 2018 rev:15 rq:645800 version:3.8.2 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-rspec-expectations/rubygem-rspec-expectations.changes 2017-11-01 11:08:08.461054867 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-rspec-expectations.new/rubygem-rspec-expectations.changes 2018-11-01 19:10:36.422036334 +0100 @@ -1,0 +2,52 @@ +Mon Oct 29 06:51:38 UTC 2018 - mschnitzer@suse.com + +- updated to version 3.8.2 + + [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.8.1...v3.8.2) + + Bug Fixes: + + * Change `include` matcher to rely on a `respond_to?(:include?)` check rather than a direct + Hash comparison before calling `to_hash` to convert to a hash. (Jordan Owens, #1073) + * Prevent unexpected call stack jumps from causing an obscure error (`IndexError`), and + replace that error with a proper informative message. (Jon Rowe, #1076) + +------------------------------------------------------------------- +Fri Aug 10 10:59:44 UTC 2018 - mschnitzer@suse.com + +- updated to version 3.8.1 + + [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.8.0...v3.8.1) + + Bug Fixes: + + * Fix regression in `include` matcher so stopped + `expect(hash.with_indifferent_access).to include(:symbol_key)` + from working. (Eito Katagiri, #1069) + +------------------------------------------------------------------- +Sun Aug 5 19:00:01 UTC 2018 - mschnitzer@suse.com + +- updated to version 3.8.0 + + [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.7.0...v3.8.0) + + Enhancements: + + * Improve failure message of `change(receiver, :message)` by including the + receiver as `SomeClass#some_message`. (Tomohiro Hashidate, #1005) + * Improve `change` matcher so that it can correctly detect changes in + deeply nested mutable objects (such as arrays-of-hashes-of-arrays). + The improved logic uses the before/after `hash` value to see if the + object has been mutated, rather than shallow duping the object. + (Myron Marston, #1034) + * Improve `include` matcher so that pseudo-hash objects (e.g. objects + that decorate a hash using a `SimpleDelegator` or similar) are treated + as a hash, as long as they implement `to_hash`. (Pablo Brasero, #1012) + * Add `max_formatted_output_length=` to configuration, allowing changing + the length at which we truncate large output strings. + (Sam Phippen #951, Benoit Tigeot #1056) + * Improve error message when passing a matcher that doesn't support block + expectations to a block based `expect`. (@nicktime, #1066) + +------------------------------------------------------------------- Old: ---- rspec-expectations-3.7.0.gem New: ---- rspec-expectations-3.8.2.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-rspec-expectations.spec ++++++ --- /var/tmp/diff_new_pack.TeBVjQ/_old 2018-11-01 19:10:37.070036365 +0100 +++ /var/tmp/diff_new_pack.TeBVjQ/_new 2018-11-01 19:10:37.070036365 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-rspec-expectations # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ # Name: rubygem-rspec-expectations -Version: 3.7.0 +Version: 3.8.2 Release: 0 %define mod_name rspec-expectations %define mod_full_name %{mod_name}-%{version} ++++++ rspec-expectations-3.7.0.gem -> rspec-expectations-3.8.2.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Changelog.md new/Changelog.md --- old/Changelog.md 2017-10-17 17:13:31.000000000 +0200 +++ new/Changelog.md 2018-10-09 22:43:31.000000000 +0200 @@ -1,5 +1,42 @@ -### 3.8 Development -[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.7.0...master) +### 3.8.2 / 2018-10-09 +[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.8.1...v3.8.2) + +Bug Fixes: + +* Change `include` matcher to rely on a `respond_to?(:include?)` check rather than a direct + Hash comparison before calling `to_hash` to convert to a hash. (Jordan Owens, #1073) +* Prevent unexpected call stack jumps from causing an obscure error (`IndexError`), and + replace that error with a proper informative message. (Jon Rowe, #1076) + +### 3.8.1 / 2018-08-06 +[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.8.0...v3.8.1) + +Bug Fixes: + +* Fix regression in `include` matcher so stopped + `expect(hash.with_indifferent_access).to include(:symbol_key)` + from working. (Eito Katagiri, #1069) + +### 3.8.0 / 2018-08-04 +[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.7.0...v3.8.0) + +Enhancements: + +* Improve failure message of `change(receiver, :message)` by including the + receiver as `SomeClass#some_message`. (Tomohiro Hashidate, #1005) +* Improve `change` matcher so that it can correctly detect changes in + deeply nested mutable objects (such as arrays-of-hashes-of-arrays). + The improved logic uses the before/after `hash` value to see if the + object has been mutated, rather than shallow duping the object. + (Myron Marston, #1034) +* Improve `include` matcher so that pseudo-hash objects (e.g. objects + that decorate a hash using a `SimpleDelegator` or similar) are treated + as a hash, as long as they implement `to_hash`. (Pablo Brasero, #1012) +* Add `max_formatted_output_length=` to configuration, allowing changing + the length at which we truncate large output strings. + (Sam Phippen #951, Benoit Tigeot #1056) +* Improve error message when passing a matcher that doesn't support block + expectations to a block based `expect`. (@nicktime, #1066) ### 3.7.0 / 2017-10-17 [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.6.0...v3.7.0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2017-10-17 17:13:31.000000000 +0200 +++ new/README.md 2018-10-09 22:43:31.000000000 +0200 @@ -20,7 +20,7 @@ ```ruby %w[rspec-core rspec-expectations rspec-mocks rspec-support].each do |lib| - gem lib, :git => "git://github.com/rspec/#{lib}.git", :branch => 'master' + gem lib, :git => "https://github.com/rspec/#{lib}.git", :branch => 'master' end ``` Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ Binary files old/checksums.yaml.gz.sig and new/checksums.yaml.gz.sig differ Binary files old/data.tar.gz.sig and new/data.tar.gz.sig differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/expectations/block_snippet_extractor.rb new/lib/rspec/expectations/block_snippet_extractor.rb --- old/lib/rspec/expectations/block_snippet_extractor.rb 2017-10-17 17:13:31.000000000 +0200 +++ new/lib/rspec/expectations/block_snippet_extractor.rb 2018-10-09 22:43:31.000000000 +0200 @@ -1,7 +1,7 @@ module RSpec module Expectations # @private - class BlockSnippetExtractor # rubocop:disable Style/ClassLength + class BlockSnippetExtractor # rubocop:disable Metrics/ClassLength # rubocop should properly handle `Struct.new {}` as an inner class definition. attr_reader :proc, :method_name diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/expectations/configuration.rb new/lib/rspec/expectations/configuration.rb --- old/lib/rspec/expectations/configuration.rb 2017-10-17 17:13:31.000000000 +0200 +++ new/lib/rspec/expectations/configuration.rb 2018-10-09 22:43:31.000000000 +0200 @@ -56,6 +56,20 @@ end end + # Configures the maximum character length that RSpec will print while + # formatting an object. You can set length to nil to prevent RSpec from + # doing truncation. + # @param [Fixnum] length the number of characters to limit the formatted output to. + # @example + # RSpec.configure do |rspec| + # rspec.expect_with :rspec do |c| + # c.max_formatted_output_length = 200 + # end + # end + def max_formatted_output_length=(length) + RSpec::Support::ObjectFormatter.default_instance.max_formatted_output_length = length + end + # The list of configured syntaxes. # @return [Array<Symbol>] the list of configured syntaxes. # @example diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/expectations/expectation_target.rb new/lib/rspec/expectations/expectation_target.rb --- old/lib/rspec/expectations/expectation_target.rb 2017-10-17 17:13:31.000000000 +0200 +++ new/lib/rspec/expectations/expectation_target.rb 2018-10-09 22:43:31.000000000 +0200 @@ -112,7 +112,7 @@ def enforce_block_expectation(matcher) return if supports_block_expectations?(matcher) - raise ExpectationNotMetError, "You must pass an argument rather than a block to use the provided " \ + raise ExpectationNotMetError, "You must pass an argument rather than a block to `expect` to use the provided " \ "matcher (#{RSpec::Support::ObjectFormatter.format(matcher)}), or the matcher must implement " \ "`supports_block_expectations?`." end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/expectations/minitest_integration.rb new/lib/rspec/expectations/minitest_integration.rb --- old/lib/rspec/expectations/minitest_integration.rb 2017-10-17 17:13:31.000000000 +0200 +++ new/lib/rspec/expectations/minitest_integration.rb 2018-10-09 22:43:31.000000000 +0200 @@ -53,6 +53,6 @@ module Expectations remove_const :ExpectationNotMetError # Exception raised when an expectation fails. - ExpectationNotMetError = ::Minitest::Assertion + const_set :ExpectationNotMetError, ::Minitest::Assertion end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/expectations/syntax.rb new/lib/rspec/expectations/syntax.rb --- old/lib/rspec/expectations/syntax.rb 2017-10-17 17:13:31.000000000 +0200 +++ new/lib/rspec/expectations/syntax.rb 2018-10-09 22:43:31.000000000 +0200 @@ -106,7 +106,7 @@ # that this syntax does not always play nice with delegate/proxy objects. # We recommend you use the non-monkeypatching `:expect` syntax instead. class BasicObject - # @method should + # @method should(matcher, message) # Passes if `matcher` returns true. Available on every `Object`. # @example # actual.should eq expected @@ -118,7 +118,7 @@ # @note This is only available when you have enabled the `:should` syntax. # @see RSpec::Matchers - # @method should_not + # @method should_not(matcher, message) # Passes if `matcher` returns false. Available on every `Object`. # @example # actual.should_not eq expected diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/expectations/version.rb new/lib/rspec/expectations/version.rb --- old/lib/rspec/expectations/version.rb 2017-10-17 17:13:31.000000000 +0200 +++ new/lib/rspec/expectations/version.rb 2018-10-09 22:43:31.000000000 +0200 @@ -2,7 +2,7 @@ module Expectations # @private module Version - STRING = '3.7.0' + STRING = '3.8.2' end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/matchers/built_in/change.rb new/lib/rspec/matchers/built_in/change.rb --- old/lib/rspec/matchers/built_in/change.rb 2017-10-17 17:13:31.000000000 +0200 +++ new/lib/rspec/matchers/built_in/change.rb 2018-10-09 22:43:31.000000000 +0200 @@ -43,16 +43,13 @@ # @private def matches?(event_proc) - @event_proc = event_proc - return false unless Proc === event_proc raise_block_syntax_error if block_given? - change_details.perform_change(event_proc) - change_details.changed? + perform_change(event_proc) && change_details.changed? end def does_not_match?(event_proc) raise_block_syntax_error if block_given? - !matches?(event_proc) && Proc === event_proc + perform_change(event_proc) && !change_details.changed? end # @api private @@ -92,6 +89,18 @@ @change_details ||= ChangeDetails.new(matcher_name, @receiver, @message, &@block) end + def perform_change(event_proc) + @event_proc = event_proc + change_details.perform_change(event_proc) do |actual_before| + # pre-compute values derived from the `before` value before the + # mutation is applied, in case the specified mutation is mutation + # of a single object (rather than a changing what object a method + # returns). We need to cache these values before the `before` value + # they are based on potentially gets mutated. + @actual_before_description = description_of(actual_before) + end + end + def raise_block_syntax_error raise SyntaxError, "Block not received by the `change` matcher. " \ "Perhaps you want to use `{ ... }` instead of do/end?" @@ -99,12 +108,12 @@ def positive_failure_reason return "was not given a block" unless Proc === @event_proc - "is still #{description_of change_details.actual_before}" + "is still #{@actual_before_description}" end def negative_failure_reason return "was not given a block" unless Proc === @event_proc - "did change from #{description_of change_details.actual_before} " \ + "did change from #{@actual_before_description} " \ "to #{description_of change_details.actual_after}" end end @@ -129,9 +138,7 @@ # @private def matches?(event_proc) @event_proc = event_proc - return false unless Proc === event_proc - @change_details.perform_change(event_proc) - @comparer.call(@change_details.actual_delta) + @change_details.perform_change(event_proc) && @comparer.call(@change_details.actual_delta) end # @private @@ -173,10 +180,7 @@ # @private def matches?(event_proc) - @event_proc = event_proc - return false unless Proc === event_proc - @change_details.perform_change(event_proc) - @change_details.changed? && matches_before? && matches_after? + perform_change(event_proc) && @change_details.changed? && @matches_before && matches_after? end # @private @@ -187,7 +191,7 @@ # @private def failure_message return not_given_a_block_failure unless Proc === @event_proc - return before_value_failure unless matches_before? + return before_value_failure unless @matches_before return did_not_change_failure unless @change_details.changed? after_value_failure end @@ -199,8 +203,17 @@ private - def matches_before? - values_match?(@expected_before, @change_details.actual_before) + def perform_change(event_proc) + @event_proc = event_proc + @change_details.perform_change(event_proc) do |actual_before| + # pre-compute values derived from the `before` value before the + # mutation is applied, in case the specified mutation is mutation + # of a single object (rather than a changing what object a method + # returns). We need to cache these values before the `before` value + # they are based on potentially gets mutated. + @matches_before = values_match?(@expected_before, actual_before) + @actual_before_description = description_of(actual_before) + end end def matches_after? @@ -210,7 +223,7 @@ def before_value_failure "expected #{@change_details.value_representation} " \ "to have initially been #{description_of @expected_before}, " \ - "but was #{description_of @change_details.actual_before}" + "but was #{@actual_before_description}" end def after_value_failure @@ -226,7 +239,7 @@ def did_change_failure "expected #{@change_details.value_representation} not to have changed, but " \ - "did change from #{description_of @change_details.actual_before} " \ + "did change from #{@actual_before_description} " \ "to #{description_of @change_details.actual_after}" end @@ -260,16 +273,13 @@ "is not supported" end - @event_proc = event_proc - return false unless Proc === event_proc - @change_details.perform_change(event_proc) - !@change_details.changed? && matches_before? + perform_change(event_proc) && !@change_details.changed? && @matches_before end # @private def failure_message_when_negated return not_given_a_block_failure unless Proc === @event_proc - return before_value_failure unless matches_before? + return before_value_failure unless @matches_before did_change_failure end @@ -312,8 +322,20 @@ # @private # Encapsulates the details of the before/after values. + # + # Note that this class exposes the `actual_after` value, to allow the + # matchers above to derive failure messages, etc from the value on demand + # as needed, but it intentionally does _not_ expose the `actual_before` + # value. Some usages of the `change` matcher mutate a specific object + # returned by the value proc, which means that failure message snippets, + # etc, which are derived from the `before` value may not be accurate if + # they are lazily computed as needed. We must pre-compute them before + # applying the change in the `expect` block. To ensure that all `change` + # matchers do that properly, we do not expose the `actual_before` value. + # Instead, matchers must pass a block to `perform_change`, which yields + # the `actual_before` value before applying the change. class ChangeDetails - attr_reader :actual_before, :actual_after + attr_reader :actual_after def initialize(matcher_name, receiver=nil, message=nil, &block) if receiver && !message @@ -334,7 +356,7 @@ def value_representation @value_representation ||= if @message - "##{@message}" + "`#{message_notation(@receiver, @message)}`" elsif (value_block_snippet = extract_value_block_snippet) "`#{value_block_snippet}`" else @@ -344,12 +366,29 @@ def perform_change(event_proc) @actual_before = evaluate_value_proc + @before_hash = @actual_before.hash + yield @actual_before if block_given? + + return false unless Proc === event_proc event_proc.call + @actual_after = evaluate_value_proc + true end def changed? - @actual_before != @actual_after + # Consider it changed if either: + # + # - The before/after values are unequal + # - The before/after values have different hash values + # + # The latter case specifically handles the case when the value proc + # returns the exact same object, but it has been mutated. + # + # Note that it is not sufficient to only check the hashes; it is + # possible for two values to be unequal (and of different classes) + # but to return the same hash value. + @actual_before != @actual_after || @before_hash != @actual_after.hash end def actual_delta @@ -359,15 +398,15 @@ private def evaluate_value_proc - value_proc = @value_proc || lambda { @receiver.__send__(@message) } + @value_proc ? @value_proc.call : @receiver.__send__(@message) + end - case val = value_proc.call - when IO # enumerable, but we don't want to dup it. - val - when Enumerable, String - val.dup + def message_notation(receiver, message) + case receiver + when Module + "#{receiver}.#{message}" else - val + "#{Support.class_of(receiver)}##{message}" end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/matchers/built_in/compound.rb new/lib/rspec/matchers/built_in/compound.rb --- old/lib/rspec/matchers/built_in/compound.rb 2017-10-17 17:13:31.000000000 +0200 +++ new/lib/rspec/matchers/built_in/compound.rb 2018-10-09 22:43:31.000000000 +0200 @@ -3,7 +3,6 @@ module BuiltIn # @api private # Base class for `and` and `or` compound matchers. - # rubocop:disable ClassLength class Compound < BaseMatcher # @private attr_reader :matcher_1, :matcher_2, :evaluator diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/matchers/built_in/contain_exactly.rb new/lib/rspec/matchers/built_in/contain_exactly.rb --- old/lib/rspec/matchers/built_in/contain_exactly.rb 2017-10-17 17:13:31.000000000 +0200 +++ new/lib/rspec/matchers/built_in/contain_exactly.rb 2018-10-09 22:43:31.000000000 +0200 @@ -89,7 +89,7 @@ elsif actual.respond_to?(:to_a) && !to_a_disallowed?(actual) @actual = actual.to_a else - return false + false end end @@ -176,6 +176,7 @@ # # @private class PairingsMaximizer + # @private Solution = Struct.new(:unmatched_expected_indexes, :unmatched_actual_indexes, :indeterminate_expected_indexes, :indeterminate_actual_indexes) do def worse_than?(other) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/matchers/built_in/has.rb new/lib/rspec/matchers/built_in/has.rb --- old/lib/rspec/matchers/built_in/has.rb 2017-10-17 17:13:31.000000000 +0200 +++ new/lib/rspec/matchers/built_in/has.rb 2018-10-09 22:43:31.000000000 +0200 @@ -77,7 +77,7 @@ end def method_description - @method_name.to_s.gsub('_', ' ') + @method_name.to_s.tr('_', ' ') end def args_description diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/matchers/built_in/include.rb new/lib/rspec/matchers/built_in/include.rb --- old/lib/rspec/matchers/built_in/include.rb 2017-10-17 17:13:31.000000000 +0200 +++ new/lib/rspec/matchers/built_in/include.rb 2018-10-09 22:43:31.000000000 +0200 @@ -15,12 +15,14 @@ # @api private # @return [Boolean] def matches?(actual) + actual = actual.to_hash if convert_to_hash?(actual) perform_match(actual) { |v| v } end # @api private # @return [Boolean] def does_not_match?(actual) + actual = actual.to_hash if convert_to_hash?(actual) perform_match(actual) { |v| !v } end @@ -137,6 +139,10 @@ actual.include?(str) && lines.none? { |line| line == str } end end + + def convert_to_hash?(obj) + !obj.respond_to?(:include?) && obj.respond_to?(:to_hash) + end end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/matchers/built_in/respond_to.rb new/lib/rspec/matchers/built_in/respond_to.rb --- old/lib/rspec/matchers/built_in/respond_to.rb 2017-10-17 17:13:31.000000000 +0200 +++ new/lib/rspec/matchers/built_in/respond_to.rb 2018-10-09 22:43:31.000000000 +0200 @@ -151,7 +151,7 @@ @expected_keywords.map(&:inspect).join(' and ') else "#{@expected_keywords[0...-1].map(&:inspect).join(', ')}, and #{@expected_keywords.last.inspect}" - end + end "keyword#{@expected_keywords.count == 1 ? '' : 's'} #{kw_str}" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/matchers/built_in/satisfy.rb new/lib/rspec/matchers/built_in/satisfy.rb --- old/lib/rspec/matchers/built_in/satisfy.rb 2017-10-17 17:13:31.000000000 +0200 +++ new/lib/rspec/matchers/built_in/satisfy.rb 2018-10-09 22:43:31.000000000 +0200 @@ -34,7 +34,7 @@ "expected #{actual_formatted} not to #{description}" end - private # rubocop:disable Lint/UselessAccessModifier + private if RSpec::Support::RubyFeatures.ripper_supported? def block_representation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/matchers/composable.rb new/lib/rspec/matchers/composable.rb --- old/lib/rspec/matchers/composable.rb 2017-10-17 17:13:31.000000000 +0200 +++ new/lib/rspec/matchers/composable.rb 2018-10-09 22:43:31.000000000 +0200 @@ -156,10 +156,12 @@ # Wraps an item in order to surface its `description` via `inspect`. # @api private DescribableItem = Struct.new(:item) do + # Inspectable version of the item description def inspect "(#{item.description})" end + # A pretty printed version of the item description. def pretty_print(pp) pp.text "(#{item.description})" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/matchers/english_phrasing.rb new/lib/rspec/matchers/english_phrasing.rb --- old/lib/rspec/matchers/english_phrasing.rb 2017-10-17 17:13:31.000000000 +0200 +++ new/lib/rspec/matchers/english_phrasing.rb 2018-10-09 22:43:31.000000000 +0200 @@ -44,14 +44,14 @@ # So it appears that `Array` can trigger that (e.g. by calling `to_a` on the passed object?) # So here we replace `Kernel#Array` with our own warning-free implementation for 1.8.7. # @private - # rubocop:disable Style/MethodName + # rubocop:disable Naming/MethodName def self.Array(obj) case obj when Array then obj else [obj] end end - # rubocop:enable Style/MethodName + # rubocop:enable Naming/MethodName end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/matchers/generated_descriptions.rb new/lib/rspec/matchers/generated_descriptions.rb --- old/lib/rspec/matchers/generated_descriptions.rb 2017-10-17 17:13:31.000000000 +0200 +++ new/lib/rspec/matchers/generated_descriptions.rb 2018-10-09 22:43:31.000000000 +0200 @@ -21,8 +21,7 @@ "#{last_expectation_handler.verb} #{last_description}" end - private - + # @private def self.last_description last_matcher.respond_to?(:description) ? last_matcher.description : <<-MESSAGE When you call a matcher in an example without a String, like this: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/matchers.rb new/lib/rspec/matchers.rb --- old/lib/rspec/matchers.rb 2017-10-17 17:13:31.000000000 +0200 +++ new/lib/rspec/matchers.rb 2018-10-09 22:43:31.000000000 +0200 @@ -480,7 +480,10 @@ # == Notes # # Evaluates `receiver.message` or `block` before and after it - # evaluates the block passed to `expect`. + # evaluates the block passed to `expect`. If the value is the same + # object, its before/after `hash` value is used to see if it has changed. + # Therefore, your object needs to properly implement `hash` to work correctly + # with this matcher. # # `expect( ... ).not_to change` supports the form that specifies `from` # (which specifies what you expect the starting, unchanged value to be) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2017-10-17 17:13:31.000000000 +0200 +++ new/metadata 2018-10-09 22:43:31.000000000 +0200 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: rspec-expectations version: !ruby/object:Gem::Version - version: 3.7.0 + version: 3.8.2 platform: ruby authors: - Steven Baker @@ -45,7 +45,7 @@ ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ F3MdtaDehhjC -----END CERTIFICATE----- -date: 2017-10-17 00:00:00.000000000 Z +date: 2018-10-09 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rspec-support @@ -53,14 +53,14 @@ requirements: - - "~>" - !ruby/object:Gem::Version - version: 3.7.0 + version: 3.8.0 type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version - version: 3.7.0 + version: 3.8.0 - !ruby/object:Gem::Dependency name: diff-lcs requirement: !ruby/object:Gem::Requirement @@ -218,9 +218,8 @@ version: '0' requirements: [] rubyforge_project: -rubygems_version: 2.6.14 +rubygems_version: 2.7.6 signing_key: specification_version: 4 -summary: rspec-expectations-3.7.0 +summary: rspec-expectations-3.8.2 test_files: [] -has_rdoc: Binary files old/metadata.gz.sig and new/metadata.gz.sig differ