Method: BenchmarkSpec#describe

Defined in:
lib/benchmark_spec.rb

#describe(description, &block) ⇒ Object



96
97
98
99
100
101
102
103
104
# File 'lib/benchmark_spec.rb', line 96

def describe(description, &block)
  spec_options = {}
  spec_options[:execution]    = block if block
  spec_options[:before_hooks] = before_hooks.dup
  spec_options[:after_hooks]  = after_hooks.dup
  spec_options[:formatter]    = OutputFormatter.new(indent_level: formatter.indent_level + 1)

  nested_specs << BenchmarkSpec.new(description, spec_options)
end