diff options
| author | Markus Reiter | 2017-02-08 13:29:46 +0100 |
|---|---|---|
| committer | Markus Reiter | 2017-02-10 17:19:19 +0100 |
| commit | 20b77dfdcc4332f1d21e39571e1bbc7eefc6d4dd (patch) | |
| tree | 07d10b15333952b2850fb9f20e61b41dbca6a3b5 /Library/Homebrew | |
| parent | 7b2d8ed4b3a1a71da59b1aa1859e844c37ba24c2 (diff) | |
| download | brew-20b77dfdcc4332f1d21e39571e1bbc7eefc6d4dd.tar.bz2 | |
Convert Reinstall test to spec.
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/cask/spec/cask/cli/reinstall_spec.rb | 24 | ||||
| -rw-r--r-- | Library/Homebrew/cask/test/cask/cli/reinstall_test.rb | 24 |
2 files changed, 24 insertions, 24 deletions
diff --git a/Library/Homebrew/cask/spec/cask/cli/reinstall_spec.rb b/Library/Homebrew/cask/spec/cask/cli/reinstall_spec.rb new file mode 100644 index 000000000..df83c53e2 --- /dev/null +++ b/Library/Homebrew/cask/spec/cask/cli/reinstall_spec.rb @@ -0,0 +1,24 @@ +require "spec_helper" + +describe Hbc::CLI::Reinstall 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 diff --git a/Library/Homebrew/cask/test/cask/cli/reinstall_test.rb b/Library/Homebrew/cask/test/cask/cli/reinstall_test.rb deleted file mode 100644 index d34a2c6bb..000000000 --- a/Library/Homebrew/cask/test/cask/cli/reinstall_test.rb +++ /dev/null @@ -1,24 +0,0 @@ -require "test_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? - - 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? - 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? - - 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? - end -end |
