homebrew-cask-versions/test/cli/unlinkapps_test.rb
phinze 3a20b320d0 fix issue where linkapps would double symlink
since ln was not using the -h it was following the target symlink
destination and deciding it was a destination directory. madness
ensued.

also test cleanup and more output and change linkables to use sets
2013-04-13 18:17:20 -05:00

28 lines
717 B
Ruby

require 'test_helper'
describe Cask::CLI::Unlinkapps do
before do
shutup do
# use CLI so both casks start installed and linked
Cask::CLI::Install.run('local-caffeine', 'local-transmission')
end
end
it "only unlinks casks mentioned when arguments are provided" do
shutup do
Cask::CLI::Unlinkapps.run('local-transmission')
end
(Cask.appdir/"Transmission.app").wont_be :symlink?
(Cask.appdir/"Caffeine.app").must_be :symlink?
end
it "unlinks all installed casks when no arguments supplied" do
shutup do
Cask::CLI::Unlinkapps.run
end
(Cask.appdir/"Transmission.app").wont_be :symlink?
(Cask.appdir/"Caffeine.app").wont_be :symlink?
end
end