Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Call super in Formatter.close methods to ensure sync is reset #3094

Closed
wants to merge 9 commits into from
10 changes: 5 additions & 5 deletions lib/rspec/core/formatters/base_text_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ def seed(notification)
#
# @param _notification [NullNotification] (Ignored)
def close(_notification)
return if output.closed?

output.puts

output.flush
unless output.closed?
output.puts
output.flush
end
super
rahearn marked this conversation as resolved.
Show resolved Hide resolved
end
end
end
Expand Down
1 change: 1 addition & 0 deletions lib/rspec/core/formatters/json_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def seed(notification)

def close(_notification)
output.write @output_hash.to_json
super
end

def dump_profile(profile)
Expand Down
Loading