Class: Luna::Formatters::Emoji

Inherits:
RSpec::Core::Formatters::BaseTextFormatter
  • Object
show all
Includes:
Profiling
Defined in:
lib/luna/rspec/formatters/emoji.rb

Direct Known Subclasses

Cats, Checks, Hearts, Smiles

Constant Summary

Constants included from Profiling

Profiling::EXP, Profiling::EXP_HEADER, Profiling::GROUPS, Profiling::GROUPS_HEADER

Instance Method Summary collapse

Methods included from Profiling

#dump_profile, #helpers

Instance Method Details

#allowed_colsObject

– Note: If the terminal is too small we just let it go. The total columns we allow is just a example –



28
29
30
31
32
33
34
35
36
# File 'lib/luna/rspec/formatters/emoji.rb', line 28

def allowed_cols
  return @allowed_cols if defined?(@allowed_cols)
  @allowed_cols ||= begin
    infi = Float::INFINITY
    size = IO.console&.winsize&.last
    size = size || infi
    size / 6
  end
end

#start(_) ⇒ Object



38
39
40
41
# File 'lib/luna/rspec/formatters/emoji.rb', line 38

def start(_)
  @lines = 0
  output.puts
end

#start_dump(_) ⇒ Object



43
44
45
# File 'lib/luna/rspec/formatters/emoji.rb', line 43

def start_dump(_)
  output.puts
end