Class: Guard::Unity::Notifier::CLI
- Inherits:
-
Object
- Object
- Guard::Unity::Notifier::CLI
- Defined in:
- lib/guard/unity/notifier/cli.rb
Constant Summary collapse
- SEPARATOR =
'-'*100
Instance Attribute Summary collapse
-
#formatador ⇒ Object
Returns the value of attribute formatador.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ CLI
constructor
A new instance of CLI.
- #notify(results = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ CLI
Returns a new instance of CLI.
12 13 14 |
# File 'lib/guard/unity/notifier/cli.rb', line 12 def initialize(={}) @formatador = [:formatador] || Formatador.new end |
Instance Attribute Details
#formatador ⇒ Object
Returns the value of attribute formatador.
8 9 10 |
# File 'lib/guard/unity/notifier/cli.rb', line 8 def formatador @formatador end |
Instance Method Details
#notify(results = {}) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/guard/unity/notifier/cli.rb', line 16 def notify(results={}) cases = results[:test_cases] || [] table = [] errors = [] cases.each do |test_case| table << _row(test_case) errors << _error(test_case) if test_case[:failed] end _display_results results _display_table table _display_errors errors end |