Skip to content

Commit

Permalink
fix repeat of test; remove unused variable by use of each_key
Browse files Browse the repository at this point in the history
  • Loading branch information
vipulnsward committed Mar 18, 2013
1 parent b365354 commit 4bd8ccd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion activesupport/test/inflector_test.rb
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion activesupport/test/transliterate_test.rb
Expand Up @@ -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

Expand Down

0 comments on commit 4bd8ccd

Please sign in to comment.