formula_assertions: few more compat methods

This commit is contained in:
Bo Anderson 2021-02-27 16:58:43 +00:00
parent 4d88d10049
commit e74013aeab
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65

View File

@ -20,11 +20,15 @@ module Homebrew
# Test::Unit backwards compatibility methods
{
assert_include: :assert_includes,
assert_path_exist: :assert_path_exists,
assert_raise: :assert_raises,
assert_throw: :assert_throws,
assert_not_empty: :refute_empty,
assert_not_equal: :refute_equal,
assert_not_in_delta: :refute_in_delta,
assert_not_in_epsilon: :refute_in_epsilon,
assert_not_include: :refute_includes,
assert_not_includes: :refute_includes,
assert_not_instance_of: :refute_instance_of,
assert_not_kind_of: :refute_kind_of,
@ -32,6 +36,7 @@ module Homebrew
assert_no_match: :refute_match,
assert_not_nil: :refute_nil,
assert_not_operator: :refute_operator,
assert_path_not_exist: :refute_path_exists,
assert_not_predicate: :refute_predicate,
assert_not_respond_to: :refute_respond_to,
assert_not_same: :refute_same,
@ -47,6 +52,11 @@ module Homebrew
assert_equal(true, act, msg)
end
def assert_false(act, msg = nil)
# odeprecated "assert_false", "assert(!...) or assert_equal(false, ...)"
assert_equal(false, act, msg)
end
# Returns the output of running cmd, and asserts the exit status.
# @api public
def shell_output(cmd, result = 0)