Sha256: 3b4ca0a92b4567db586dc511fb6776cf7338ddbe2c82861c7d0697563973f12b
Contents?: true
Size: 814 Bytes
Versions: 12
Compression:
Stored size: 814 Bytes
Contents
require "spec_helper" describe "Bluff graphers responding to #graph!" do before do setup_fs end after do cleanup_fs end it "should write chart file" do graphs = {} available_graphs = MetricFu::Metric.enabled_metrics.select{|m|m.has_graph?}.map(&:name) available_graphs.each do |graph| grapher_name = graph.to_s.gsub("MetricFu::",'').gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase } grapher_name = grapher_name+"Grapher" graphs[graph] = MetricFu.const_get(grapher_name).new end graphs.each do |key, val| val.graph! output_dir = File.expand_path(File.join(MetricFu::Io::FileSystem.directory('output_directory'))) expect{ File.read(File.join(output_dir, "#{key.to_s.downcase}.js")) }.not_to raise_error end end end
Version data entries
12 entries across 12 versions & 1 rubygems