forked from jscruggs/metric_fu
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
7 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |