Skip to content

Instantly share code, notes, and snippets.

@benhamill
Created September 6, 2013 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benhamill/6467858 to your computer and use it in GitHub Desktop.
Save benhamill/6467858 to your computer and use it in GitHub Desktop.
gem 'activesupport', '4.0.0'
require 'minitest/autorun'
require 'active_support/inflector'
class BugTest < MiniTest::Unit::TestCase
def test_underscore_knows_about_acronyms_in_directories
ActiveSupport::Inflector.inflections(:en) do |inflect|
inflect.acronym 'OAuth'
end
assert_equal "oauth_thing", "OAuthThing".underscore # passes
assert_equal "foo/oauth_thing", "Foo::OAuthThing".underscore # fails
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment