Sha256: 019ba22c6b5977112f339ec0a4f003b5a004b3f2dfbd28639e442f516c0540e1

Contents?: true

Size: 722 Bytes

Versions: 4

Compression:

Stored size: 722 Bytes

Contents

require "spec_helper"
MetricFu.metrics_require { 'roodi/roodi' }

describe MetricFu::RoodiGenerator do
  describe "emit" do
    it "should add config options when present" do
      options = {:roodi_config => 'lib/config/roodi_config.yml', :dirs_to_roodi => []}
      roodi = MetricFu::RoodiGenerator.new(options)
      expect(roodi).to receive(:run!).with(/-config=lib\/config\/roodi_config\.yml/).and_return("")
      roodi.emit
    end

    it "should NOT add config options when NOT present" do
      options = {:dirs_to_roodi => []}
      roodi = MetricFu::RoodiGenerator.new(options)
      allow(roodi).to receive(:run!)
      expect(roodi).to receive(:run!).with(/-config/).never
      roodi.emit
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
metric_fu-4.7.3 spec/metric_fu/metrics/roodi/roodi_spec.rb
metric_fu-4.7.2 spec/metric_fu/metrics/roodi/roodi_spec.rb
metric_fu-4.7.1 spec/metric_fu/metrics/roodi/roodi_spec.rb
metric_fu-4.7.0 spec/metric_fu/metrics/roodi/roodi_spec.rb