aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cask/cli/reinstall_spec.rb
diff options
context:
space:
mode:
authorMarkus Reiter2017-03-05 06:31:36 +0100
committerMarkus Reiter2017-03-05 23:08:14 +0100
commit9fc6c7b2be300ff35dc52d80f4dc38d36d52ddc2 (patch)
tree43e99a683329471c1dc965dcc92daccb57df7e8d /Library/Homebrew/test/cask/cli/reinstall_spec.rb
parent67ec76d1492fbb03959a782a85c4fb985d6a5884 (diff)
downloadbrew-9fc6c7b2be300ff35dc52d80f4dc38d36d52ddc2.tar.bz2
Move Cask specs into `brew tests`.
Diffstat (limited to 'Library/Homebrew/test/cask/cli/reinstall_spec.rb')
-rw-r--r--Library/Homebrew/test/cask/cli/reinstall_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/Library/Homebrew/test/cask/cli/reinstall_spec.rb b/Library/Homebrew/test/cask/cli/reinstall_spec.rb
new file mode 100644
index 000000000..e573a3470
--- /dev/null
+++ b/Library/Homebrew/test/cask/cli/reinstall_spec.rb
@@ -0,0 +1,22 @@
+describe Hbc::CLI::Reinstall, :cask do
+ it "allows reinstalling a Cask" do
+ shutup do
+ Hbc::CLI::Install.run("local-transmission")
+ end
+ expect(Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb")).to be_installed
+
+ shutup do
+ Hbc::CLI::Reinstall.run("local-transmission")
+ end
+ expect(Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb")).to be_installed
+ end
+
+ it "allows reinstalling a non installed Cask" do
+ expect(Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb")).not_to be_installed
+
+ shutup do
+ Hbc::CLI::Reinstall.run("local-transmission")
+ end
+ expect(Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb")).to be_installed
+ end
+end