Class: Luna::Formatters::Emoji
- Inherits:
-
RSpec::Core::Formatters::BaseTextFormatter
- Object
- RSpec::Core::Formatters::BaseTextFormatter
- Luna::Formatters::Emoji
- Includes:
- Profiling
- Defined in:
- lib/luna/rspec/formatters/emoji.rb
Constant Summary
Constants included from Profiling
Profiling::EXP, Profiling::EXP_HEADER, Profiling::GROUPS, Profiling::GROUPS_HEADER
Instance Method Summary collapse
-
#allowed_cols ⇒ Object
– Note: If the terminal is too small we just let it go.
- #start(_) ⇒ Object
- #start_dump(_) ⇒ Object
Methods included from Profiling
Instance Method Details
#allowed_cols ⇒ Object
– 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 |