rspec-expectations
rspec-expectations copied to clipboard
Provides a readable API to express expected outcomes of a code example
### Subject of the issue `include` breaks with a time range Originally reported by @schwern in https://github.com/rubocop-hq/rubocop-rspec/issues/926 ### Your environment * Ruby version: 2.7.1 * rspec-expectations version: `master` ([`eb1787f`](https://github.com/rspec/rspec-expectations/commit/eb1787f0e1a5ec2c2650048ee60a45d4c9738d78)) ###...
### Subject of the issue I've created a custom matcher which allows to chain other matchers against a computed value : ```ruby matcher :have_html_body do chain :to, :other_matcher match do...
Hi, there is an error when you add `.by(..)` to your `expect {}.not_to change(some, :attr)`, like `expect {}.not_to change(some, :attr).by(1)` that says "NotImplementedError: `expect { }.not_to change { }.by()` is...
### Subject of the issue `expect(["a", "b", "c"]).to match(["a", "b"])` should print unexpected extra elements in a nice way like `expect(["a", "b", "c"]).to match_array(["a", "b"])` Since `match` checks order while...
Hey lovely folks :wave:, I hope you all are doing well This PR here is to address https://github.com/rspec/rspec-expectations/issues/1426 which is to prevent a custom matcher from calling twice without compound...
### Subject of the issue Hi there folks 👋 , First of all, thank you for this great gem! I created this issue here just to offer a small idea,...
### Subject of the issue RSpec generally has great failure output, but when using `start_with` or `end_with` on a multi-line string, the output is quite hard to read. RSpec is...
### Subject of the issue When using ruby 3.0.3 manually defined chained rspec matchers with keyword parameters don't forwards the arguments correctly ### Your environment * Ruby version: 3.0.3 *...
Running the following file, I get the following output for the two different expectations ```ruby HasString = Struct.new(:string) RSpec.describe "foo" do it "bar" do hs = HasString.new("abc\ndef\nghij\n\n493207428") # expect(hs.string).to eq...
### Subject of the issue I'm running CI. ~When using ruby3 I get a weird error I'm struggling to triage. I'm 99% certain I'm doing something wrong~ ## When using...