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
1
2 require File.dirname(__FILE__) + "/gruff_test_case"
3
4 class TestMiniBar < GruffTestCase
5   
6   def test_simple_bar
7     setup_single_dataset
8     g = setup_basic_graph(Gruff::Mini::Bar, 200)
9     write_test_file g, 'mini_bar.png'
10   end
11
12   # def test_simple_bar_wide_dataset
13   #   setup_wide_dataset
14   #   g = setup_basic_graph(Gruff::Mini::Bar, 200)
15   #   write_test_file g, 'mini_bar_wide_data.png'
16   # end
17   # 
18   # def test_code_sample
19   #   g = Gruff::Mini::Bar.new(200)
20   #   g.data "Jim", [200, 500, 400]
21   #   g.labels = { 0 => 'This Month', 1 => 'Average', 2 => 'Overall'}
22   #   g.write "mini_bar_one_color.png"
23   #   
24   #   g = Gruff::Mini::Bar.new(200)
25   #   g.data "Car", 200
26   #   g.data "Food", 500
27   #   g.data "Art", 1000
28   #   g.data "Music", 16
29   #   g.write "mini_bar_many_colors.png"
30   # end
31
32 end

Benjamin Mako Hill || Want to submit a patch?