aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-11-06 13:26:21 -0500
committerGitHub <noreply@github.com>2017-11-06 13:26:21 -0500
commit204b22fa1c739e07d8487ace5710f8f2abe27c0e (patch)
tree93ce7dfb318015fe550cad8940003b389813450b
parent0ddde0a8fca6a0ca3158e3329713959acd65605d (diff)
parent1fe7168df0a23b69539b60327943495a3dded9e5 (diff)
downloadrails-204b22fa1c739e07d8487ace5710f8f2abe27c0e.tar.gz
rails-204b22fa1c739e07d8487ace5710f8f2abe27c0e.tar.bz2
rails-204b22fa1c739e07d8487ace5710f8f2abe27c0e.zip
Merge pull request #31069 from danott/resolve-minitest-deprecation-in-assert_no_changes
Resolve Minitest 6 deprecation in assert_no_changes
-rw-r--r--activesupport/lib/active_support/testing/assertions.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/testing/assertions.rb b/activesupport/lib/active_support/testing/assertions.rb
index e2bc51ff7a..46eed73d24 100644
--- a/activesupport/lib/active_support/testing/assertions.rb
+++ b/activesupport/lib/active_support/testing/assertions.rb
@@ -190,7 +190,12 @@ module ActiveSupport
error = "#{expression.inspect} did change to #{after}"
error = "#{message}.\n#{error}" if message
- assert_equal before, after, error
+
+ if before.nil?
+ assert_nil after, error
+ else
+ assert_equal before, after, error
+ end
retval
end