Sha256: 967780b73b5319bffa0a5ecd436f42f24dcf6d112c310f06aa84562e3d32eb0d

Contents?: true

Size: 791 Bytes

Versions: 4

Compression:

Stored size: 791 Bytes

Contents

require 'helper'

class TestGrafico < Test::Unit::TestCase
  def setup
    @helper = TestHelper.new
  end
  
  def test_setup
    assert_instance_of TestHelper, @helper
  end
  
  def test_graph_tag
    assert_equal @helper.graph_tag('FooGraph', 'my_element', [1, 2, 3]), wrap_as_javascript("var my_elementFooGraph = new Grafico.FooGraph($('my_element'), [1,2,3]);")
  end

  def test_line_graph_tag
    assert_equal @helper.line_graph_tag('my_element', [1, 2, 3]), wrap_as_javascript("var my_elementLineGraph = new Grafico.LineGraph($('my_element'), [1,2,3]);")
  end

  def test_sparkline_tag
    assert_equal @helper.line_graph_tag('my_element', [1, 2, 3]), wrap_as_javascript("var my_elementSparkLine = new Grafico.SparkLine($('my_element'), [1,2,3]);")
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
grafico-0.2.3 test/test_grafico.rb
grafico-0.2.2 test/test_grafico.rb
grafico-0.2.1 test/test_grafico.rb
grafico-0.2.0 test/test_grafico.rb