aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/test
diff options
context:
space:
mode:
authorJosh Hagins2016-10-24 01:11:48 -0400
committerGitHub2016-10-24 01:11:48 -0400
commit606a7623442924b9c828f3f3fbd227dd3122bf3c (patch)
tree984a4d34c6cbe23151e4a95da35c9e8e420ff264 /Library/Homebrew/cask/test
parent512a0c950e828fe07e629a629ba4d7b2fb8c2a6d (diff)
parent0b8af5771f590bfb5cea7bccd4bd0fc77a973113 (diff)
downloadbrew-606a7623442924b9c828f3f3fbd227dd3122bf3c.tar.bz2
Merge pull request #1248 from Git-Jiro/add_reinstall_cmd_to_cask
add cask reinstall command
Diffstat (limited to 'Library/Homebrew/cask/test')
-rw-r--r--Library/Homebrew/cask/test/cask/cli/reinstall_test.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/Library/Homebrew/cask/test/cask/cli/reinstall_test.rb b/Library/Homebrew/cask/test/cask/cli/reinstall_test.rb
new file mode 100644
index 000000000..22f0d23fd
--- /dev/null
+++ b/Library/Homebrew/cask/test/cask/cli/reinstall_test.rb
@@ -0,0 +1,27 @@
+require "test_helper"
+
+describe Hbc::CLI::Reinstall do
+ it "allows reinstalling a Cask" do
+ shutup do
+ Hbc::CLI::Install.run("local-transmission")
+ end
+ Hbc.load("local-transmission").must_be :installed?
+
+ shutup do
+ Hbc::CLI::Reinstall.run("local-transmission")
+ end
+ Hbc.load("local-transmission").must_be :installed?
+ end
+
+ it "allows reinstalling a non installed Cask" do
+ shutup do
+ Hbc::CLI::Uninstall.run("local-transmission")
+ end
+ Hbc.load("local-transmission").wont_be :installed?
+
+ shutup do
+ Hbc::CLI::Reinstall.run("local-transmission")
+ end
+ Hbc.load("local-transmission").must_be :installed?
+ end
+end