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
ed197c6f
Commit
ed197c6f
authored
8 years ago
by
Markus Reiter
Browse files
Options
Downloads
Patches
Plain Diff
Convert Suite test to spec.
parent
c431758f
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/spec/cask/artifact/suite_spec.rb
+14
-13
14 additions, 13 deletions
Library/Homebrew/cask/spec/cask/artifact/suite_spec.rb
with
14 additions
and
13 deletions
Library/Homebrew/cask/
test
/cask/artifact/suite_
test
.rb
→
Library/Homebrew/cask/
spec
/cask/artifact/suite_
spec
.rb
+
14
−
13
View file @
ed197c6f
require
"
test
_helper"
require
"
spec
_helper"
describe
Hbc
::
Artifact
::
Suite
do
let
(
:cask
)
{
Hbc
::
CaskLoader
.
load_from_file
(
TEST_FIXTURE_DIR
/
"cask/Casks/with-suite.rb"
)
}
...
...
@@ -8,20 +8,21 @@ describe Hbc::Artifact::Suite do
let
(
:target_path
)
{
Hbc
.
appdir
.
join
(
"Caffeine"
)
}
let
(
:source_path
)
{
cask
.
staged_path
.
join
(
"Caffeine"
)
}
before
do
Test
Helper
.
install_without_artifacts
(
cask
)
before
(
:each
)
do
Install
Helper
.
install_without_artifacts
(
cask
)
end
it
"moves the suite to the proper directory"
do
skip
(
"flaky test"
)
skip
(
"flaky test"
)
# FIXME
shutup
do
install_phase
.
call
end
target_path
.
must_be
:directory?
TestHelper
.
valid_symlink?
(
target_path
).
must_equal
false
source_path
.
wont_be
:exist?
expect
(
target_path
).
to
be_a_directory
expect
(
target_path
).
to
be_a_symlink
expect
(
target_path
.
readlink
).
to
exist
expect
(
source_path
).
not_to
exist
end
it
"creates a suite containing the expected app"
do
...
...
@@ -29,20 +30,20 @@ describe Hbc::Artifact::Suite do
install_phase
.
call
end
target_path
.
join
(
"Caffeine.app"
)
.
must_be
:
exist
?
expect
(
target_path
.
join
(
"Caffeine.app"
)
).
to
exist
end
it
"avoids clobbering an existing suite by moving over it"
do
target_path
.
mkpath
assert_raises
Hbc
::
CaskError
do
expect
{
shutup
do
install_phase
.
call
end
end
}.
to
raise_error
(
Hbc
::
CaskError
)
source_path
.
must_be
:
directory
?
target_path
.
must_be
:
directory
?
File
.
identical?
(
source_path
,
target_path
)
.
must_equal
false
expect
(
source_path
).
to
be_a_
directory
expect
(
target_path
).
to
be_a_
directory
expect
(
File
.
identical?
(
source_path
,
target_path
)
).
to
be
false
end
end
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