提交 4bd8ccd9 编写于 作者: V Vipul A M

fix repeat of test; remove unused variable by use of each_key

上级 b365354e
......@@ -324,7 +324,7 @@ def test_dasherize
end
def test_underscore_as_reverse_of_dasherize
UnderscoresToDashes.each do |underscored, dasherized|
UnderscoresToDashes.each_key do |underscored|
assert_equal(underscored, ActiveSupport::Inflector.underscore(ActiveSupport::Inflector.dasherize(underscored)))
end
end
......
......@@ -17,7 +17,7 @@ def test_transliterate_should_approximate_ascii
# some reason or other are floating in the middle of all the letters.
string = (0xC0..0x17E).to_a.reject {|c| [0xD7, 0xF7].include?(c)}.pack("U*")
string.each_char do |char|
assert_match %r{^[a-zA-Z']*$}, ActiveSupport::Inflector.transliterate(string)
assert_match %r{^[a-zA-Z']*$}, ActiveSupport::Inflector.transliterate(char)
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册