This repository was archived by the owner on Nov 30, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 386
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: rspec/rspec-expectations
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.8.2
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: rspec/rspec-expectations
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.8.3
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 14 commits
- 21 files changed
- 6 contributors
Commits on Oct 20, 2018
-
Merge pull request #1081 from orien/project-metadata
Add project metadata to the gemspec
Configuration menu - View commit details
-
Copy full SHA for 3eccdd0 - Browse repository at this point
Copy the full SHA 3eccdd0View commit details
Commits on Nov 23, 2018
-
Fix nested
all
repeated failure message (#1086)`RSpec::Matchers::BuiltIn::All` keeps track of which objects failed at which index of the actual value in a `@failed_objects` hash. The matcher considers a match successful if `@failed_objects` is empty. When the matcher is composed inside another matcher, the matcher gets cloned before matching against each item in the actual collection. The `@failed_objects` hash doesn't itself get cloned, resulting in each cloned matcher having a reference to the same hash. This means that once a matcher (or one of its clones) fails – populating `@failed_objects` –, each of its clones will fail matching regardless of whether it matched or not, as each clone's `@failed_objects` reference is not empty. This leads to behavior like the following, where we see the first failure (expecting `false` to be `true`) repeated twice. ``` expect([[true], [false]]).to all(all(be(false))) RSpec::Expectations::ExpectationNotMetError: expected [[true], [false]] to all all equal false object at index 0 failed to match: expected [true] to all equal false object at index 0 failed to match: expected false got true object at index 1 failed to match: expected [false] to all equal false object at index 0 failed to match: expected false got true ``` The solution here is to clone the `@failed_objects` hash when the matcher itself is cloned. So long as the matcher itself is cloned immediately after construction (while `@failed_objects` is empty) – which is what actually happens – we avoid this bug. Alternative solutions include: * calling `@failed_objects.clear` at the start of each `matches?` call * lazily defining `@failed_objects` (i.e. outside of the constructor) so that when the matcher is cloned, `@failed_objects` isn't defined yet and so cannot have shared references to it However, the pattern already exists where, when the matcher is cloned, its 'submatcher' (composed matcher) is cloned. Cloning `@failed_objects` at this time follows the same pattern.
Configuration menu - View commit details
-
Copy full SHA for 9ac91f7 - Browse repository at this point
Copy the full SHA 9ac91f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for c163b99 - Browse repository at this point
Copy the full SHA c163b99View commit details
Commits on Apr 19, 2019
-
Handle subject hash change after change matcher has run (#1100)
#1034 introduced a hash comparison in addition to an equality check. The change compared not only the objects themselves, but also their hashes which broke for poorly behaving Ruby objects. E.g. (using `rspec-rails`): it { expect { 'noop' }.not_to change { country.reload.cities } } By caching the hash immediately after the block has run we should be able to work around such examples.
Configuration menu - View commit details
-
Copy full SHA for f9f560d - Browse repository at this point
Copy the full SHA f9f560dView commit details -
Configuration menu - View commit details
-
Copy full SHA for c090125 - Browse repository at this point
Copy the full SHA c090125View commit details -
Added warning message for BasicObject with unsupported matchers (#1107)
BasicObject doesn't define certain Ruby methods matchers rely on, in this case issue an ArgumentError to better explain the error. * Added kindly failure message for #1105 * raise ArgumentError instead of printing special failure message * added examples for following cases - actual object does not respond to #kind_of? method - actual object does not respond to #is_a? method * removed #error_message method and give the error message inline
Configuration menu - View commit details
-
Copy full SHA for 6679fd4 - Browse repository at this point
Copy the full SHA 6679fd4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5946b8b - Browse repository at this point
Copy the full SHA 5946b8bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d3c62e - Browse repository at this point
Copy the full SHA 0d3c62eView commit details -
Configuration menu - View commit details
-
Copy full SHA for c6f24fb - Browse repository at this point
Copy the full SHA c6f24fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1df0713 - Browse repository at this point
Copy the full SHA 1df0713View commit details -
Configuration menu - View commit details
-
Copy full SHA for cf11295 - Browse repository at this point
Copy the full SHA cf11295View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a71eba - Browse repository at this point
Copy the full SHA 3a71ebaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1cc4fb9 - Browse repository at this point
Copy the full SHA 1cc4fb9View commit details
Commits on Apr 20, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 14fe2e9 - Browse repository at this point
Copy the full SHA 14fe2e9View commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v3.8.2...v3.8.3