aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/test
diff options
context:
space:
mode:
authorMarkus Reiter2016-12-05 09:27:32 +0100
committerGitHub2016-12-05 09:27:32 +0100
commit697340ff3b2e7982bd51bae014ac6245489faf0e (patch)
treeec417fa4d548b21ed0e27e3cc9151f4e26020f0c /Library/Homebrew/cask/test
parent5cc7acee17e0aca22d8a4c3527c9a6ac03822843 (diff)
parent5785f54f4bd48dca58a7550af48217d4c6372ad2 (diff)
downloadbrew-697340ff3b2e7982bd51bae014ac6245489faf0e.tar.bz2
Merge pull request #1620 from reitermarkus/refactoring
Refactor Cask installer.
Diffstat (limited to 'Library/Homebrew/cask/test')
-rw-r--r--Library/Homebrew/cask/test/cask/cli/install_test.rb2
-rw-r--r--Library/Homebrew/cask/test/cask/depends_on_test.rb5
2 files changed, 4 insertions, 3 deletions
diff --git a/Library/Homebrew/cask/test/cask/cli/install_test.rb b/Library/Homebrew/cask/test/cask/cli/install_test.rb
index c774f1fb5..eef3f2e5b 100644
--- a/Library/Homebrew/cask/test/cask/cli/install_test.rb
+++ b/Library/Homebrew/cask/test/cask/cli/install_test.rb
@@ -39,7 +39,7 @@ describe Hbc::CLI::Install do
lambda {
Hbc::CLI::Install.run("local-transmission", "--force")
- }.must_output(/==> Success! local-transmission was successfully installed!/)
+ }.must_output(/local-transmission was successfully installed!/)
end
it "skips dependencies with --skip-cask-deps" do
diff --git a/Library/Homebrew/cask/test/cask/depends_on_test.rb b/Library/Homebrew/cask/test/cask/depends_on_test.rb
index 31e51b5e5..ce2e54178 100644
--- a/Library/Homebrew/cask/test/cask/depends_on_test.rb
+++ b/Library/Homebrew/cask/test/cask/depends_on_test.rb
@@ -93,6 +93,7 @@ describe "Satisfy Dependencies and Requirements" do
describe "depends_on x11" do
it "succeeds when depends_on x11 is satisfied" do
x11_cask = Hbc.load("with-depends-on-x11")
+ MacOS::X11.stubs(:installed?).returns(true)
shutup do
Hbc::Installer.new(x11_cask).install
end
@@ -100,7 +101,7 @@ describe "Satisfy Dependencies and Requirements" do
it "raises an exception when depends_on x11 is not satisfied" do
x11_cask = Hbc.load("with-depends-on-x11")
- Hbc.stubs(:x11_libpng).returns([Pathname.new("/usr/path/does/not/exist")])
+ MacOS::X11.stubs(:installed?).returns(false)
lambda {
shutup do
Hbc::Installer.new(x11_cask).install
@@ -110,7 +111,7 @@ describe "Satisfy Dependencies and Requirements" do
it "never raises when depends_on x11: false" do
x11_cask = Hbc.load("with-depends-on-x11-false")
- Hbc.stubs(:x11_executable).returns(Pathname.new("/usr/path/does/not/exist"))
+ MacOS::X11.stubs(:installed?).returns(false)
lambda do
shutup do
Hbc::Installer.new(x11_cask).install