Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
49155cce
Commit
49155cce
authored
8 years ago
by
Josh Hagins
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #1360 from reitermarkus/refactor-installer-test
Refactor Installer test.
parents
c551252d
4a9b48e9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Library/Homebrew/cask/test/cask/installer_test.rb
+28
-24
28 additions, 24 deletions
Library/Homebrew/cask/test/cask/installer_test.rb
with
28 additions
and
24 deletions
Library/Homebrew/cask/test/cask/installer_test.rb
+
28
−
24
View file @
49155cce
...
...
@@ -2,6 +2,10 @@ require "test_helper"
describe
Hbc
::
Installer
do
describe
"install"
do
let
(
:empty_depends_on_stub
)
{
stub
(
formula:
[],
cask:
[],
macos:
nil
,
arch:
nil
,
x11:
nil
)
}
it
"downloads and installs a nice fresh Cask"
do
caffeine
=
Hbc
.
load
(
"local-caffeine"
)
...
...
@@ -44,11 +48,11 @@ describe Hbc::Installer do
it
"works with cab-based Casks"
do
skip
(
"cabextract not installed"
)
if
which
(
"cabextract"
).
nil?
asset
=
Hbc
.
load
(
"container-cab"
)
empty
=
stub
(
formula:
[],
cask:
[],
macos:
nil
,
arch:
nil
,
x11:
nil
)
asset
.
stubs
(
:depends_on
).
returns
(
empty
)
shutup
do
Hbc
::
Installer
.
new
(
asset
).
install
asset
.
stub
:depends_on
,
empty_depends_on_stub
do
shutup
do
Hbc
::
Installer
.
new
(
asset
).
install
end
end
dest_path
=
Hbc
.
caskroom
.
join
(
"container-cab"
,
asset
.
version
)
...
...
@@ -74,11 +78,11 @@ describe Hbc::Installer do
it
"works with 7z-based Casks"
do
skip
(
"unar not installed"
)
if
which
(
"unar"
).
nil?
asset
=
Hbc
.
load
(
"container-7z"
)
empty
=
stub
(
formula:
[],
cask:
[],
macos:
nil
,
arch:
nil
,
x11:
nil
)
asset
.
stubs
(
:depends_on
).
returns
(
empty
)
shutup
do
Hbc
::
Installer
.
new
(
asset
).
install
asset
.
stub
:depends_on
,
empty_depends_on_stub
do
shutup
do
Hbc
::
Installer
.
new
(
asset
).
install
end
end
dest_path
=
Hbc
.
caskroom
.
join
(
"container-7z"
,
asset
.
version
)
...
...
@@ -103,11 +107,11 @@ describe Hbc::Installer do
it
"works with Stuffit-based Casks"
do
skip
(
"unar not installed"
)
if
which
(
"unar"
).
nil?
asset
=
Hbc
.
load
(
"container-sit"
)
empty
=
stub
(
formula:
[],
cask:
[],
macos:
nil
,
arch:
nil
,
x11:
nil
)
asset
.
stubs
(
:depends_on
).
returns
(
empty
)
shutup
do
Hbc
::
Installer
.
new
(
asset
).
install
asset
.
stub
:depends_on
,
empty_depends_on_stub
do
shutup
do
Hbc
::
Installer
.
new
(
asset
).
install
end
end
dest_path
=
Hbc
.
caskroom
.
join
(
"container-sit"
,
asset
.
version
)
...
...
@@ -119,11 +123,11 @@ describe Hbc::Installer do
it
"works with RAR-based Casks"
do
skip
(
"unar not installed"
)
if
which
(
"unar"
).
nil?
asset
=
Hbc
.
load
(
"container-rar"
)
empty
=
stub
(
formula:
[],
cask:
[],
macos:
nil
,
arch:
nil
,
x11:
nil
)
asset
.
stubs
(
:depends_on
).
returns
(
empty
)
shutup
do
Hbc
::
Installer
.
new
(
asset
).
install
asset
.
stub
:depends_on
,
empty_depends_on_stub
do
shutup
do
Hbc
::
Installer
.
new
(
asset
).
install
end
end
dest_path
=
Hbc
.
caskroom
.
join
(
"container-rar"
,
asset
.
version
)
...
...
@@ -161,11 +165,11 @@ describe Hbc::Installer do
it
"works with pure xz-based Casks"
do
skip
(
"unxz not installed"
)
if
which
(
"unxz"
).
nil?
asset
=
Hbc
.
load
(
"container-xz"
)
empty
=
stub
(
formula:
[],
cask:
[],
macos:
nil
,
arch:
nil
,
x11:
nil
)
asset
.
stubs
(
:depends_on
).
returns
(
empty
)
shutup
do
Hbc
::
Installer
.
new
(
asset
).
install
asset
.
stub
:depends_on
,
empty_depends_on_stub
do
shutup
do
Hbc
::
Installer
.
new
(
asset
).
install
end
end
dest_path
=
Hbc
.
caskroom
.
join
(
"container-xz"
,
asset
.
version
)
...
...
@@ -177,11 +181,11 @@ describe Hbc::Installer do
it
"works with lzma-based Casks"
do
skip
(
"unlzma not installed"
)
if
which
(
"unlzma"
).
nil?
asset
=
Hbc
.
load
(
"container-lzma"
)
empty
=
stub
(
formula:
[],
cask:
[],
macos:
nil
,
arch:
nil
,
x11:
nil
)
asset
.
stubs
(
:depends_on
).
returns
(
empty
)
shutup
do
Hbc
::
Installer
.
new
(
asset
).
install
asset
.
stub
:depends_on
,
empty_depends_on_stub
do
shutup
do
Hbc
::
Installer
.
new
(
asset
).
install
end
end
dest_path
=
Hbc
.
caskroom
.
join
(
"container-lzma"
,
asset
.
version
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment