module Busted

Constants

VERSION

Public Instance Methods

cache?(counter = nil, &block) click to toggle source
# File lib/busted.rb, line 26
def cache?(counter = nil, &block)
  total = if counter
            send :"#{counter}_cache_invalidations", &block
          else
            run(&block)[:invalidations].values.inject :+
          end
  total > 0
end
constant_cache?(&block) click to toggle source
# File lib/busted.rb, line 39
def constant_cache?(&block)
  cache? :constant, &block
end
constant_cache_invalidations(&block) click to toggle source
# File lib/busted.rb, line 22
def constant_cache_invalidations(&block)
  run(&block)[:invalidations][:constant]
end
finish(options = {}) click to toggle source
# File lib/busted.rb, line 14
def finish(options = {})
  Profiler.run({ profiler: :sandwich, action: :finish }.merge options)
end
method_cache?(&block) click to toggle source
# File lib/busted.rb, line 35
def method_cache?(&block)
  cache? :method, &block
end
method_cache_invalidations(&block) click to toggle source
# File lib/busted.rb, line 18
def method_cache_invalidations(&block)
  run(&block)[:invalidations][:method]
end
run(options = {}, &block) click to toggle source
# File lib/busted.rb, line 6
def run(options = {}, &block)
  Profiler.run options, &block
end
start(options = {}) click to toggle source
# File lib/busted.rb, line 10
def start(options = {})
  Profiler.run({ profiler: :sandwich, action: :start }.merge options)
end