Sha256: 491fe59525c70eb59cf18067cbf10bcdccd6fd8d7719bf5841bb1ffe03b69708

Contents?: true

Size: 897 Bytes

Versions: 9

Compression:

Stored size: 897 Bytes

Contents

require "spec_helper"
MetricFu.metrics_require { "rcov/generator" }
require "shared/test_coverage"

describe MetricFu::RcovGenerator, "configured as rcov" do
  it_behaves_like "rcov test coverage generator", :rcov do
    describe "emit" do
      before :each do
        options = { external: nil }
        @test_coverage = MetricFu::RcovGenerator.new(@default_options.merge(options))
      end

      it "should set the RAILS_ENV" do
        expect(MetricFu::Utility).to receive(:rm_rf).with(MetricFu::RcovGenerator.metric_directory, verbose: false)
        expect(MetricFu::Utility).to receive(:mkdir_p).with(MetricFu::RcovGenerator.metric_directory)
        options = { environment: "metrics", external: nil }
        @test_coverage = MetricFu::RcovGenerator.new(@default_options.merge(options))
        expect(@test_coverage.command).to include("RAILS_ENV=metrics")
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
metric_fu-4.13.0 spec/metric_fu/metrics/rcov/generator_spec.rb
fastruby-metric_fu-5.0.0 spec/metric_fu/metrics/rcov/generator_spec.rb
code_metric_fu-4.14.4 spec/metric_fu/metrics/rcov/generator_spec.rb
code_metric_fu-4.14.3 spec/metric_fu/metrics/rcov/generator_spec.rb
code_metric_fu-4.14.2 spec/metric_fu/metrics/rcov/generator_spec.rb
code_metric_fu-4.14.1 spec/metric_fu/metrics/rcov/generator_spec.rb
code_metric_fu-4.14.0 spec/metric_fu/metrics/rcov/generator_spec.rb
metric_fu-4.12.0 spec/metric_fu/metrics/rcov/generator_spec.rb
metric_fu-4.11.4 spec/metric_fu/metrics/rcov/generator_spec.rb