Work around assert_raise limitation

This commit is contained in:
Jeremy Kemper
2009-11-08 22:01:50 -08:00
parent 20cdaddfd2
commit deddd55086

View File

@@ -229,9 +229,9 @@ class MultibyteCharsUTF8BehaviourTest < Test::Unit::TestCase
end
def test_include_raises_when_nil_is_passed
assert_raise(RUBY_VERSION >= '1.9.2' ? NoMethodError : TypeError) do
@chars.include?(nil)
end
@chars.include?(nil)
flunk "Expected chars.include?(nil) to raise TypeError or NoMethodError"
rescue Exception => e
end
def test_index_should_return_character_offset