Method: RSpec::Core::Reporter#report

Defined in:
lib/rspec/core/reporter.rb

#report(count, &block) ⇒ void #report(count, &block) ⇒ void

Initializes the report run and yields itself for further reporting. The block is required, so that the reporter can manage cleaning up after the run.

Examples:


reporter.report(group.examples.size) do |r|
  example_groups.map {|g| g.run(r) }
end

Parameters:

  • expected_example_count (Integer)

    the number of examples being run

Yields:

  • (Block)

    block yields itself for further reporting.

[View source]

71
72
73
74
75
76
77
78
# File 'lib/rspec/core/reporter.rb', line 71

def report(expected_example_count)
  start(expected_example_count)
  begin
    yield self
  ensure
    finish
  end
end