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
7a9bfb4c
Commit
7a9bfb4c
authored
5 years ago
by
Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
Fix spec
parent
38653f0c
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/software_spec_spec.rb
+12
-10
12 additions, 10 deletions
Library/Homebrew/test/os/mac/software_spec_spec.rb
with
12 additions
and
10 deletions
Library/Homebrew/test/os/mac/software_spec_spec.rb
+
12
−
10
View file @
7a9bfb4c
...
...
@@ -3,6 +3,8 @@
require
"software_spec"
describe
SoftwareSpec
do
subject
(
:spec
)
{
described_class
.
new
}
describe
"#uses_from_macos"
do
before
do
sierra_os_version
=
OS
::
Mac
::
Version
.
from_symbol
(
:sierra
)
...
...
@@ -12,36 +14,36 @@ describe SoftwareSpec do
end
it
"doesn't adds a dependency if it doesn't meet OS version requirements"
do
s
ubj
ec
t
.
uses_from_macos
(
"foo"
,
after: :high_sierra
)
s
ubj
ec
t
.
uses_from_macos
(
"bar"
,
before: :el_capitan
)
s
p
ec
.
uses_from_macos
(
"foo"
,
after: :high_sierra
)
s
p
ec
.
uses_from_macos
(
"bar"
,
before: :el_capitan
)
expect
(
s
ubj
ec
t
.
deps
).
to
be_empty
expect
(
s
p
ec
.
deps
).
to
be_empty
end
it
"allows specifying dependencies after certain version"
do
s
ubj
ec
t
.
uses_from_macos
(
"foo"
,
after: :el_capitan
)
s
p
ec
.
uses_from_macos
(
"foo"
,
after: :el_capitan
)
expect
(
s
ubj
ec
t
.
deps
.
first
.
name
).
to
eq
(
"foo"
)
expect
(
s
p
ec
.
deps
.
first
.
name
).
to
eq
(
"foo"
)
end
it
"works with tags"
do
s
ubj
ec
t
.
uses_from_macos
(
"foo"
=>
:head
,
after
:
:el_capitan
)
s
p
ec
.
uses_from_macos
(
"foo"
=>
:head
,
:
after
=>
:el_capitan
)
dep
=
s
ubj
ec
t
.
deps
.
first
dep
=
s
p
ec
.
deps
.
first
expect
(
dep
.
name
).
to
eq
(
"foo"
)
expect
(
dep
.
tags
).
to
include
(
:head
)
end
it
"allows specifying dependencies before certain version"
do
s
ubj
ec
t
.
uses_from_macos
(
"foo"
,
before: :high_sierra
)
s
p
ec
.
uses_from_macos
(
"foo"
,
before: :high_sierra
)
expect
(
s
ubj
ec
t
.
deps
.
first
.
name
).
to
eq
(
"foo"
)
expect
(
s
p
ec
.
deps
.
first
.
name
).
to
eq
(
"foo"
)
end
it
"raises an error if passing invalid OS versions"
do
expect
{
s
ubj
ec
t
.
uses_from_macos
(
"foo"
,
after:
"bar"
,
before: :mojave
)
s
p
ec
.
uses_from_macos
(
"foo"
,
after:
"bar"
,
before: :mojave
)
}.
to
raise_error
(
ArgumentError
,
'unknown version "bar"'
)
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