aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2017-01-26 12:02:17 +0000
committerMike McQuaid2017-01-26 12:02:17 +0000
commit0fc4a52c6c34deaee59c55b1d7ff3ea62eda2b36 (patch)
tree064f3b09bc21a1b4c9b3299e8d6566aa3c41cdd6
parent92b48ac42e84eb4c113bb3fb362f83b51282c99f (diff)
downloadbrew-0fc4a52c6c34deaee59c55b1d7ff3ea62eda2b36.tar.bz2
*_test: use assert_nil when appropriate.
This is warned by the newer MiniTest.
-rw-r--r--Library/Homebrew/test/shell_test.rb6
-rw-r--r--Library/Homebrew/test/tab_test.rb9
2 files changed, 9 insertions, 6 deletions
diff --git a/Library/Homebrew/test/shell_test.rb b/Library/Homebrew/test/shell_test.rb
index a32d09863..a04ab8331 100644
--- a/Library/Homebrew/test/shell_test.rb
+++ b/Library/Homebrew/test/shell_test.rb
@@ -14,9 +14,9 @@ class ShellSmokeTest < Homebrew::TestCase
end
def test_path_to_shell_failure
- assert_equal nil, Utils::Shell.path_to_shell("")
- assert_equal nil, Utils::Shell.path_to_shell("@@@@@@")
- assert_equal nil, Utils::Shell.path_to_shell("invalid_shell-4.2")
+ assert_nil Utils::Shell.path_to_shell("")
+ assert_nil Utils::Shell.path_to_shell("@@@@@@")
+ assert_nil Utils::Shell.path_to_shell("invalid_shell-4.2")
end
def test_sh_quote
diff --git a/Library/Homebrew/test/tab_test.rb b/Library/Homebrew/test/tab_test.rb
index f6f55348d..b48efcf5c 100644
--- a/Library/Homebrew/test/tab_test.rb
+++ b/Library/Homebrew/test/tab_test.rb
@@ -241,15 +241,18 @@ class TabTests < Homebrew::TestCase
assert_equal @tab.changed_files, tab.changed_files
assert_equal @tab.tap, tab.tap
assert_equal @tab.spec, tab.spec
- assert_equal @tab.time, tab.time
+ assert_nil @tab.time
+ assert_nil tab.time
assert_equal @tab.HEAD, tab.HEAD
assert_equal @tab.compiler, tab.compiler
assert_equal @tab.stdlib, tab.stdlib
- assert_equal @tab.runtime_dependencies, tab.runtime_dependencies
+ assert_nil @tab.runtime_dependencies
+ assert_nil tab.runtime_dependencies
assert_equal @tab.stable_version, tab.stable_version
assert_equal @tab.devel_version, tab.devel_version
assert_equal @tab.head_version, tab.head_version
- assert_equal @tab.source["path"], tab.source["path"]
+ assert_nil @tab.source["path"]
+ assert_nil tab.source["path"]
end
def test_remap_deprecated_options