Sha256: 1c13f381487cc66553f1adc2fd56a4806344834f9f43ec635d7c00e951a2a785

Contents?: true

Size: 726 Bytes

Versions: 1

Compression:

Stored size: 726 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")

describe "Bluff graphers responding to #graph!" do
  it "should write chart file" do
    MetricFu.configuration
    graphs = {}
    MetricFu::AVAILABLE_GRAPHS.each do |graph|
      grapher_name = graph.to_s.gsub("MetricFu::",'').gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase }
      grapher_name =  grapher_name+"BluffGrapher"
      graphs[graph] = MetricFu.const_get(grapher_name).new
    end
    graphs.each do |key, val|
      val.graph!
      output_dir = File.expand_path(File.join(MetricFu.output_directory))
      lambda{ File.open(File.join(output_dir, "#{key.to_s.downcase}.js")) }.should_not raise_error
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
devver-metric_fu-1.3.3 spec/graphs/engines/bluff_spec.rb