mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
rubocops/service_spec: update test to cover custom name that requires root
This was added in recently and this just updates the test to reflect the expected behavior for the cop.
This commit is contained in:
parent
7b2bfee363
commit
769b4f89c7
@ -19,13 +19,14 @@ RSpec.describe RuboCop::Cop::FormulaAudit::Service do
|
|||||||
RUBY
|
RUBY
|
||||||
end
|
end
|
||||||
|
|
||||||
it "reports no offenses when a service block only includes custom names" do
|
it "reports no offenses when a service block includes custom names and requires root" do
|
||||||
expect_no_offenses(<<~RUBY)
|
expect_no_offenses(<<~RUBY)
|
||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
url "https://brew.sh/foo-1.0.tgz"
|
url "https://brew.sh/foo-1.0.tgz"
|
||||||
|
|
||||||
service do
|
service do
|
||||||
name macos: "custom.mcxl.foo", linux: "custom.foo"
|
name macos: "custom.mcxl.foo", linux: "custom.foo"
|
||||||
|
require_root true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
Loading…
x
Reference in New Issue
Block a user