- Add
lets:
metadata helper for DRYer defining of simplelet
s in multiple contexts; - Minimum supported Ruby version is 2.7
- Add a handler for when
saharspec
is called before/withoutrspec
, to provide an informative error message (@Vagab)
- Properly lint RSpec specs using
its_block
/its_call
/its_map
withrubocop-rspec
>= 2.0 (@ka8725) - Fix
its_block
andits_call
to support RSpec 3.11
- Better
dont
failure message (just use underlying matchersfailure_message_when_negated
)
- Allow
its_call
to work properly with keyword args on Ruby 2.7
- Fix
dont.send_message
combination behavior (and generally, behavior ofdont.
with matchers defining customdoes_not_matches?
); - Better
ret
matcher failure message when there is a complicated matcher on the right side (use itsfailure_message
instead ofdescription
); - Update
send_message
matcher description to be more readable; - Drop Ruby 2.2 support.
be_json
matcher;- make
ret
diffable.
- Update
its_call
description generation, looks better withrspec --format doc
- Introduce new
its
-family addition:its_call(*args)
let(:array) { %i[a b c] }
subject { array.method(:delete_at) }
its_call(1) { is_expected.to change(array, :length).by(-1) }
- Introduce new
ret
matcher ("block is expected to return"), useful in context when block is your primary subject:
let(:array) { %i[a b c] }
subject { array.method(:delete_at) }
its_call(1) { is_expected.to ret(:b).and change(array, :length).by(-1) }
- Introduce experimental
dont
matcher combiner (instead ofRSpec.define_negated_matcher
), used asexpect { something }.to dont.change { anything }
; - Breaking: rename
its_call
→its_block
(because the name was needed for other means).
- Make
send_message
composable; - Add
Util#multiline
.
Initial!