Skip to content
Snippets Groups Projects
Commit 20b77dfd authored by Markus Reiter's avatar Markus Reiter
Browse files

Convert Reinstall test to spec.

parent 7b2d8ed4
No related branches found
No related tags found
No related merge requests found
require "test_helper"
require "spec_helper"
describe Hbc::CLI::Reinstall do
it "allows reinstalling a Cask" do
shutup do
Hbc::CLI::Install.run("local-transmission")
end
Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb").must_be :installed?
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
Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb").must_be :installed?
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
Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb").wont_be :installed?
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
Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb").must_be :installed?
expect(Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb")).to be_installed
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment