Module: Moon::Test::Benchmark

Defined in:
lib/moon/packages/test/benchmark.rb

Defined Under Namespace

Classes: Suite

Instance Method Summary collapse

Instance Method Details

#bench(name, options = {}) {|suite| ... } ⇒ Object

Yields:

  • (suite)

60
61
62
63
64
65
66
67
68
69
# File 'lib/moon/packages/test/benchmark.rb', line 60

def bench(name, options = {}, &block)
  suite = Suite.new(name)
  yield suite
  if options[:bmbm]
    suite.run_run
  else
    suite.run
  end
  suite
end