Sha256: 246b06e52e92797f7dac6c76258bd3de8998a038e5c4f8a533dac20b549f538c

Contents?: true

Size: 458 Bytes

Versions: 2

Compression:

Stored size: 458 Bytes

Contents

require 'koality'
require 'simplecov'

module Koality
  module SimpleCov
    class Formatter

      def format(result)
        ::SimpleCov::Formatter::HTMLFormatter.new.format(result)

        Koality.options.ensure_output_directory_exists
        threshold_file = Koality.options.output_file(:code_coverage_file)

        File.open(threshold_file, "w") do |f|
          f << result.source_files.covered_percent.to_f
        end
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
koality-1.0.1 lib/koality/simplecov/formatter.rb
koality-1.0.0 lib/koality/simplecov/formatter.rb