Class: RSpec::Core::Formatters::JsonFormatter

Inherits:
Object
  • Object
show all
Defined in:
opal/opal/rspec/fixes/rspec/core/formatters/json_formatter.rb

Instance Method Summary collapse

Instance Method Details

#close(_notification) ⇒ Object



2
3
4
5
6
7
8
9
# File 'opal/opal/rspec/fixes/rspec/core/formatters/json_formatter.rb', line 2

def close(_notification)
  output.write @output_hash.to_json
  # JSON formatter does not look @ closed? and we need it to, otherwise Phantom freezes
  return unless IO === output
  return if output.closed? || output == $stdout

  output.close
end