mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Bah, don't test TMail in AM
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9219 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
BIN
actionmailer/test/fixtures/raw_base64_decoded_string
vendored
BIN
actionmailer/test/fixtures/raw_base64_decoded_string
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 8.4 KiB |
File diff suppressed because one or more lines are too long
@@ -73,14 +73,6 @@ class QuotingTest < Test::Unit::TestCase
|
||||
assert_equal "Re: Test: \"\346\274\242\345\255\227\" mid \"\346\274\242\345\255\227\" tail", mail.subject
|
||||
end
|
||||
|
||||
def test_base64_encoding
|
||||
encoded = read_fixture('raw_base64_encoded_string')
|
||||
decoded = read_fixture('raw_base64_decoded_string')
|
||||
|
||||
assert_equal encoded, TMail::Base64.encode(decoded)
|
||||
assert_equal decoded, TMail::Base64.decode(encoded)
|
||||
end
|
||||
|
||||
private
|
||||
# This whole thing *could* be much simpler, but I don't think Tempfile,
|
||||
# popen and others exist on all platforms (like Windows).
|
||||
@@ -103,14 +95,4 @@ class QuotingTest < Test::Unit::TestCase
|
||||
File.delete(test_name) rescue nil
|
||||
File.delete(res_name) rescue nil
|
||||
end
|
||||
|
||||
if RUBY_VERSION >= '1.9'
|
||||
def read_fixture(name)
|
||||
File.open("#{File.dirname(__FILE__)}/fixtures/raw_base64_encoded_string", 'r:ascii-8bit') { |f| f.read }
|
||||
end
|
||||
else
|
||||
def read_fixture(name)
|
||||
File.read("#{File.dirname(__FILE__)}/fixtures/raw_base64_encoded_string")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user