diff options
| author | Randy Morgan <[email protected]> | 2012-03-23 23:52:34 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-03-23 23:52:34 +0900 |
| commit | ad7119b5927584e4fc735ce72ea69322c3e9acac (patch) | |
| tree | b9ac11d22433f133bb1644b8c26bdd4a0886c555 /test/drawing/tc_pic.rb | |
| parent | cd6fb747bbf2915f92f1fb0169e7f54d87aa1915 (diff) | |
| download | caxlsx-ad7119b5927584e4fc735ce72ea69322c3e9acac.tar.gz caxlsx-ad7119b5927584e4fc735ce72ea69322c3e9acac.zip | |
move requires out of specs and into helper that prepends lib directory for requires
Diffstat (limited to 'test/drawing/tc_pic.rb')
| -rw-r--r-- | test/drawing/tc_pic.rb | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/test/drawing/tc_pic.rb b/test/drawing/tc_pic.rb index 9e4d62e6..83ed4e1d 100644 --- a/test/drawing/tc_pic.rb +++ b/test/drawing/tc_pic.rb @@ -1,5 +1,4 @@ -require 'test/unit' -require 'axlsx.rb' +require 'tc_helper.rb' class TestPic < Test::Unit::TestCase @@ -17,7 +16,7 @@ class TestPic < Test::Unit::TestCase assert_equal(@p.workbook.images.first, @image) assert_equal(@image.image_src, @test_img) end - + def test_hyperlink assert_equal(@image.hyperlink, nil) @image.hyperlink = "http://axlsx.blogspot.com" @@ -40,13 +39,13 @@ class TestPic < Test::Unit::TestCase def test_width assert_raise(ArgumentError) { @image.width = "a" } assert_nothing_raised { @image.width = 600 } - assert_equal(@image.width, 600) + assert_equal(@image.width, 600) end def test_height assert_raise(ArgumentError) { @image.height = "a" } assert_nothing_raised { @image.height = 600 } - assert_equal(600, @image.height) + assert_equal(600, @image.height) end def test_image_src @@ -62,7 +61,7 @@ class TestPic < Test::Unit::TestCase assert_nothing_raised { @image.descr = "test" } assert_equal(@image.descr, "test") end - + def test_to_xml schema = Nokogiri::XML::Schema(File.open(Axlsx::DRAWING_XSD)) doc = Nokogiri::XML(@image.anchor.drawing.to_xml) @@ -72,6 +71,6 @@ class TestPic < Test::Unit::TestCase puts error.message end assert(errors.empty?, "error free validation") - end - + end + end |
