Improve failure messages of chained expectations

This commit is contained in:
Maikel Linke
2024-05-02 16:55:19 +10:00
parent cec179333a
commit a65189c43e

View File

@@ -94,6 +94,15 @@ RSpec.configure do |config|
# Force use of expect (over should)
config.expect_with :rspec do |expectations|
expectations.syntax = :expect
# This option will default to `true` in RSpec 4. It makes the `description`
# and `failure_message` of custom matchers include text for helper methods
# defined using `chain`, e.g.:
# be_bigger_than(2).and_smaller_than(4).description
# # => "be bigger than 2 and smaller than 4"
# ...rather than:
# # => "be bigger than 2"
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end
# Reset locale for all specs.