You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

35 lines
848 B

require 'test_helper'
describe Cask::Installer do
describe "install" do
it "downloads and installs a nice fresh Cask" do
caffeine = Cask.load('caffeine')
shutup do
Cask::Installer.install(caffeine)
end
dest_path = HOMEBREW_CELLAR/'caffeine'/caffeine.version
dest_path.must_be :directory?
application = dest_path/'Caffeine.app'
application.must_be :directory?
end
end
describe "uninstall" do
it "fully uninstalls a cask" do
caffeine = Cask.load('caffeine')
shutup do
Cask::Installer.install(caffeine)
Cask::Installer.uninstall(caffeine)
end
dest_path = HOMEBREW_CELLAR/'caffeine'/caffeine.version
application = dest_path/'Caffeine.app'
application.wont_be :directory?
dest_path.wont_be :directory?
end
end
end