diff options
| author | Markus Reiter | 2017-06-24 07:01:35 +0200 |
|---|---|---|
| committer | Markus Reiter | 2017-06-24 09:15:37 +0200 |
| commit | a1f9032b9574dcb27b34a6deb4c9730839daf0df (patch) | |
| tree | 97ccd340be363f7e18dfe879cc2a588ff2135f8d /Library/Homebrew/test/utils | |
| parent | f4f1f1a6108970bf646aad82305978262c671ee2 (diff) | |
| download | brew-a1f9032b9574dcb27b34a6deb4c9730839daf0df.tar.bz2 | |
🗑️ Use AppleScript instead of Swift for trashing.
Diffstat (limited to 'Library/Homebrew/test/utils')
| -rw-r--r-- | Library/Homebrew/test/utils/trash_spec.rb | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/Library/Homebrew/test/utils/trash_spec.rb b/Library/Homebrew/test/utils/trash_spec.rb deleted file mode 100644 index 9f2f7df15..000000000 --- a/Library/Homebrew/test/utils/trash_spec.rb +++ /dev/null @@ -1,32 +0,0 @@ -require "open3" - -describe "trash", :needs_macos do - let(:executable) { HOMEBREW_LIBRARY_PATH/"utils/trash.swift" } - let(:dir) { mktmpdir } - let(:file) { dir/"new_file" } - - it "moves existing files to the trash" do - FileUtils.touch file - - expect(file).to exist - - out, err, status = Open3.capture3(executable, file) - - expect(out).to match %r{moved #{file} to .*/\.Trash/\.*} - expect(err).to be_empty - expect(status).to be_a_success - - expect(file).not_to exist - - trashed_path = out.sub(/^moved #{Regexp.escape(file.to_s)} to (.*)\n$/, '\1') - FileUtils.rm_f trashed_path - end - - it "fails when files don't exist" do - out, err, status = Open3.capture3(executable, file) - - expect(out).to be_empty - expect(err).to eq "could not move #{file} to trash\n" - expect(status).to be_a_failure - end -end |
