Class: FlipSpec
- Inherits:
-
Object
- Object
- FlipSpec
- 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
- #example_failed(notification) ⇒ Object
- #example_passed(notification) ⇒ Object
-
#initialize(output) ⇒ FlipSpec
constructor
A new instance of FlipSpec.
- #start ⇒ Object
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 |
#start ⇒ Object
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 |