Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
c9bb0fa1
Commit
c9bb0fa1
authored
Dec 26, 2015
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Analyzer] Test podfile validation
parent
9b11b799
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
analyzer_spec.rb
spec/unit/installer/analyzer_spec.rb
+26
-0
No files found.
spec/unit/installer/analyzer_spec.rb
View file @
c9bb0fa1
...
...
@@ -608,6 +608,32 @@ module Pod
end
end
describe
'podfile validation'
do
before
do
@sandbox
=
stub
(
'Sandbox'
)
@podfile
=
stub
(
'Podfile'
)
@analyzer
=
Installer
::
Analyzer
.
new
(
@sandbox
,
@podfile
)
end
it
'raises when validating errors'
do
Installer
::
PodfileValidator
.
any_instance
.
expects
(
:validate
)
Installer
::
PodfileValidator
.
any_instance
.
expects
(
:valid?
).
returns
(
false
)
Installer
::
PodfileValidator
.
any_instance
.
stubs
(
:errors
).
returns
([
'ERROR'
])
should
.
raise
(
Informative
)
{
@analyzer
.
send
(
:validate_podfile!
)
}.
message
.
should
.
match
/ERROR/
end
it
'warns when validating has warnings'
do
Installer
::
PodfileValidator
.
any_instance
.
expects
(
:validate
)
Installer
::
PodfileValidator
.
any_instance
.
expects
(
:valid?
).
returns
(
true
)
Installer
::
PodfileValidator
.
any_instance
.
stubs
(
:warnings
).
returns
([
'The Podfile does not contain any dependencies.'
])
@analyzer
.
send
(
:validate_podfile!
)
UI
.
warnings
.
should
==
"The Podfile does not contain any dependencies.
\n
"
end
end
describe
'using lockfile checkout options'
do
before
do
@podfile
=
Pod
::
Podfile
.
new
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment