diff options
| author | Jurriaan Pruis <[email protected]> | 2012-03-27 13:55:42 +0200 |
|---|---|---|
| committer | Jurriaan Pruis <[email protected]> | 2012-03-27 13:55:42 +0200 |
| commit | 3867eb132f20c3258f007ca61a738e90a09087dc (patch) | |
| tree | e8d0b196badf01ceefe56aa02ac40ad82371afce /test/drawing/tc_pic.rb | |
| parent | 5afd30be1774fb5255dad2eb18c700d0d8f4a628 (diff) | |
| parent | be2d7bee9b9236fff4a378db8770c3ae793e8422 (diff) | |
| download | caxlsx-3867eb132f20c3258f007ca61a738e90a09087dc.tar.gz caxlsx-3867eb132f20c3258f007ca61a738e90a09087dc.zip | |
Merge github.com:randym/axlsx
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 |
