Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 9219

Show
Ignore:
Timestamp:
04/03/08 18:32:10 (3 months ago)
Author:
bitsweat
Message:

Bah, don't test TMail in AM

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionmailer/test/quoting_test.rb

    r9218 r9219  
    7474  end 
    7575 
    76   def test_base64_encoding 
    77     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   end 
    83  
    8476  private 
    8577    # This whole thing *could* be much simpler, but I don't think Tempfile, 
     
    10496      File.delete(res_name) rescue nil 
    10597    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       end 
    111     else 
    112       def read_fixture(name) 
    113         File.read("#{File.dirname(__FILE__)}/fixtures/raw_base64_encoded_string") 
    114       end 
    115     end 
    11698end