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
9fa8dc5d
Commit
9fa8dc5d
authored
5 years ago
by
Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
Remove old os/mac/formula spec
parent
678f89ff
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/test/os/mac/formula_spec.rb
+0
-61
0 additions, 61 deletions
Library/Homebrew/test/os/mac/formula_spec.rb
with
0 additions
and
61 deletions
Library/Homebrew/test/os/mac/formula_spec.rb
deleted
100644 → 0
+
0
−
61
View file @
678f89ff
# frozen_string_literal: true
require
"formula"
describe
Formula
do
describe
"#uses_from_macos"
do
before
do
sierra_os_version
=
OS
::
Mac
::
Version
.
from_symbol
(
:sierra
)
allow
(
OS
).
to
receive
(
:mac?
).
and_return
(
true
)
allow
(
OS
::
Mac
).
to
receive
(
:version
).
and_return
(
OS
::
Mac
::
Version
.
new
(
sierra_os_version
))
end
it
"doesn't adds a dependency if it doesn't meet OS version requirements"
do
f
=
formula
"foo"
do
url
"foo-1.0"
uses_from_macos
(
"foo"
,
after: :high_sierra
)
uses_from_macos
(
"bar"
,
before: :el_capitan
)
end
expect
(
f
.
class
.
stable
.
deps
).
to
be_empty
expect
(
f
.
class
.
devel
.
deps
).
to
be_empty
expect
(
f
.
class
.
head
.
deps
).
to
be_empty
end
it
"allows specifying dependencies after certain version"
do
f
=
formula
"foo"
do
url
"foo-1.0"
uses_from_macos
(
"foo"
,
after: :el_capitan
)
end
expect
(
f
.
class
.
stable
.
deps
.
first
.
name
).
to
eq
(
"foo"
)
expect
(
f
.
class
.
devel
.
deps
.
first
.
name
).
to
eq
(
"foo"
)
expect
(
f
.
class
.
head
.
deps
.
first
.
name
).
to
eq
(
"foo"
)
end
it
"allows specifying dependencies before certain version"
do
f
=
formula
"foo"
do
url
"foo-1.0"
uses_from_macos
(
"foo"
,
before: :high_sierra
)
end
expect
(
f
.
class
.
stable
.
deps
.
first
.
name
).
to
eq
(
"foo"
)
expect
(
f
.
class
.
devel
.
deps
.
first
.
name
).
to
eq
(
"foo"
)
expect
(
f
.
class
.
head
.
deps
.
first
.
name
).
to
eq
(
"foo"
)
end
it
"raises an error if passing invalid OS versions"
do
expect
{
formula
"foo"
do
url
"foo-1.0"
uses_from_macos
(
"foo"
,
after:
"bar"
,
before: :mojave
)
end
}.
to
raise_error
(
ArgumentError
,
'unknown version "bar"'
)
end
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