class RSpec::Longrun::Formatter::Block

Public Class Methods

new(nested = false) click to toggle source
# File lib/rspec/longrun/formatter.rb, line 106
def initialize(nested = false)
  @began_at = Time.now
  @nested = nested
end

Public Instance Methods

finished!() click to toggle source
# File lib/rspec/longrun/formatter.rb, line 111
def finished!
  @finished_at = Time.now
end
nested!() click to toggle source
# File lib/rspec/longrun/formatter.rb, line 120
def nested!
  @nested = true
end
nested?() click to toggle source
# File lib/rspec/longrun/formatter.rb, line 124
def nested?
  @nested
end
timing() click to toggle source
# File lib/rspec/longrun/formatter.rb, line 115
def timing
  delta = @finished_at - @began_at
  '%.2fs' % delta
end