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
4b4ff758
Commit
4b4ff758
authored
Aug 18, 2016
by
Ben Asher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added more specs
parent
c325e4be
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
1 deletion
+46
-1
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+1
-1
analyzer_spec.rb
spec/unit/installer/analyzer_spec.rb
+45
-0
No files found.
lib/cocoapods/installer/analyzer.rb
View file @
4b4ff758
...
@@ -328,7 +328,7 @@ module Pod
...
@@ -328,7 +328,7 @@ module Pod
target_definitions
.
each
do
|
target_definition
|
target_definitions
.
each
do
|
target_definition
|
check_prop
.
call
(
host_target_definition
,
target_definition
,
:platform
,
'do not use the same platform'
)
check_prop
.
call
(
host_target_definition
,
target_definition
,
:platform
,
'do not use the same platform'
)
check_prop
.
call
(
host_target_definition
,
target_definition
,
:uses_frameworks?
,
'do not both set use_frameworks!'
)
check_prop
.
call
(
host_target_definition
,
target_definition
,
:uses_frameworks?
,
'do not both set use_frameworks!'
)
check_prop
.
call
(
host_target_definition
,
target_definition
,
:swift_version
,
'do not
both
use the same Swift version'
)
check_prop
.
call
(
host_target_definition
,
target_definition
,
:swift_version
,
'do not use the same Swift version'
)
end
end
end
end
...
...
spec/unit/installer/analyzer_spec.rb
View file @
4b4ff758
...
@@ -785,6 +785,51 @@ module Pod
...
@@ -785,6 +785,51 @@ module Pod
analyzer
.
analyze
analyzer
.
analyze
end
.
message
.
should
.
match
/Sample Extensions Project \(false\) and Today Extension \(true\) do not both set use_frameworks!\./
end
.
message
.
should
.
match
/Sample Extensions Project \(false\) and Today Extension \(true\) do not both set use_frameworks!\./
end
end
it
'raises when the extension and host target use different swift versions'
do
podfile
=
Pod
::
Podfile
.
new
do
source
SpecHelper
.
test_repo_url
platform
:ios
,
'8.0'
use_frameworks!
project
'Sample Extensions Project/Sample Extensions Project'
target
'Sample Extensions Project'
do
pod
'JSONKit'
,
'1.4'
end
target
'Today Extension'
do
pod
'monkey'
end
end
podfile
.
target_definitions
[
'Sample Extensions Project'
].
stubs
(
:swift_version
).
returns
(
'2.3'
)
podfile
.
target_definitions
[
'Today Extension'
].
stubs
(
:swift_version
).
returns
(
'3.0'
)
analyzer
=
Pod
::
Installer
::
Analyzer
.
new
(
config
.
sandbox
,
podfile
)
should
.
raise
Informative
do
analyzer
.
analyze
end
.
message
.
should
.
match
/Sample Extensions Project \(2\.3\) and Today Extension \(3\.0\) do not use the same Swift version\./
end
it
'raises when the extension and host target use different platforms'
do
podfile
=
Pod
::
Podfile
.
new
do
source
SpecHelper
.
test_repo_url
platform
:ios
,
'8.0'
use_frameworks!
project
'Sample Extensions Project/Sample Extensions Project'
target
'Sample Extensions Project'
do
pod
'JSONKit'
,
'1.4'
end
target
'Today Extension'
do
pod
'monkey'
end
end
podfile
.
target_definitions
[
'Sample Extensions Project'
].
stubs
(
:platform
).
returns
(
Platform
.
new
(
:osx
,
'10.6'
))
analyzer
=
Pod
::
Installer
::
Analyzer
.
new
(
config
.
sandbox
,
podfile
)
should
.
raise
Informative
do
analyzer
.
analyze
end
.
message
.
should
.
match
/Sample Extensions Project \(OS X 10\.6\) and Today Extension \(iOS 8\.0\) do not use the same platform\./
end
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