Sha256: b619d0897ecfb45aabe0eb82cadb5205777b5eaa268982c6cd00b46a2e977c5e

Contents?: true

Size: 751 Bytes

Versions: 9

Compression:

Stored size: 751 Bytes

Contents

# encoding: utf-8
require "spec_helper"
require "metric_fu"

describe Hexx::Suit::Metrics::MetricFu::Churn, :sandbox do

  let(:config) do
    ::MetricFu::Configuration.configure_metric(:churn) do |metric|
      metric.instance_eval { @configured_run_options || {} }
    end
  end

  let(:settings) do
    {
      "ignore_files"        => %w(spec),
      "minimum_churn_count" => "1",
      "start_date"          => "6 months ago"
    }
  end

  describe ".load" do

    before  { prepare_settings settings, "config/metrics/churn.yml" }
    subject { try_in_sandbox { described_class.load } }

    it "configures the metric from churn.yml" do
      subject
      settings.each { |key, value| expect(config[key.to_sym]).to eq value }
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hexx-suit-1.5.0-x86_64-linux spec/tests/lib/metrics/metric_fu/churn_spec.rb
hexx-suit-1.3.0-x86_64-linux spec/tests/lib/metrics/metric_fu/churn_spec.rb
hexx-suit-1.2.0 spec/tests/lib/metrics/metric_fu/churn_spec.rb
hexx-suit-1.0.0 spec/tests/lib/metrics/metric_fu/churn_spec.rb
hexx-suit-0.2.2 spec/tests/lib/metrics/metric_fu/churn_spec.rb
hexx-suit-0.2.1 spec/tests/lib/metrics/metric_fu/churn_spec.rb
hexx-suit-0.2.0 spec/tests/lib/metrics/metric_fu/churn_spec.rb
hexx-suit-0.1.0 spec/tests/lib/metrics/metric_fu/churn_spec.rb
hexx-suit-0.0.1 spec/tests/lib/metrics/metric_fu/churn_spec.rb