rubocops/text: Allow all "#{bin}/foo" interpolated strings with spaces
- This was complaining about `shell_output("#{bin}/abricate-get_db --help 2>&1")` which it shouldn't have.
This commit is contained in:
parent
807a934574
commit
f0084e611a
@ -158,6 +158,8 @@ module RuboCop
|
|||||||
end
|
end
|
||||||
|
|
||||||
def path_starts_with_bin?(path, starts_with)
|
def path_starts_with_bin?(path, starts_with)
|
||||||
|
return false if path.include?(" ")
|
||||||
|
|
||||||
path_starts_with?(path, starts_with, bin: true)
|
path_starts_with?(path, starts_with, bin: true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -150,6 +150,8 @@ RSpec.describe RuboCop::Cop::FormulaAuditStrict::Text do
|
|||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
test do
|
test do
|
||||||
shell_output("\#{bin}/foo --version")
|
shell_output("\#{bin}/foo --version")
|
||||||
|
assert_match "help", shell_output("\#{bin}/foo-something --help 2>&1")
|
||||||
|
assert_match "OK", shell_output("\#{bin}/foo-something_else --check 2>&1")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user