diff options
| author | Moses Hohman <[email protected]> | 2013-06-27 15:36:34 -0500 |
|---|---|---|
| committer | Moses Hohman <[email protected]> | 2013-06-27 15:38:53 -0500 |
| commit | c254678321c3ae620aa8a50161331d3f3c218f78 (patch) | |
| tree | 8f6bbdff5b44918186afbeaf122bd560b60cf5a6 /test/drawing/tc_axes.rb | |
| parent | 9e2b64a27b2f13694fb1f53d1e50cc5120714521 (diff) | |
| download | caxlsx-c254678321c3ae620aa8a50161331d3f3c218f78.tar.gz caxlsx-c254678321c3ae620aa8a50161331d3f3c218f78.zip | |
Fixes Issue #202 Axes are borked in Bar3DChart by requiring axis order in the constructor
Diffstat (limited to 'test/drawing/tc_axes.rb')
| -rw-r--r-- | test/drawing/tc_axes.rb | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/test/drawing/tc_axes.rb b/test/drawing/tc_axes.rb index caa242ad..e3c26936 100644 --- a/test/drawing/tc_axes.rb +++ b/test/drawing/tc_axes.rb @@ -1,16 +1,8 @@ require 'tc_helper.rb' class TestAxes < Test::Unit::TestCase - def setup - @axes = Axlsx::Axes.new(:val_axis => Axlsx::ValAxis, :cat_axis => Axlsx::CatAxis) - end - - def test_to_xml_string_just_ids - str = '<?xml version="1.0" encoding="UTF-8"?>' - str << '<c:chartSpace xmlns:c="' << Axlsx::XML_NS_C << '" xmlns:a="' << Axlsx::XML_NS_A << '">' - @axes.to_xml_string(str, :ids => true) - cat_axis_position = str.index(@axes[:cat_axis].id.to_s) - val_axis_position = str.index(@axes[:val_axis].id.to_s) - assert(cat_axis_position < val_axis_position, "cat_axis must occur earlier than val_axis in the XML") + def test_constructor_requires_cat_axis_first + assert_raise(ArgumentError) { Axlsx::Axes.new(:val_axis => Axlsx::ValAxis, :cat_axis => Axlsx::CatAxis) } + assert_nothing_raised { Axlsx::Axes.new(:cat_axis => Axlsx::CatAxis, :val_axis => Axlsx::ValAxis) } end end
\ No newline at end of file |
