diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-01 18:17:59 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-01 18:17:59 +0000 |
commit | 202ac43838852cfb15a163e46861e0b49b66926b (patch) | |
tree | bc24428981760f434932564e1f44be8c88824356 /test/rss/test_atom.rb | |
parent | 88655573fcf6d8bc57bdd4441222ee54ecf66ef5 (diff) |
merge revision(s) 18246:
* test/rss/: use PNG instead of zlib as binary data. [ruby-dev:35666]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@21262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rss/test_atom.rb')
-rw-r--r-- | test/rss/test_atom.rb | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/test/rss/test_atom.rb b/test/rss/test_atom.rb index c442c753b2..d573b923cc 100644 --- a/test/rss/test_atom.rb +++ b/test/rss/test_atom.rb @@ -641,24 +641,17 @@ module RSS def assert_atom_content_inline_other_base64_to_s(target_class) _wrap_assertion do - require "zlib" - - text = "" - char = "a" - 100.times do |i| - text << char - char.succ! - end - - type = "application/zip" - original_content = Zlib::Deflate.deflate(text) + type = "image/png" + png_file = File.join(File.dirname(__FILE__), "dot.png") + original_content = File.open(png_file, "rb") {|file| file.read} content = target_class.new content.type = type content.content = original_content xml = REXML::Document.new(content.to_s).root assert_rexml_element([], {"type" => type}, - Base64.encode64(original_content), xml) + [original_content].pack("m").delete("\n"), + xml) end end |