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:
apainintheneck 2024-03-20 21:05:14 -07:00
parent 7b2bfee363
commit 769b4f89c7

View File

@ -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