Sha256: 0aa6f3ca7f780985dc0920812fec8d8b67ef304e39a64cae682c1b9ae46bf11c

Contents?: true

Size: 686 Bytes

Versions: 1

Compression:

Stored size: 686 Bytes

Contents

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

describe "Gchart graphers responding to #graph!" do
  MetricFu::AVAILABLE_GRAPHS.each do |metric|
    it "should write chart file for #{metric}" do
      MetricFu.configuration
      puts "#{metric.to_s.capitalize}GchartGrapher"
      grapher = MetricFu.const_get("#{metric.to_s.capitalize}GchartGrapher").new
      grapher.flog_average, grapher.top_five_percent_average = [7.0],[20.0] if metric == :flog #googlecharts gem has problems with [[],[]] as data
      grapher.graph!
      lambda{ File.open(File.join(MetricFu.output_directory, "#{metric.to_s.downcase}.png")) }.should_not raise_error
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
edouard-metric_fu-1.2.0 spec/graphs/engines/gchart_spec.rb