diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-09-25 14:42:28 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-09-25 14:42:28 -0700 |
commit | 267c3d0f14d094c5aa24016e0938d79a6eafc6ef (patch) | |
tree | b3c17f4fb08a5e7c8e62d6f1667b3ce7a0f0b944 /activesupport/lib | |
parent | d665f91d412a29d7bd93db38b8fdbc07ed50c510 (diff) | |
parent | b13400086c2d39a5bbc5e8a6ea26434e842fbb10 (diff) | |
download | rails-267c3d0f14d094c5aa24016e0938d79a6eafc6ef.tar.gz rails-267c3d0f14d094c5aa24016e0938d79a6eafc6ef.tar.bz2 rails-267c3d0f14d094c5aa24016e0938d79a6eafc6ef.zip |
Merge pull request #7759 from blowmage/minitest
Add missing inflector dependency
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/testing/constant_lookup.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/testing/constant_lookup.rb b/activesupport/lib/active_support/testing/constant_lookup.rb index 8cb84b3f20..73e87befb6 100644 --- a/activesupport/lib/active_support/testing/constant_lookup.rb +++ b/activesupport/lib/active_support/testing/constant_lookup.rb @@ -1,4 +1,5 @@ require "active_support/concern" +require "active_support/inflector" module ActiveSupport module Testing @@ -33,9 +34,7 @@ module ActiveSupport def determine_constant_from_test_name(test_name) names = test_name.split "::" while names.size > 0 do - names.last.sub! /Test$/, "" - # Rails 3.0 doesn't have safe_constantize, - # so we'll do it the hard way. + names.last.sub!(/Test$/, "") begin constant = names.join("::").constantize break(constant) if yield(constant) |