Changeset 9219
- Timestamp:
- 04/03/08 18:32:10 (3 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionmailer/test/quoting_test.rb
r9218 r9219 74 74 end 75 75 76 def test_base64_encoding77 encoded = read_fixture('raw_base64_encoded_string')78 decoded = read_fixture('raw_base64_decoded_string')79 80 assert_equal encoded, TMail::Base64.encode(decoded)81 assert_equal decoded, TMail::Base64.decode(encoded)82 end83 84 76 private 85 77 # This whole thing *could* be much simpler, but I don't think Tempfile, … … 104 96 File.delete(res_name) rescue nil 105 97 end 106 107 if RUBY_VERSION >= '1.9'108 def read_fixture(name)109 File.open("#{File.dirname(__FILE__)}/fixtures/raw_base64_encoded_string", 'r:ascii-8bit') { |f| f.read }110 end111 else112 def read_fixture(name)113 File.read("#{File.dirname(__FILE__)}/fixtures/raw_base64_encoded_string")114 end115 end116 98 end