Class: RSpecTracer::ReportMerger
- Inherits:
-
Object
- Object
- RSpecTracer::ReportMerger
- Defined in:
- lib/rspec_tracer/report_merger.rb
Instance Attribute Summary collapse
-
#all_examples ⇒ Object
readonly
Returns the value of attribute all_examples.
-
#all_files ⇒ Object
readonly
Returns the value of attribute all_files.
-
#dependency ⇒ Object
readonly
Returns the value of attribute dependency.
-
#duplicate_examples ⇒ Object
readonly
Returns the value of attribute duplicate_examples.
-
#examples_coverage ⇒ Object
readonly
Returns the value of attribute examples_coverage.
-
#failed_examples ⇒ Object
readonly
Returns the value of attribute failed_examples.
-
#flaky_examples ⇒ Object
readonly
Returns the value of attribute flaky_examples.
-
#interrupted_examples ⇒ Object
readonly
Returns the value of attribute interrupted_examples.
-
#last_run ⇒ Object
readonly
Returns the value of attribute last_run.
-
#pending_examples ⇒ Object
readonly
Returns the value of attribute pending_examples.
-
#reverse_dependency ⇒ Object
readonly
Returns the value of attribute reverse_dependency.
-
#skipped_examples ⇒ Object
readonly
Returns the value of attribute skipped_examples.
Instance Method Summary collapse
-
#initialize ⇒ ReportMerger
constructor
A new instance of ReportMerger.
- #merge(reports_dir) ⇒ Object
Constructor Details
#initialize ⇒ ReportMerger
Returns a new instance of ReportMerger.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rspec_tracer/report_merger.rb', line 9 def initialize @last_run = {} @all_examples = {} @duplicate_examples = {} @interrupted_examples = Set.new @flaky_examples = Set.new @failed_examples = Set.new @pending_examples = Set.new @skipped_examples = Set.new @all_files = {} @dependency = Hash.new { |hash, key| hash[key] = Set.new } @reverse_dependency = {} @examples_coverage = {} end |
Instance Attribute Details
#all_examples ⇒ Object (readonly)
Returns the value of attribute all_examples.
5 6 7 |
# File 'lib/rspec_tracer/report_merger.rb', line 5 def all_examples @all_examples end |
#all_files ⇒ Object (readonly)
Returns the value of attribute all_files.
5 6 7 |
# File 'lib/rspec_tracer/report_merger.rb', line 5 def all_files @all_files end |
#dependency ⇒ Object (readonly)
Returns the value of attribute dependency.
5 6 7 |
# File 'lib/rspec_tracer/report_merger.rb', line 5 def dependency @dependency end |
#duplicate_examples ⇒ Object (readonly)
Returns the value of attribute duplicate_examples.
5 6 7 |
# File 'lib/rspec_tracer/report_merger.rb', line 5 def duplicate_examples @duplicate_examples end |
#examples_coverage ⇒ Object (readonly)
Returns the value of attribute examples_coverage.
5 6 7 |
# File 'lib/rspec_tracer/report_merger.rb', line 5 def examples_coverage @examples_coverage end |
#failed_examples ⇒ Object (readonly)
Returns the value of attribute failed_examples.
5 6 7 |
# File 'lib/rspec_tracer/report_merger.rb', line 5 def failed_examples @failed_examples end |
#flaky_examples ⇒ Object (readonly)
Returns the value of attribute flaky_examples.
5 6 7 |
# File 'lib/rspec_tracer/report_merger.rb', line 5 def flaky_examples @flaky_examples end |
#interrupted_examples ⇒ Object (readonly)
Returns the value of attribute interrupted_examples.
5 6 7 |
# File 'lib/rspec_tracer/report_merger.rb', line 5 def interrupted_examples @interrupted_examples end |
#last_run ⇒ Object (readonly)
Returns the value of attribute last_run.
5 6 7 |
# File 'lib/rspec_tracer/report_merger.rb', line 5 def last_run @last_run end |
#pending_examples ⇒ Object (readonly)
Returns the value of attribute pending_examples.
5 6 7 |
# File 'lib/rspec_tracer/report_merger.rb', line 5 def pending_examples @pending_examples end |
#reverse_dependency ⇒ Object (readonly)
Returns the value of attribute reverse_dependency.
5 6 7 |
# File 'lib/rspec_tracer/report_merger.rb', line 5 def reverse_dependency @reverse_dependency end |
#skipped_examples ⇒ Object (readonly)
Returns the value of attribute skipped_examples.
5 6 7 |
# File 'lib/rspec_tracer/report_merger.rb', line 5 def skipped_examples @skipped_examples end |
Instance Method Details
#merge(reports_dir) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/rspec_tracer/report_merger.rb', line 24 def merge(reports_dir) reports_dir.each do |report_dir| next unless File.directory?(report_dir) merge_cache(load_cache(report_dir)) merge_last_run_report(File.dirname(report_dir)) end @dependency.transform_values!(&:to_a) @reverse_dependency = RSpecTracer::ReportGenerator.new(self, nil).reverse_dependency_report end |