diff options
Diffstat (limited to 'activesupport/test/deprecation_test.rb')
-rw-r--r-- | activesupport/test/deprecation_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/test/deprecation_test.rb b/activesupport/test/deprecation_test.rb index 58a0a3964d..dbde3d2e15 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 @@ -143,7 +143,7 @@ class DeprecationTest < ActiveSupport::TestCase stderr_output = capture(:stderr) { assert_nil behavior.call('Some error!', ['call stack!']) } - assert stderr_output.blank? + assert stderr_output.empty? end def test_deprecated_instance_variable_proxy @@ -341,7 +341,7 @@ class DeprecationTest < ActiveSupport::TestCase end def test_default_deprecation_horizon_should_always_bigger_than_current_rails_version - assert ActiveSupport::Deprecation.new.deprecation_horizon > ActiveSupport::VERSION::STRING + assert_operator ActiveSupport::Deprecation.new.deprecation_horizon, :>, ActiveSupport::VERSION::STRING end def test_default_gem_name |