diff options
| author | Xu Cheng | 2015-08-06 16:51:50 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-08-06 17:23:56 +0800 |
| commit | 8f20ea92b30aa55943c7d0e8ce5ea9bdb6569135 (patch) | |
| tree | 875d5b8da9551acd881400919b4a3fccc5825c90 /Library | |
| parent | b121e5fd7be1b1984e51caa6a369dd8faf70a57a (diff) | |
| download | brew-8f20ea92b30aa55943c7d0e8ce5ea9bdb6569135.tar.bz2 | |
test_inreplace: temporary disable rubocop string replacement rule
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/test/test_inreplace.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Homebrew/test/test_inreplace.rb b/Library/Homebrew/test/test_inreplace.rb index d9c4c1ab7..91d57f942 100644 --- a/Library/Homebrew/test/test_inreplace.rb +++ b/Library/Homebrew/test/test_inreplace.rb @@ -85,7 +85,8 @@ class InreplaceTest < Homebrew::TestCase s.sub!("f", "b") assert_equal "boo", s - s.tr!("o", "e") + # Under current context, we are testing `String#gsub!`, so let's disable rubocop temporarily. + s.gsub!("o", "e") # rubocop:disable Performance/StringReplacement assert_equal "bee", s end @@ -99,7 +100,8 @@ class InreplaceTest < Homebrew::TestCase end assert_raises(Utils::InreplaceError) do - inreplace("test") { |s| s.tr!("d", "f") } + # Under current context, we are testing `String#gsub!`, so let's disable rubocop temporarily. + inreplace("test") { |s| s.gsub!("d", "f") } # rubocop:disable Performance/StringReplacement end assert_raises(Utils::InreplaceError) do |
