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

Changeset 8666

Show
Ignore:
Timestamp:
01/19/08 03:03:38 (8 months ago)
Author:
bitsweat
Message:

Ruby 1.9 compat: test encoding fixes. Closes #10597 [murphy]

Files:

Legend:

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

    r8565 r8666  
     1# encoding: utf-8 
    12require 'abstract_unit' 
    23require 'tmail' 
     
    3940    a ="=?ISO-8859-1?Q?Brosch=FCre_Rand?="  
    4041    b = TMail::Unquoter.unquote_and_convert_to(a, 'iso-8859-1') 
    41     assert_equal "Brosch\374re Rand", b 
     42    expected = "Brosch\374re Rand" 
     43    expected.force_encoding 'iso-8859-1' if expected.respond_to?(:force_encoding) 
     44    assert_equal expected, b 
    4245  end 
    4346     
    4447  def test_quote_multibyte_chars 
    4548    original = "\303\246 \303\270 and \303\245" 
     49    original.force_encoding nil if original.respond_to?(:force_encoding) 
    4650 
    4751    result = execute_in_sandbox(<<-CODE)