Permalink
Browse files

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

  • Loading branch information...
1 parent b365354 commit 4bd8ccd98472f7ea65fd6d4ff85dbafa348be331 @vipulnsward vipulnsward committed Mar 17, 2013
Showing with 2 additions and 2 deletions.
  1. +1 −1 activesupport/test/inflector_test.rb
  2. +1 −1 activesupport/test/transliterate_test.rb
@@ -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

0 comments on commit 4bd8ccd

Please sign in to comment.