mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Improve failure messages of chained expectations
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user