Class: FlipSpec

Inherits:
Object
  • Object
show all
Defined in:
lib/flip_spec.rb

Constant Summary collapse

COLOURS =
{ red: 31, green: 32, blue: 34, magenta: 35, cyan: 36, bold: 1 }
METHODS =
[:start, :example_failed, :example_passed]

Instance Method Summary collapse

Constructor Details

#initialize(output) ⇒ FlipSpec

Returns a new instance of FlipSpec.



7
8
9
# File 'lib/flip_spec.rb', line 7

def initialize(output)
  @output = output
end

Instance Method Details

#example_failed(notification) ⇒ Object



15
16
17
# File 'lib/flip_spec.rb', line 15

def example_failed(notification)
  @output << colour_text(' (╯°□°)╯ ︵ ┻━━┻  : ' + notification.example.description.upcase, 31)
end

#example_passed(notification) ⇒ Object



19
20
21
# File 'lib/flip_spec.rb', line 19

def example_passed(notification)
  @output << colour_text('*・゚✧  ┬──┬  ・*゚✧・ : ' + notification.example.description.upcase, 32)
end

#startObject



11
12
13
# File 'lib/flip_spec.rb', line 11

def start(*)
  @output << colour_text('🍰  F 🍰  L 🍰  I 🍰  P  -   S 🍰  P 🍰  E 🍰  C 🍰', 35)
end