Sha256: cd34887a7292390d26f2bb8611efb43fdf912cd91a751271c8f17bd0e4e3e8ce

Contents?: true

Size: 585 Bytes

Versions: 8

Compression:

Stored size: 585 Bytes

Contents

require "spec_helper"
MetricFu.metrics_require { 'hotspots/init' }
MetricFu.metrics_require { 'hotspots/hotspot' }
MetricFu.metrics_require { 'hotspots/analysis/record' }
MetricFu.metrics_require { 'rcov/rcov_hotspot' }

describe MetricFu::RcovHotspot do
  describe "map" do
    let(:zero_row) do
      MetricFu::Record.new({"percentage_uncovered"=>0.0}, nil)
    end

    let(:non_zero_row) do
      MetricFu::Record.new({"percentage_uncovered"=>0.75}, nil)
    end

    it {expect(subject.map(zero_row)).to eql(0.0)}
    it {expect(subject.map(non_zero_row)).to eql(0.75)}
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
metric_fu-4.10.0 spec/metric_fu/metrics/rcov/rcov_hotspot_spec.rb
metric_fu-4.9.0 spec/metric_fu/metrics/rcov/rcov_hotspot_spec.rb
metric_fu-4.8.0 spec/metric_fu/metrics/rcov/rcov_hotspot_spec.rb
metric_fu-4.7.4 spec/metric_fu/metrics/rcov/rcov_hotspot_spec.rb
metric_fu-4.7.3 spec/metric_fu/metrics/rcov/rcov_hotspot_spec.rb
metric_fu-4.7.2 spec/metric_fu/metrics/rcov/rcov_hotspot_spec.rb
metric_fu-4.7.1 spec/metric_fu/metrics/rcov/rcov_hotspot_spec.rb
metric_fu-4.7.0 spec/metric_fu/metrics/rcov/rcov_hotspot_spec.rb