Sha256: bc6784a3743367e6af8831f902cc7e4c8146c339a4224d4aeb2febe7d307c20e

Contents?: true

Size: 719 Bytes

Versions: 3

Compression:

Stored size: 719 Bytes

Contents

require "spec_helper"

describe Roodi do
  describe "emit" do
    it "should add config options when present" do
      MetricFu::Configuration.run do |config|
        config.roodi = {:roodi_config => 'lib/config/roodi_config.yml', :dirs_to_roodi => []}
      end
      roodi = MetricFu::Roodi.new
      roodi.should_receive(:`).with(/-config=lib\/config\/roodi_config\.yml/).and_return("")
      roodi.emit
    end

    it "should NOT add config options when NOT present" do
      MetricFu::Configuration.run do |config|
        config.roodi = {:dirs_to_roodi => []}
      end
      roodi = MetricFu::Roodi.new
      roodi.stub(:`)
      roodi.should_receive(:`).with(/-config/).never
      roodi.emit
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
metric_fu-2.1.4.pre4 spec/metric_fu/metrics/roodi/roodi_spec.rb
metric_fu-2.1.4.pre2 spec/metric_fu/metrics/roodi/roodi_spec.rb
metric_fu-2.1.4.pre spec/metric_fu/metrics/roodi/roodi_spec.rb