From 4c365ea35318b644d76ebbd3d09111dfdaec3da4 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 24 May 2018 14:28:20 +0100 Subject: [PATCH] spec_helper: don't truncate output expectations. It's really useful to be able to see the full output particularly when a backtrace is in it. --- Library/Homebrew/test/spec_helper.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/test/spec_helper.rb b/Library/Homebrew/test/spec_helper.rb index 1c7c0fcdcd..97195fe819 100644 --- a/Library/Homebrew/test/spec_helper.rb +++ b/Library/Homebrew/test/spec_helper.rb @@ -43,9 +43,14 @@ RSpec.configure do |config| config.filter_run_when_matching :focus - config.expect_with :rspec do |c| - c.max_formatted_output_length = nil - end + # TODO when https://github.com/rspec/rspec-expectations/pull/1056 makes + # it into a stable release: + # config.expect_with :rspec do |c| + # c.max_formatted_output_length = 200 + # end + + # Never truncate output objects. + RSpec::Support::ObjectFormatter.default_instance.max_formatted_output_length = nil config.include(FileUtils)