Enhancements:
* Add `block_arg` method to custom matcher API, which allows you to
access the block passed to a custom matcher, if there is one.
(Mike Dalton, #645)
* Provide more detail in failure message of `yield_control` matcher.
(Jon Rowe, #650)
* Add a shorthand syntax for `chain` in the matcher DSL which assigns values
for use elsewhere, for example `chain :and_smaller_than, :small_value`
creates an `attr_reader` for `small_value` (Tom Stuart, #644)
* Provide a more helpful deprecation message when using the `should` syntax.
(Elia Schito, #663)
* Provide more detail in the `have_attributes` matcher failure message.
(Jon Rowe, #668)
* Make the `have_attributes` matcher diffable.
(Jon Rowe, Alexey Fedorov, #668)
* Add `output(...).to_std(out|err)_from_any_process` as alternatives
to `output(...).to_std(out|err)`. The latter doesn't work when a sub
process writes to the named stream but is much faster.
(Alex Genco, #700)
* Improve compound matchers (created by `and` and `or`) so that diffs
are included in failures when one or more of their matchers
are diffable. (Alexey Fedorov, #713)
Bug Fixes:
* Avoid calling `private_methods` from the `be` predicate matcher on
the target object if the object publicly responds to the predicate
method. This avoids a possible error that can occur if the object
OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby:extensions/rubygem-rspec-expectations?expand=0&rev=18
Enhancements
* Add support for percent deltas to `be_within` matcher:
`expect(value).to be_within(10).percent_of(expected)`
(Myron Marston).
* Add support to `include` matcher to allow it to be given a list
of matchers as the expecteds to match against (Luke Redpath).
Bug fixes
* Fix `change` matcher so that it dups strings in order to handle
mutated strings (Myron Marston).
* Fix `should be =~ /some regex/` / `expect(...).to be =~ /some regex/`.
Previously, these either failed with a confusing `undefined method
matches?' for false:FalseClass` error or were no-ops that didn't
actually verify anything (Myron Marston).
* Add compatibility for diff-lcs 1.2 and relax the version
constraint (Peter Goldstein).
* Fix DSL-generated matchers to allow multiple instances of the
same matcher in the same example to have different description
and failure messages based on the expected value (Myron Marston).
* Prevent `undefined method #split for Array` error when dumping
the diff of an array of multiline strings (Myron Marston).
* Don't blow up when comparing strings that are in an encoding
that is not ASCII compatible (Myron Marston).
* Remove confusing "Check the implementation of #==" message
printed for empty diffs (Myron Marston).
OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby:extensions/rubygem-rspec-expectations?expand=0&rev=5
Enhancements
* Colorize diffs if the `--color` option is configured. (Alex Coplan)
* Include backtraces in unexpected errors handled by `raise_error`
matcher (Myron Marston)
* Print a warning when users accidentally pass a non-string argument
as an expectation message (Sam Phippen)
* `=~` and `match_array` matchers output a more useful error message when
the actual value is not an array (or an object that responds to `#to_ary`)
(Sam Phippen)
Bug fixes
* Fix `include` matcher so that `expect({}).to include(:a => nil)`
fails as it should (Sam Phippen).
* Fix `be_an_instance_of` matcher so that `Class#to_s` is used in the
description rather than `Class#inspect`, since some classes (like
`ActiveRecord::Base`) define a long, verbose `#inspect`.
(Tom Stuart)
OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby:extensions/rubygem-rspec-expectations?expand=0&rev=3