Skip to content

Commit

Permalink
Fix issue with generation of report
Browse files Browse the repository at this point in the history
  • Loading branch information
Yacine Petitprez committed Apr 28, 2018
1 parent 06ec27e commit e76dd9c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/coverage/runtime/outputters/html_report.cr
Expand Up @@ -2,6 +2,8 @@ require "ecr"
require "file_utils"

class Coverage::Outputter::HtmlReport < Coverage::Outputter
TEMPLATE_DIR = File.expand_path("../../../../template", __FILE__)

struct CoverageReport
property filename : String
property md5 : String
Expand Down Expand Up @@ -29,21 +31,21 @@ class Coverage::Outputter::HtmlReport < Coverage::Outputter
def initialize(@covered_files : Array(CoverageReport))
end

ECR.def_to_s "template/index.html.ecr"
ECR.def_to_s "#{TEMPLATE_DIR}/index.html.ecr"
end

class SummaryFile
def initialize(@covered_files : Array(CoverageReport))
end

ECR.def_to_s "template/summary.html.ecr"
ECR.def_to_s "#{TEMPLATE_DIR}/summary.html.ecr"
end

class CoveredFile
def initialize(@file : CoverageReport)
end

ECR.def_to_s "template/cover.html.ecr"
ECR.def_to_s "#{TEMPLATE_DIR}/cover.html.ecr"
end

def initialize
Expand Down

0 comments on commit e76dd9c

Please sign in to comment.