22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/cornucopia/rspec_hooks.rb', line 22
def end_example(example)
unless example == last_reported_example
if (example.exception)
@last_reported_example = example
puts("random seed for testing was: #{suite_seed_value}, #{context_seed_value}, #{seed_value}")
Cornucopia::Util::ReportBuilder.current_report.
within_section("Test Error: #{example.full_description}") do |report|
configured_report = Cornucopia::Util::Configuration.report_configuration :rspec
configured_report.add_report_objects example: example, rspec: RSpec, seeds: self
configured_report.generate_report(report)
end
end
end
end
|