diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index ba3b9c69ca0..5595e3cbdb9 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -582,7 +582,7 @@ RSpec.configure do |config| config.after :each do |example| if example.exception && RspecErrorTracker.exceptions.present? - lines = RSpec.current_example.metadata[:extra_failure_lines] + lines = (RSpec.current_example.metadata[:extra_failure_lines] ||= "") lines << "~~~~~~~ SERVER EXCEPTIONS ~~~~~~~"