diff --git a/spec/base_spec_helper.rb b/spec/base_spec_helper.rb index 42ce4e6ad6..aabd97dbdf 100644 --- a/spec/base_spec_helper.rb +++ b/spec/base_spec_helper.rb @@ -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.