Sha256: 6a7d568c8adda7dd5184ac565d23cf9c67db2285c7ac7f51fb994ee6f10fc1c9
Contents?: true
Size: 642 Bytes
Versions: 2
Compression:
Stored size: 642 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_graph_types Grafico::Helpers::GRAPH_TYPES.each do |type| assert_equal @helper.send(:"#{type.underscore}_tag", 'my_element', [1, 2, 3]), wrap_as_javascript("var my_element#{type} = new Grafico.#{type}($('my_element'), [1,2,3]);") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
grafico-0.2.5 | test/test_grafico.rb |
grafico-0.2.4 | test/test_grafico.rb |