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.rb31
1 files changed, 0 insertions, 31 deletions
diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb
index cdab0f9ed0..4523430ebe 100644
--- a/activesupport/test/inflector_test.rb
+++ b/activesupport/test/inflector_test.rb
@@ -1,13 +1,6 @@
require 'test/unit'
require File.dirname(__FILE__) + '/../lib/inflector'
-module A
- module B
- class C
- end
- end
-end
-
class InflectorTest < Test::Unit::TestCase
SingularToPlural = {
"search" => "searches",
@@ -57,12 +50,6 @@ class InflectorTest < Test::Unit::TestCase
"SpecialGuest" => "special_guest",
"ApplicationController" => "application_controller"
}
-
- CamelWithModuleToUnderscoreWithSlash = {
- "Admin::Product" => "admin/product",
- "Users::Commission::Department" => "users/commission/department",
- "UsersSection::CommissionDepartment" => "users_section/commission_department",
- }
ClassNameToForeignKeyWithUnderscore = {
"Person" => "person_id",
@@ -113,18 +100,6 @@ class InflectorTest < Test::Unit::TestCase
assert_equal "html_tidy_generator", Inflector.underscore("HTMLTidyGenerator")
end
- def test_camelize_with_module
- CamelWithModuleToUnderscoreWithSlash.each do |camel, underscore|
- assert_equal(camel, Inflector.camelize(underscore))
- end
- end
-
- def test_underscore_with_slashes
- CamelWithModuleToUnderscoreWithSlash.each do |camel, underscore|
- assert_equal(underscore, Inflector.underscore(camel))
- end
- end
-
def test_demodulize
assert_equal "Account", Inflector.demodulize("MyApplication::Billing::Account")
end
@@ -156,10 +131,4 @@ class InflectorTest < Test::Unit::TestCase
assert_equal(human, Inflector.humanize(underscore))
end
end
-
- def test_constantize
- assert_equal A::B::C, Inflector.constantize("A::B::C")
- assert_equal InflectorTest, Inflector.constantize("InflectorTest")
- assert_raises(NameError) { Inflector.constantize("UnknownClass") }
- end
end \ No newline at end of file