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
2571e819
Commit
2571e819
authored
Oct 07, 2014
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ResolverSpec] Add a test case for when the second source has the only matching version
parent
7563e8b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
resolver_spec.rb
spec/unit/resolver_spec.rb
+22
-1
No files found.
spec/unit/resolver_spec.rb
View file @
2571e819
...
...
@@ -234,7 +234,27 @@ COCOAPODS: 0.33.1
version
.
to_s
.
should
==
'2.5.1'
end
it
'takes into account the order of the sources'
do
it
'consults all sources when finding a matching spec'
do
podfile
=
Podfile
.
new
do
platform
:ios
pod
'JSONKit'
,
'> 2'
end
file
=
fixture
(
'spec-repos/test_repo/JSONKit/999.999.999/JSONKit.podspec'
)
sources
=
SourcesManager
.
sources
(
%w(master test_repo)
)
resolver
=
Resolver
.
new
(
config
.
sandbox
,
podfile
,
[],
sources
)
spec
=
resolver
.
resolve
.
values
.
flatten
.
first
spec
.
version
.
to_s
.
should
==
'999.999.999'
spec
.
defined_in_file
.
should
==
file
sources
=
SourcesManager
.
sources
(
%w(test_repo master)
)
resolver
=
Resolver
.
new
(
config
.
sandbox
,
podfile
,
[],
sources
)
spec
=
resolver
.
resolve
.
values
.
flatten
.
first
spec
.
version
.
to_s
.
should
==
'999.999.999'
resolver
.
resolve
.
values
.
flatten
.
first
.
defined_in_file
.
should
==
file
end
it
'warns and chooses the first source when multiple sources contain '
\
'a pod'
do
podfile
=
Podfile
.
new
do
platform
:ios
pod
'JSONKit'
,
'1.4'
...
...
@@ -251,6 +271,7 @@ COCOAPODS: 0.33.1
spec
.
version
.
to_s
.
should
==
'1.4'
resolver
.
resolve
.
values
.
flatten
.
first
.
defined_in_file
.
should
==
fixture
(
'spec-repos/test_repo/JSONKit/1.4/JSONKit.podspec'
)
UI
.
warnings
.
should
.
match
/multiple specifications/
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