rspec-expectations
rspec-expectations copied to clipboard
Provides a readable API to express expected outcomes of a code example
### Compound expectations with OutputMatcher not receiving captured output :heart: Thanks for any help on this in advance - it might just be user error. When constructing a compound expectation...
Adds deprecation warnings [for the work done on unreleased RSpec 4](https://github.com/rspec/rspec-expectations/blob/4-0-dev/Changelog.md#development). fixes #1302 - [-] Ruby < 2.3 is no longer supported. (Phil Pirozhkov, #1230) - Will be handled by...
Without this, it will raise: ArgumentError: wrong number of arguments (given 2, expected 1) if you try to pass a keyword arg to a chain method on Ruby 3. ~In...
There is no easy way to verify a method would be called with a block. It would be nice to have ``` expect(thing).to receive(:method).with_block ```
As requested in #759 For example `expect([person]).to match [have_attributes(:age => 10)]` Before `expected [#{object_inspect person}] to match [(have attributes {:age => 10})]` After `expected [#{object_inspect person}] to match [(have attributes...
Speed up the ContainExactly matcher by pre-emptively matching up corresponding elements in the expected and actual arrays. This addresses issues #1006, #1161. **Before this PR, comparing two arrays of 50...
In #668, the `have_attributes` matcher was improved so that the actual attribute values are used in the diff. This is particularly important when the `inspect` output of the object does...
Trying to execute Thor test suite with rspec-expectations 3.11.0 + Ruby 3.1, I observe the following error: ~~~ 1) Thor::Options#parse raises an error for unknown switches Failure/Error: expect { check_unknown!...
fixes #1331 When a compound matcher fails, the failure message checks both sides of the match to determine how to display the failure match. When multiple compound matchers are chained,...
### Subject of the issue It appears that if And compounds are sequential then tests are running for a long time. Eg.: ```ruby expect('qwe'). to include('asd'). and(include('asd')). and(include('asd')). and(include('asd')). and(include('asd'))....