aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/deprecation_test.rb
diff options
context:
space:
mode:
authorTony Novak <tony@amitree.com>2016-02-10 13:02:18 -0500
committerTony Novak <tony@amitree.com>2016-02-10 13:02:18 -0500
commit03980b2a0e7797d8e24b9fb6ebd96693bc95b326 (patch)
treed4cbde83c85a954ac084532bf347515dba77c1cc /activesupport/test/deprecation_test.rb
parent688996da7b25080a1a2ef74f5b4789f3e5eb670d (diff)
downloadrails-03980b2a0e7797d8e24b9fb6ebd96693bc95b326.tar.gz
rails-03980b2a0e7797d8e24b9fb6ebd96693bc95b326.tar.bz2
rails-03980b2a0e7797d8e24b9fb6ebd96693bc95b326.zip
Converting backtrace to strings before calling set_backtrace
Fixes #23058
Diffstat (limited to 'activesupport/test/deprecation_test.rb')
-rw-r--r--activesupport/test/deprecation_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/test/deprecation_test.rb b/activesupport/test/deprecation_test.rb
index 58a0a3964d..45c88b79cb 100644
--- a/activesupport/test/deprecation_test.rb
+++ b/activesupport/test/deprecation_test.rb
@@ -105,13 +105,13 @@ class DeprecationTest < ActiveSupport::TestCase
ActiveSupport::Deprecation.behavior = :raise
message = 'Revise this deprecated stuff now!'
- callstack = %w(foo bar baz)
+ callstack = caller_locations
e = assert_raise ActiveSupport::DeprecationException do
ActiveSupport::Deprecation.behavior.first.call(message, callstack)
end
assert_equal message, e.message
- assert_equal callstack, e.backtrace
+ assert_equal callstack.map(&:to_s), e.backtrace.map(&:to_s)
end
def test_default_stderr_behavior