aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/kernel_test.rb11
-rw-r--r--activesupport/test/core_ext/object_and_class_ext_test.rb5
-rw-r--r--activesupport/test/inflector_test_cases.rb2
3 files changed, 13 insertions, 5 deletions
diff --git a/activesupport/test/core_ext/kernel_test.rb b/activesupport/test/core_ext/kernel_test.rb
index 1dfc283268..c22af89918 100644
--- a/activesupport/test/core_ext/kernel_test.rb
+++ b/activesupport/test/core_ext/kernel_test.rb
@@ -41,6 +41,17 @@ class KernelTest < Test::Unit::TestCase
def test_silence_stderr_with_return_value
assert_equal 1, silence_stderr { 1 }
end
+
+ def test_singleton_class
+ o = Object.new
+ assert_equal class << o; self end, o.singleton_class
+ end
+
+ def test_class_eval
+ o = Object.new
+ class << o; @x = 1; end
+ assert_equal 1, o.class_eval { @x }
+ end
end
class KernelSupressTest < Test::Unit::TestCase
diff --git a/activesupport/test/core_ext/object_and_class_ext_test.rb b/activesupport/test/core_ext/object_and_class_ext_test.rb
index 437bb78a4e..5e03389dc2 100644
--- a/activesupport/test/core_ext/object_and_class_ext_test.rb
+++ b/activesupport/test/core_ext/object_and_class_ext_test.rb
@@ -118,11 +118,6 @@ class ObjectTests < ActiveSupport::TestCase
assert duck.acts_like?(:time)
assert !duck.acts_like?(:date)
end
-
- def test_singleton_class
- o = Object.new
- assert_equal class << o; self end, o.singleton_class
- end
end
class ObjectInstanceVariableTest < Test::Unit::TestCase
diff --git a/activesupport/test/inflector_test_cases.rb b/activesupport/test/inflector_test_cases.rb
index 8dad9d8155..29f87ac302 100644
--- a/activesupport/test/inflector_test_cases.rb
+++ b/activesupport/test/inflector_test_cases.rb
@@ -12,6 +12,8 @@ module InflectorTestCases
"stack" => "stacks",
"wish" => "wishes",
"fish" => "fish",
+ "jeans" => "jeans",
+ "funky jeans" => "funky jeans",
"category" => "categories",
"query" => "queries",