class EmojifyRspecFormatter

Public Class Methods

new(output) click to toggle source
# File lib/emojify_rspec_formatter.rb, line 8
def initialize(output)
  @output = output
end

Public Instance Methods

example_failed(failed) click to toggle source
# File lib/emojify_rspec_formatter.rb, line 12
def example_failed(failed)
  @output.print (['😨  ', '😵  ', '🙅  ',
                  '🆘  ', '👎  ', '💔  ',
                  '😭  ', '💩  ', '😐  ',
                  '📉  ', '😱  ', '🙊  '].sample).colorize(:background => :red)
  puts (failed.example.description.strip).colorize(:color => :red)
end
example_passed(passed) click to toggle source
# File lib/emojify_rspec_formatter.rb, line 20
def example_passed(passed)
  @output.print (['🍺  ','🙌  ','😍  ',
                  '🆒  ','👌  ','💘  ',
                  '💯  ','🔥  ','😎  ',
                  '📈  ','💪  ','💎  ',
                  '💅  ','💋  ','👑  ',
                  '🎀  ','🎉  ','🎈  '].sample).colorize(:background => :green)
  puts (passed.example.description.strip).colorize(:color => :green)
end