1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activesupport/test/gzip_test.rb
Santiago Pastorino and Emilio Tagua 0faa7ee2a0 Add missing require
2011-02-09 08:36:44 -02:00

18 lines
570 B
Ruby

require 'abstract_unit'
require 'active_support/core_ext/object/blank'
class GzipTest < Test::Unit::TestCase
def test_compress_should_decompress_to_the_same_value
assert_equal "Hello World", ActiveSupport::Gzip.decompress(ActiveSupport::Gzip.compress("Hello World"))
end
def test_compress_should_return_a_binary_string
compressed = ActiveSupport::Gzip.compress('')
if "".encoding_aware?
assert_equal Encoding.find('binary'), compressed.encoding
end
assert !compressed.blank?, "a compressed blank string should not be blank"
end
end