From 515feb1fd61184cb14840a8f3b82ba3c388fdc3c Mon Sep 17 00:00:00 2001 From: Fred Wu Date: Fri, 9 Nov 2012 22:09:01 +1100 Subject: Fixed a bug where the inflector would replace camelCase strings and disregarding specified acronyms, fixes #8015 --- activesupport/test/inflector_test.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activesupport/test') diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb index 4806ce07f6..2b74055e68 100644 --- a/activesupport/test/inflector_test.rb +++ b/activesupport/test/inflector_test.rb @@ -167,11 +167,13 @@ class InflectorTest < ActiveSupport::TestCase def test_underscore_acronym_sequence ActiveSupport::Inflector.inflections do |inflect| inflect.acronym("API") + inflect.acronym("APIs") inflect.acronym("JSON") inflect.acronym("HTML") end assert_equal("json_html_api", ActiveSupport::Inflector.underscore("JSONHTMLAPI")) + assert_equal("namespaced/apis", ActiveSupport::Inflector.underscore("Namespaced::APIs")) end def test_underscore -- cgit v1.2.3