Add test for multi-word service argument warpping

This commit is contained in:
Benjamin Bolton 2021-09-02 09:26:34 -06:00
parent 0c6266ee60
commit 87f5d98923
No known key found for this signature in database
GPG Key ID: ABB6056A88EDCCB9

View File

@ -124,7 +124,21 @@ describe Caveats do
caveats = described_class.new(f).caveats
expect(f.service?).to eq(true)
expect(caveats).to include("'#{f.bin}/php' 'test'")
expect(caveats).to include("#{f.bin}/php test")
expect(caveats).to include("background service")
end
it "wraps multi-word service parameters" do
f = formula do
url "foo-1.0"
service do
run [bin/"nginx", "-g", "daemon off;"]
end
end
caveats = described_class.new(f).caveats
expect(f.service?).to eq(true)
expect(caveats).to include("#{f.bin}/nginx -g 'daemon off;'")
expect(caveats).to include("background service")
end