Class: Minitest::GamifyingReporter

Inherits:
StatisticsReporter
  • Object
show all
Includes:
GamifyingFormatters::Common
Defined in:
lib/minitest/gamifying_reporter.rb

Instance Method Summary collapse

Methods included from GamifyingFormatters::Common

#calculate_achevements, #decreased_test_time_achievement, #get_trophie, #load_test_info, #number_of_fixed_tests_achievement, #number_of_tests_achievement, #show_achievements, #show_xp_bar, #wrap_up

Constructor Details

#initializeGamifyingReporter

Returns a new instance of GamifyingReporter.



7
8
9
10
# File 'lib/minitest/gamifying_reporter.rb', line 7

def initialize
  super
  @test_info = load_test_info
end

Instance Method Details

#reportObject



12
13
14
15
16
17
18
19
20
21
# File 'lib/minitest/gamifying_reporter.rb', line 12

def report
  super

  num_of_failures = failures + errors
  total = count - skips
  achievements = calculate_achevements(total, num_of_failures, total_time)
  show_achievements unless achievements.empty?
  show_xp_bar
  wrap_up(total, num_of_failures, total_time)
end