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
faeef372
Commit
faeef372
authored
Jun 26, 2015
by
Boris Bügling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed specs.
parent
4c093ab3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
push_spec.rb
spec/functional/command/repo/push_spec.rb
+2
-0
validator_spec.rb
spec/unit/validator_spec.rb
+9
-6
No files found.
spec/functional/command/repo/push_spec.rb
View file @
faeef372
...
...
@@ -127,6 +127,7 @@ module Pod
it
'validates specs as frameworks by default'
do
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
true
).
times
(
3
)
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
true
).
twice
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
true
).
twice
cmd
=
command
(
'repo'
,
'push'
,
'master'
)
Dir
.
chdir
(
temporary_directory
)
{
cmd
.
run
}
...
...
@@ -135,6 +136,7 @@ module Pod
it
'validates specs as libraries if requested'
do
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
false
).
times
(
3
)
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
false
).
twice
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
false
).
twice
cmd
=
command
(
'repo'
,
'push'
,
'master'
,
'--use-libraries'
)
Dir
.
chdir
(
temporary_directory
)
{
cmd
.
run
}
...
...
spec/unit/validator_spec.rb
View file @
faeef372
...
...
@@ -267,9 +267,9 @@ module Pod
file
=
write_podspec
(
stub_podspec
)
validator
=
Validator
.
new
(
file
,
SourcesManager
.
master
.
map
(
&
:url
))
validator
.
stubs
(
:validate_url
)
validator
.
expects
(
:install_pod
).
t
wice
validator
.
expects
(
:build_pod
).
t
wice
validator
.
expects
(
:check_file_patterns
).
t
wice
validator
.
expects
(
:install_pod
).
t
imes
(
3
)
validator
.
expects
(
:build_pod
).
t
imes
(
3
)
validator
.
expects
(
:check_file_patterns
).
t
imes
(
3
)
validator
.
validate
end
...
...
@@ -309,6 +309,7 @@ module Pod
validator
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
nil
).
once
validator
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
nil
).
once
validator
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
'7.0'
,
nil
).
once
validator
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
nil
).
once
validator
.
send
(
:perform_extensive_analysis
,
validator
.
spec
)
end
...
...
@@ -377,7 +378,7 @@ module Pod
validator
=
Validator
.
new
(
podspec_path
,
SourcesManager
.
master
.
map
(
&
:url
))
validator
.
stubs
(
:check_file_patterns
)
validator
.
stubs
(
:validate_url
)
validator
.
expects
(
:`
).
with
(
'which xcodebuild'
).
t
wice
.
returns
(
'/usr/bin/xcodebuild'
)
validator
.
expects
(
:`
).
with
(
'which xcodebuild'
).
t
imes
(
3
)
.
returns
(
'/usr/bin/xcodebuild'
)
status
=
mock
status
.
stubs
(
:success?
).
returns
(
false
)
validator
.
stubs
(
:_xcodebuild
).
returns
([
'Output'
,
status
])
...
...
@@ -392,9 +393,9 @@ module Pod
validator
=
Validator
.
new
(
podspec_path
,
SourcesManager
.
master
.
map
(
&
:url
))
validator
.
stubs
(
:check_file_patterns
)
validator
.
stubs
(
:validate_url
)
validator
.
expects
(
:`
).
with
(
'which xcodebuild'
).
t
wice
.
returns
(
'/usr/bin/xcodebuild'
)
validator
.
expects
(
:`
).
with
(
'which xcodebuild'
).
t
imes
(
3
)
.
returns
(
'/usr/bin/xcodebuild'
)
command
=
'xcodebuild clean build -target Pods'
validator
.
expects
(
:`
).
with
(
"
#{
command
}
2>&1"
).
on
ce
.
returns
(
''
)
validator
.
expects
(
:`
).
with
(
"
#{
command
}
2>&1"
).
twi
ce
.
returns
(
''
)
validator
.
expects
(
:`
).
with
(
"
#{
command
}
CODE_SIGN_IDENTITY=- -sdk iphonesimulator 2>&1"
).
once
.
returns
(
''
)
validator
.
validate
end
...
...
@@ -514,6 +515,7 @@ module Pod
@validator
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
true
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
true
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
true
).
once
@validator
.
send
(
:perform_extensive_analysis
,
@validator
.
spec
)
end
...
...
@@ -524,6 +526,7 @@ module Pod
@validator
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
false
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
false
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
false
).
once
@validator
.
send
(
:perform_extensive_analysis
,
@validator
.
spec
)
end
end
...
...
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