Added the Gruff library to the lib/ directory of the the rails folder, and the
[selectricity] / lib / gruff-0.2.8 / test / test_mini_bar.rb
diff --git a/lib/gruff-0.2.8/test/test_mini_bar.rb b/lib/gruff-0.2.8/test/test_mini_bar.rb
new file mode 100644 (file)
index 0000000..1850725
--- /dev/null
@@ -0,0 +1,32 @@
+
+require File.dirname(__FILE__) + "/gruff_test_case"
+
+class TestMiniBar < GruffTestCase
+  
+  def test_simple_bar
+    setup_single_dataset
+    g = setup_basic_graph(Gruff::Mini::Bar, 200)
+    write_test_file g, 'mini_bar.png'
+  end
+
+  # def test_simple_bar_wide_dataset
+  #   setup_wide_dataset
+  #   g = setup_basic_graph(Gruff::Mini::Bar, 200)
+  #   write_test_file g, 'mini_bar_wide_data.png'
+  # end
+  # 
+  # def test_code_sample
+  #   g = Gruff::Mini::Bar.new(200)
+  #   g.data "Jim", [200, 500, 400]
+  #   g.labels = { 0 => 'This Month', 1 => 'Average', 2 => 'Overall'}
+  #   g.write "mini_bar_one_color.png"
+  #   
+  #   g = Gruff::Mini::Bar.new(200)
+  #   g.data "Car", 200
+  #   g.data "Food", 500
+  #   g.data "Art", 1000
+  #   g.data "Music", 16
+  #   g.write "mini_bar_many_colors.png"
+  # end
+
+end

Benjamin Mako Hill || Want to submit a patch?