diff options
| author | Mike McQuaid | 2016-09-11 17:43:09 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2016-09-11 21:48:05 +0100 |
| commit | e89de3351f69a99bdc5d528c7abe3f771ae47b56 (patch) | |
| tree | 260faaf4c09b5ff9f4ad30ee8ed9be1ca533fbfc /Library/Homebrew/test | |
| parent | 2cf6184735050319a78063111b6f464f2320e2b7 (diff) | |
| download | brew-e89de3351f69a99bdc5d528c7abe3f771ae47b56.tar.bz2 | |
test/test_integration_cmds: fix Rubocop warnings.
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/test_integration_cmds.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Library/Homebrew/test/test_integration_cmds.rb b/Library/Homebrew/test/test_integration_cmds.rb index ead87c8ab..812d26ba5 100644 --- a/Library/Homebrew/test/test_integration_cmds.rb +++ b/Library/Homebrew/test/test_integration_cmds.rb @@ -99,7 +99,7 @@ class IntegrationCommandTests < Homebrew::TestCase def cmd(*args) output = cmd_output(*args) status = $?.exitstatus - puts "\n#{output}" if status != 0 + puts "\n#{output}" if status.nonzero? assert_equal 0, status output end @@ -107,7 +107,7 @@ class IntegrationCommandTests < Homebrew::TestCase def cmd_fail(*args) output = cmd_output(*args) status = $?.exitstatus - $stderr.puts "\n#{output}" if status == 0 + $stderr.puts "\n#{output}" if status.zero? refute_equal 0, status output end @@ -228,23 +228,23 @@ class IntegrationCommandTests < Homebrew::TestCase end def test_env_bash - assert_match %r{export CMAKE_PREFIX_PATH="#{Regexp.quote(HOMEBREW_PREFIX.to_s)}"}, - cmd("--env", "--shell=bash") + assert_match(/export CMAKE_PREFIX_PATH="#{Regexp.quote(HOMEBREW_PREFIX.to_s)}"/, + cmd("--env", "--shell=bash")) end def test_env_fish - assert_match %r{set [-]gx CMAKE_PREFIX_PATH "#{Regexp.quote(HOMEBREW_PREFIX.to_s)}"}, - cmd("--env", "--shell=fish") + assert_match(/set [-]gx CMAKE_PREFIX_PATH "#{Regexp.quote(HOMEBREW_PREFIX.to_s)}"/, + cmd("--env", "--shell=fish")) end def test_env_csh - assert_match %r{setenv CMAKE_PREFIX_PATH #{Regexp.quote(HOMEBREW_PREFIX.to_s)};}, - cmd("--env", "--shell=tcsh") + assert_match(/setenv CMAKE_PREFIX_PATH #{Regexp.quote(HOMEBREW_PREFIX.to_s)};/, + cmd("--env", "--shell=tcsh")) end def test_env_plain - assert_match %r{CMAKE_PREFIX_PATH: #{Regexp.quote(HOMEBREW_PREFIX)}}, - cmd("--env", "--plain") + assert_match(/CMAKE_PREFIX_PATH: #{Regexp.quote(HOMEBREW_PREFIX)}/, + cmd("--env", "--plain")) end def test_prefix_formula |
