homebrew-cask-versions/test/cli/linkapps_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

31 lines
846 B
Ruby

require 'test_helper'
describe Cask::CLI::Linkapps do
before do
shutup do
caffeine = Cask.load('local-caffeine')
transmission = Cask.load('local-transmission')
Cask::Installer.install caffeine
Cask::Installer.install transmission
end
end
it "only links casks mentioned when arguments are provided" do
shutup do
Cask::CLI::Linkapps.run('local-transmission')
end
TestHelper.valid_alias?(Cask.appdir/"Transmission.app").must_equal true
TestHelper.valid_alias?(Cask.appdir/"Caffeine.app").wont_equal true
end
it "links all installed casks when no arguments supplied" do
shutup do
Cask::CLI::Linkapps.run
end
TestHelper.valid_alias?(Cask.appdir/"Transmission.app").must_equal true
TestHelper.valid_alias?(Cask.appdir/"Caffeine.app").must_equal true
end
end