diff options
| author | Markus Reiter | 2017-03-05 06:31:36 +0100 |
|---|---|---|
| committer | Markus Reiter | 2017-03-05 23:08:14 +0100 |
| commit | 9fc6c7b2be300ff35dc52d80f4dc38d36d52ddc2 (patch) | |
| tree | 43e99a683329471c1dc965dcc92daccb57df7e8d /Library/Homebrew/test/cask/macos_spec.rb | |
| parent | 67ec76d1492fbb03959a782a85c4fb985d6a5884 (diff) | |
| download | brew-9fc6c7b2be300ff35dc52d80f4dc38d36d52ddc2.tar.bz2 | |
Move Cask specs into `brew tests`.
Diffstat (limited to 'Library/Homebrew/test/cask/macos_spec.rb')
| -rw-r--r-- | Library/Homebrew/test/cask/macos_spec.rb | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/Library/Homebrew/test/cask/macos_spec.rb b/Library/Homebrew/test/cask/macos_spec.rb new file mode 100644 index 000000000..f931e1104 --- /dev/null +++ b/Library/Homebrew/test/cask/macos_spec.rb @@ -0,0 +1,67 @@ +describe MacOS do + it "says '/' is undeletable" do + expect(MacOS).to be_undeletable( + "/", + ) + expect(MacOS).to be_undeletable( + "/.", + ) + expect(MacOS).to be_undeletable( + "/usr/local/Library/Taps/../../../..", + ) + end + + it "says '/Applications' is undeletable" do + expect(MacOS).to be_undeletable( + "/Applications", + ) + expect(MacOS).to be_undeletable( + "/Applications/", + ) + expect(MacOS).to be_undeletable( + "/Applications/.", + ) + expect(MacOS).to be_undeletable( + "/Applications/Mail.app/..", + ) + end + + it "says the home directory is undeletable" do + expect(MacOS).to be_undeletable( + Dir.home, + ) + expect(MacOS).to be_undeletable( + "#{Dir.home}/", + ) + expect(MacOS).to be_undeletable( + "#{Dir.home}/Documents/..", + ) + end + + it "says the user library directory is undeletable" do + expect(MacOS).to be_undeletable( + "#{Dir.home}/Library", + ) + expect(MacOS).to be_undeletable( + "#{Dir.home}/Library/", + ) + expect(MacOS).to be_undeletable( + "#{Dir.home}/Library/.", + ) + expect(MacOS).to be_undeletable( + "#{Dir.home}/Library/Preferences/..", + ) + end + + it "says '/Applications/.app' is deletable" do + expect(MacOS).not_to be_undeletable( + "/Applications/.app", + ) + end + + it "says '/Applications/SnakeOil Professional.app' is deletable" do + expect(MacOS).not_to be_undeletable( + "/Applications/SnakeOil Professional.app", + ) + end +end |
