summaryrefslogtreecommitdiff
path: root/test/rss/rss-assertions.rb
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-01 18:17:59 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-01 18:17:59 +0000
commit202ac43838852cfb15a163e46861e0b49b66926b (patch)
treebc24428981760f434932564e1f44be8c88824356 /test/rss/rss-assertions.rb
parent88655573fcf6d8bc57bdd4441222ee54ecf66ef5 (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/rss-assertions.rb')
-rw-r--r--test/rss/rss-assertions.rb16
1 files changed, 5 insertions, 11 deletions
diff --git a/test/rss/rss-assertions.rb b/test/rss/rss-assertions.rb
index 41e6cd62c5..0d0d2cbe4f 100644
--- a/test/rss/rss-assertions.rb
+++ b/test/rss/rss-assertions.rb
@@ -557,20 +557,14 @@ EOA
def assert_atom_content_inline_other_text(generator)
_wrap_assertion do
- require "zlib"
-
- type = "application/zip"
+ type = "image/png"
assert_parse(generator.call(<<-EOA), :nothing_raised)
<content type="#{type}"/>
EOA
- text = ""
- char = "a"
- 100.times do |i|
- text << char
- char.succ!
- end
- base64_content = Base64.encode64(Zlib::Deflate.deflate(text))
+ png_file = File.join(File.dirname(__FILE__), "dot.png")
+ png = File.open(png_file, "rb") {|file| file.read}
+ base64_content = [png].pack("m").delete("\n")
[false, true].each do |with_space|
xml_content = base64_content
@@ -591,7 +585,7 @@ EOA
assert(content.inline_other_base64?)
assert(!content.out_of_line?)
assert(!content.have_xml_content?)
- assert_equal(text, Zlib::Inflate.inflate(content.content))
+ assert_equal(png, content.content)
xml = REXML::Document.new(content.to_s).root
assert_rexml_element([], {"type" => type}, base64_content, xml)