Class: Busted::Counter

Inherits:
Object
  • Object
show all
Defined in:
lib/busted/counter.rb

Instance Method Summary collapse

Instance Method Details

#finishObject



8
9
10
# File 'lib/busted/counter.rb', line 8

def finish
  @finished = counts
end

#reportObject



12
13
14
15
16
# File 'lib/busted/counter.rb', line 12

def report
  [:method, :constant].each_with_object({}) do |counter, result|
    result[counter] = finished[counter] - started[counter]
  end
end

#startObject



4
5
6
# File 'lib/busted/counter.rb', line 4

def start
  @started = counts
end