aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/inflector_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/inflector_test.rb')
-rw-r--r--activesupport/test/inflector_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb
index 995871f826..d92b4a76a8 100644
--- a/activesupport/test/inflector_test.rb
+++ b/activesupport/test/inflector_test.rb
@@ -276,6 +276,11 @@ class InflectorTest < Test::Unit::TestCase
assert_equal Ace::Base::Case, Inflector.constantize("Ace::Base::Case")
assert_equal InflectorTest, Inflector.constantize("InflectorTest")
assert_raises(NameError) { Inflector.constantize("UnknownClass") }
+ assert_raises(NameError) { Inflector.constantize("An invalid string") }
+ end
+
+ def test_constantize_doesnt_look_in_parent
+ assert_raises(NameError) { Inflector.constantize("Ace::Base::InflectorTest") }
end
def test_ordinal