diff --git a/test/test_all.rb b/test/test_all.rb index 272d83d..98a2ff6 100644 --- a/test/test_all.rb +++ b/test/test_all.rb @@ -18,6 +18,7 @@ def setup 115 120 130 140 150 160 170 100 100 10).map {|i| i.to_f} @nil_data = @data.dup [5, 10, 11, 20, 25, 26, 27].each {|i| @nil_data[i] = nil} + @constant_data = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1] end test "basic bullet" do @@ -112,6 +113,10 @@ def test_each_graph_with_nil end end + def test_smooth_graph_with_target_and_constant_data + constant_graph("constant_smooth", :type => 'smooth', :label => 'a-label', :target => 1) + end + def test_whisker_decimals @data = (1..200).map {|n| n.to_f/100 } quick_graph("labeled_whisker_decimals", { @@ -306,6 +311,10 @@ def nil_graph(name, options) Sparklines.plot_to_file("#{@output_dir}/#{name}.png", @nil_data, options) end + def constant_graph(name, options) + Sparklines.plot_to_file("#{@output_dir}/#{name}.png", @constant_data, options) + end + end # HACK Make reference HTML file for viewing output