class Test::Unit::TestTemplate

Public Instance Methods

test_incompatible_encoding_by_diff() click to toggle source
# File test-unit-3.3.4/test/test-assertions.rb, line 2172
def test_incompatible_encoding_by_diff
  need_encoding
  assert_raise(AssertionFailedError) do
    assert_equal("UTF-8の日本語\n" * 3,
                 ("Shift_JISの日本語\n" * 3).force_encoding("ASCII-8BIT"))
  end
end

Private Instance Methods

need_encoding() click to toggle source
# File test-unit-3.3.4/test/test-assertions.rb, line 2181
def need_encoding
  omit("need Encoding") unless Object.const_defined?(:Encoding)
end