Class: Tack::Formatters::PrintFailures

Inherits:
Object
  • Object
show all
Includes:
Middleware
Defined in:
lib/tack/formatters/print_failures.rb

Instance Method Summary collapse

Methods included from Middleware

#returning, #run_test

Constructor Details

#initialize(app) ⇒ PrintFailures

Returns a new instance of PrintFailures.



8
9
10
# File 'lib/tack/formatters/print_failures.rb', line 8

def initialize(app)
  @app = app
end

Instance Method Details

#run_suite(tests) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/tack/formatters/print_failures.rb', line 12

def run_suite(tests)
  returning @app.run_suite(tests) do |results|
    results[:failed].each_with_index do |result, index|
      print_failure(index+1, result)
    end
  end
end