spec/graphs/engines/gchart_spec.rb in metric_fu-2.0.0 vs spec/graphs/engines/gchart_spec.rb in metric_fu-2.0.1

- old
+ new

@@ -16,27 +16,27 @@ grapher = Object.new.extend(MetricFu::GchartGrapher) grapher.determine_y_axis_scale([]) grapher.instance_variable_get(:@max_value).should == 10 grapher.instance_variable_get(:@yaxis).should == [0, 2, 4, 6, 8, 10] end - + it "should set max value of the graph above largest value" do grapher = Object.new.extend(MetricFu::GchartGrapher) grapher.determine_y_axis_scale([19]) grapher.instance_variable_get(:@max_value).should == 20 - + grapher.determine_y_axis_scale([20]) grapher.instance_variable_get(:@max_value).should == 25 end end end describe "Gchart graphers" do before :each do MetricFu::Configuration.run {|config| config.graph_engine = :gchart} end - + describe "FlayGchartGrapher graph! method" do it "should set static values for graph" do grapher = FlayGchartGrapher.new expected = { :size => MetricFu::GchartGrapher::GCHART_GRAPH_SIZE, @@ -47,11 +47,11 @@ } Gchart.should_receive(:line).with(hash_including(expected)) grapher.graph! end end - + describe "FlogGchartGrapher graph! method" do it "should set static values for graph" do grapher = FlogGchartGrapher.new expected = { :size => MetricFu::GchartGrapher::GCHART_GRAPH_SIZE, @@ -66,11 +66,11 @@ } Gchart.should_receive(:line).with(hash_including(expected)) grapher.graph! end end - + describe "RcovGchartGrapher graph! method" do it "should set static values for graph" do grapher = RcovGchartGrapher.new expected = { :size => MetricFu::GchartGrapher::GCHART_GRAPH_SIZE, @@ -83,11 +83,11 @@ } Gchart.should_receive(:line).with(hash_including(expected)) grapher.graph! end end - + describe "ReekGchartGrapher graph! method" do it "should set static values for graph" do grapher = ReekGchartGrapher.new expected = { :size => MetricFu::GchartGrapher::GCHART_GRAPH_SIZE, @@ -100,11 +100,11 @@ } Gchart.should_receive(:line).with(hash_including(expected)) grapher.graph! end end - + describe "RoodiGchartGrapher graph! method" do it "should set static values for graph" do grapher = RoodiGchartGrapher.new expected = { :size => MetricFu::GchartGrapher::GCHART_GRAPH_SIZE, @@ -115,10 +115,10 @@ } Gchart.should_receive(:line).with(hash_including(expected)) grapher.graph! end end - + describe "StatsGchartGrapher graph! method" do it "should set static values for graph" do grapher = StatsGchartGrapher.new expected = { :size => MetricFu::GchartGrapher::GCHART_GRAPH_SIZE,