aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorYuki Nishijima <mail@yukinishijima.net>2014-06-24 10:07:29 -0700
committerYuki Nishijima <mail@yukinishijima.net>2014-06-24 10:13:17 -0700
commit98f0cab3965bf5f373182ee62c20c3d94fb47dad (patch)
tree222bd9377f98a2c678f00c1df6e7b4f8bc933e0e /activesupport/test
parent44c9489a687016c599a2470ee06885c431b7b810 (diff)
downloadrails-98f0cab3965bf5f373182ee62c20c3d94fb47dad.tar.gz
rails-98f0cab3965bf5f373182ee62c20c3d94fb47dad.tar.bz2
rails-98f0cab3965bf5f373182ee62c20c3d94fb47dad.zip
Fix a bug where NameError#name returns a qualified name in string
Ruby's original behaviour is that : * It only returns a const name, not a qualified aname * It returns a symbol, not a string
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/dependencies_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb
index ef0955e1a8..a013aadd67 100644
--- a/activesupport/test/dependencies_test.rb
+++ b/activesupport/test/dependencies_test.rb
@@ -367,11 +367,11 @@ class DependenciesTest < ActiveSupport::TestCase
with_autoloading_fixtures do
e = assert_raise(NameError) { A::DoesNotExist.nil? }
assert_equal "uninitialized constant A::DoesNotExist", e.message
- assert_equal "A::DoesNotExist", e.name
+ assert_equal :DoesNotExist, e.name
e = assert_raise(NameError) { A::B::DoesNotExist.nil? }
assert_equal "uninitialized constant A::B::DoesNotExist", e.message
- assert_equal "A::B::DoesNotExist", e.name
+ assert_equal :DoesNotExist, e.name
end
end
@@ -539,7 +539,7 @@ class DependenciesTest < ActiveSupport::TestCase
mod = Module.new
e = assert_raise(NameError) { mod::E }
assert_equal 'E cannot be autoloaded from an anonymous class or module', e.message
- assert_equal 'E', e.name
+ assert_equal :E, e.name
end
end