test: fix a couple failures on certain systems

This commit is contained in:
Bo Anderson 2023-12-07 03:06:47 +00:00
parent ab6a7ed5a1
commit 246a73b644
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65
2 changed files with 3 additions and 1 deletions

View File

@ -284,6 +284,7 @@ describe Caveats do
let(:caveats) { described_class.new(f).caveats }
it "adds the correct amount of new lines to the output" do
expect(Utils::Service).to receive(:launchctl?).at_least(:once).and_return(true)
expect(caveats).to include("something else")
expect(caveats).to include("keg-only")
expect(caveats).to include("if you don't want/need a background service")

View File

@ -65,7 +65,8 @@ describe UnpackStrategy do
it "does not make other files writable" do
strategy.extract_nestedly(to: unpack_dir)
expect(unpack_dir/executable).not_to be_writable
# We don't check `writable?` here as that's always true as root.
expect((unpack_dir/executable).stat.mode & 0222).to be_zero
end
end
end