test/test_integration_cmds: fix Rubocop warnings.
This commit is contained in:
parent
2cf6184735
commit
e89de3351f
@ -99,7 +99,7 @@ class IntegrationCommandTests < Homebrew::TestCase
|
|||||||
def cmd(*args)
|
def cmd(*args)
|
||||||
output = cmd_output(*args)
|
output = cmd_output(*args)
|
||||||
status = $?.exitstatus
|
status = $?.exitstatus
|
||||||
puts "\n#{output}" if status != 0
|
puts "\n#{output}" if status.nonzero?
|
||||||
assert_equal 0, status
|
assert_equal 0, status
|
||||||
output
|
output
|
||||||
end
|
end
|
||||||
@ -107,7 +107,7 @@ class IntegrationCommandTests < Homebrew::TestCase
|
|||||||
def cmd_fail(*args)
|
def cmd_fail(*args)
|
||||||
output = cmd_output(*args)
|
output = cmd_output(*args)
|
||||||
status = $?.exitstatus
|
status = $?.exitstatus
|
||||||
$stderr.puts "\n#{output}" if status == 0
|
$stderr.puts "\n#{output}" if status.zero?
|
||||||
refute_equal 0, status
|
refute_equal 0, status
|
||||||
output
|
output
|
||||||
end
|
end
|
||||||
@ -228,23 +228,23 @@ class IntegrationCommandTests < Homebrew::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_env_bash
|
def test_env_bash
|
||||||
assert_match %r{export CMAKE_PREFIX_PATH="#{Regexp.quote(HOMEBREW_PREFIX.to_s)}"},
|
assert_match(/export CMAKE_PREFIX_PATH="#{Regexp.quote(HOMEBREW_PREFIX.to_s)}"/,
|
||||||
cmd("--env", "--shell=bash")
|
cmd("--env", "--shell=bash"))
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_env_fish
|
def test_env_fish
|
||||||
assert_match %r{set [-]gx CMAKE_PREFIX_PATH "#{Regexp.quote(HOMEBREW_PREFIX.to_s)}"},
|
assert_match(/set [-]gx CMAKE_PREFIX_PATH "#{Regexp.quote(HOMEBREW_PREFIX.to_s)}"/,
|
||||||
cmd("--env", "--shell=fish")
|
cmd("--env", "--shell=fish"))
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_env_csh
|
def test_env_csh
|
||||||
assert_match %r{setenv CMAKE_PREFIX_PATH #{Regexp.quote(HOMEBREW_PREFIX.to_s)};},
|
assert_match(/setenv CMAKE_PREFIX_PATH #{Regexp.quote(HOMEBREW_PREFIX.to_s)};/,
|
||||||
cmd("--env", "--shell=tcsh")
|
cmd("--env", "--shell=tcsh"))
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_env_plain
|
def test_env_plain
|
||||||
assert_match %r{CMAKE_PREFIX_PATH: #{Regexp.quote(HOMEBREW_PREFIX)}},
|
assert_match(/CMAKE_PREFIX_PATH: #{Regexp.quote(HOMEBREW_PREFIX)}/,
|
||||||
cmd("--env", "--plain")
|
cmd("--env", "--plain"))
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_prefix_formula
|
def test_prefix_formula
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user