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
20056d29
Commit
20056d29
authored
Jan 23, 2014
by
Joshua Kalpin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1756 from carsonmcdonald/moreliblintspecs
Add test for lint failures
parents
f1b648c4
bc4b8a90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
lib_spec.rb
spec/functional/command/lib_spec.rb
+35
-0
No files found.
spec/functional/command/lib_spec.rb
View file @
20056d29
...
@@ -27,6 +27,41 @@ module Pod
...
@@ -27,6 +27,41 @@ module Pod
UI
.
output
.
should
.
include
"passed validation"
UI
.
output
.
should
.
include
"passed validation"
end
end
end
end
it
"fails to lint a broken spec file and cleans up"
do
Dir
.
chdir
(
temporary_directory
)
do
open
(
temporary_directory
+
'Broken.podspec'
,
'w'
)
{
|
f
|
f
<<
'Pod::Spec.new do |spec|'
f
<<
"spec.name = 'Broken'"
f
<<
'end'
}
tmp_validator
=
Validator
.
new
(
'Broken.podspec'
)
lint_path
=
tmp_validator
.
validation_dir
lambda
{
run_command
(
'lib'
,
'lint'
,
'Broken.podspec'
)
}.
should
.
raise
Pod
::
Informative
UI
.
output
.
should
.
include
"Missing required attribute"
lint_path
.
exist?
.
should
==
false
end
end
it
"fails to lint a broken spec file and leaves lint directory"
do
Dir
.
chdir
(
temporary_directory
)
do
open
(
temporary_directory
+
'Broken.podspec'
,
'w'
)
{
|
f
|
f
<<
'Pod::Spec.new do |spec|'
f
<<
"spec.name = 'Broken'"
f
<<
'end'
}
lambda
{
run_command
(
'lib'
,
'lint'
,
'Broken.podspec'
,
'--no-clean'
)
}.
should
.
raise
Pod
::
Informative
UI
.
output
.
should
.
include
"Pods project available at"
UI
.
output
.
should
.
include
"Missing required attribute"
lint_dir
=
UI
.
output
[
/.*Pods project available at `(.*)` for inspection./
,
1
]
Pathname
.
new
(
lint_dir
).
exist?
.
should
==
true
end
end
end
end
describe
Command
::
Lib
do
describe
Command
::
Lib
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