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
ac2cafe1
Commit
ac2cafe1
authored
8 years ago
by
Markus Reiter
Browse files
Options
Downloads
Patches
Plain Diff
Convert Caveats test to spec.
parent
2401de49
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Library/Homebrew/test/caveats_spec.rb
+29
-0
29 additions, 0 deletions
Library/Homebrew/test/caveats_spec.rb
Library/Homebrew/test/caveats_test.rb
+0
-30
0 additions, 30 deletions
Library/Homebrew/test/caveats_test.rb
with
29 additions
and
30 deletions
Library/Homebrew/test/caveats_spec.rb
0 → 100644
+
29
−
0
View file @
ac2cafe1
require
"formula"
require
"caveats"
describe
Caveats
do
subject
{
described_class
.
new
(
f
)
}
let
(
:f
)
{
formula
{
url
"foo-1.0"
}
}
specify
"#f"
do
expect
(
subject
.
f
).
to
eq
(
f
)
end
describe
"#empty?"
do
it
"returns true if the Formula has no caveats"
do
expect
(
subject
).
to
be_empty
end
it
"returns false if the Formula has caveats"
do
f
=
formula
do
url
"foo-1.0"
def
caveats
"something"
end
end
expect
(
described_class
.
new
(
f
)).
not_to
be_empty
end
end
end
This diff is collapsed.
Click to expand it.
Library/Homebrew/test/caveats_test.rb
deleted
100644 → 0
+
0
−
30
View file @
2401de49
require
"testing_env"
require
"formula"
require
"caveats"
class
CaveatsTests
<
Homebrew
::
TestCase
def
setup
super
@f
=
formula
{
url
"foo-1.0"
}
@c
=
Caveats
.
new
@f
end
def
test_f
assert_equal
@f
,
@c
.
f
end
def
test_empty?
assert
@c
.
empty?
f
=
formula
do
url
"foo-1.0"
def
caveats
"something"
end
end
c
=
Caveats
.
new
f
refute
c
.
empty?
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