Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixing a spec for google graphs

  • Loading branch information...
commit 1c9bb5fc8b005d6dce060635fb368327f05c1e42 1 parent 015d2bf
@jscruggs jscruggs authored
Showing with 7 additions and 9 deletions.
  1. +7 −9 spec/graphs/engines/gchart_spec.rb
View
16 spec/graphs/engines/gchart_spec.rb
@@ -1,15 +1,13 @@
require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
describe "Gchart graphers responding to #graph!" do
- it "should write chart file" do
- MetricFu.configuration
- graphs = {}
- MetricFu::AVAILABLE_GRAPHS.each do |graph|
- graphs[graph] = MetricFu.const_get("#{graph.to_s.capitalize}GchartGrapher").new
- end
- graphs.each do |key, val|
- val.graph!
- lambda{ File.open(File.join(MetricFu.output_directory, "#{key.to_s.downcase}.png")) }.should_not raise_error
+ MetricFu::AVAILABLE_GRAPHS.each do |metric|
+ it "should write chart file for #{metric}" do
+ MetricFu.configuration
+ 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
Please sign in to comment.
Something went wrong with that request. Please try again.