diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-28 12:33:44 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-28 12:33:44 +0000 |
commit | bac3ea1fca1ed30098e74dd7296836aee413c31a (patch) | |
tree | 0868dcda3aee0ce58b46ac83dec75f36f41790f3 /test/rss/test_atom.rb | |
parent | a73ba1def712921b5ab6d13dd8055cbb687c4641 (diff) |
* test/rss/: use PNG instead of zlib as binary data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18249 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, 6 insertions, 11 deletions
diff --git a/test/rss/test_atom.rb b/test/rss/test_atom.rb index 1f65008fa0..71e0f44ea9 100644 --- a/test/rss/test_atom.rb +++ b/test/rss/test_atom.rb @@ -641,24 +641,19 @@ 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! + type = "image/png" + png_file = File.join(File.dirname(__FILE__), "dot.png") + original_content = File.open(png_file, "rb") do |file| + file.read.force_encoding("binary") end - type = "application/zip" - original_content = Zlib::Deflate.deflate(text) - content = target_class.new content.type = type content.content = original_content xml = REXML::Document.new(content.to_s).root assert_rexml_element([], {"type" => type}, - [original_content].pack("m").delete("\n"), xml) + [original_content].pack("m").delete("\n"), + xml) end end |