Class: Tack::Formatters::TotalTime

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

Instance Method Summary collapse

Methods included from Middleware

#returning, #run_test

Constructor Details

#initialize(app) ⇒ TotalTime

Returns a new instance of TotalTime.



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

def initialize(app)
  @app = app
end

Instance Method Details

#run_suite(tests) ⇒ Object



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

def run_suite(tests)
  time = Time.now
  returning @app.run_suite(tests) do
    puts "Finished in %.7f seconds." % (Time.now - time)
  end
end