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
d40348d1
Commit
d40348d1
authored
Mar 05, 2016
by
Muhammed Yavuz Nuzumlali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Spec] Add specs for implicit local pod unlocking
parent
10b9443e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
0 deletions
+51
-0
analyzer_spec.rb
spec/unit/installer/analyzer_spec.rb
+51
-0
No files found.
spec/unit/installer/analyzer_spec.rb
View file @
d40348d1
...
...
@@ -439,6 +439,57 @@ module Pod
version
.
to_s
.
should
==
'2.4.1'
end
it
'unlocks only local pod when specification checksum changes'
do
sandbox
=
config
.
sandbox
local_spec
=
Specification
.
from_hash
(
'name'
=>
'LocalPod'
,
'version'
=>
'1.1'
,
'dependencies'
=>
{
'Expecta'
=>
[
'~> 0.0'
]
})
sandbox
.
stubs
(
:specification
).
with
(
'LocalPod'
).
returns
(
local_spec
)
podfile
=
Podfile
.
new
do
platform
:ios
,
'8.0'
project
'SampleProject/SampleProject'
target
'SampleProject'
do
pod
'LocalPod'
,
:path
=>
'../'
end
end
hash
=
{}
hash
[
'PODS'
]
=
[
'Expecta (0.2.0)'
,
{
'LocalPod (1.0)'
=>
[
'Expecta (~> 0.0)'
]
}]
hash
[
'DEPENDENCIES'
]
=
[
'LocalPod (from `../`)'
]
hash
[
'EXTERNAL SOURCES'
]
=
{
'LocalPod'
=>
{
:path
=>
'../'
}
}
hash
[
'SPEC CHECKSUMS'
]
=
{
'LocalPod'
=>
'DUMMY_CHECKSUM'
}
hash
[
'COCOAPODS'
]
=
Pod
::
VERSION
lockfile
=
Pod
::
Lockfile
.
new
(
hash
)
analyzer
=
Installer
::
Analyzer
.
new
(
sandbox
,
podfile
,
lockfile
)
analyzer
.
analyze
(
false
).
specifications
.
find
{
|
s
|
s
.
name
==
'LocalPod'
}.
version
.
to_s
.
should
==
'1.1'
analyzer
.
analyze
(
false
).
specifications
.
find
{
|
s
|
s
.
name
==
'Expecta'
}.
version
.
to_s
.
should
==
'0.2.0'
end
it
'raises if change in local pod specification conflicts with lockfile'
do
sandbox
=
config
.
sandbox
local_spec
=
Specification
.
from_hash
(
'name'
=>
'LocalPod'
,
'version'
=>
'1.0'
,
'dependencies'
=>
{
'Expecta'
=>
[
'0.2.2'
]
})
sandbox
.
stubs
(
:specification
).
with
(
'LocalPod'
).
returns
(
local_spec
)
podfile
=
Podfile
.
new
do
platform
:ios
,
'8.0'
project
'SampleProject/SampleProject'
target
'SampleProject'
do
pod
'LocalPod'
,
:path
=>
'../'
end
end
hash
=
{}
hash
[
'PODS'
]
=
[
'Expecta (0.2.0)'
,
{
'LocalPod (1.0)'
=>
[
'Expecta (=0.2.0)'
]
}]
hash
[
'DEPENDENCIES'
]
=
[
'LocalPod (from `../`)'
]
hash
[
'EXTERNAL SOURCES'
]
=
{
'LocalPod'
=>
{
:path
=>
'../'
}
}
hash
[
'SPEC CHECKSUMS'
]
=
{}
hash
[
'COCOAPODS'
]
=
Pod
::
VERSION
lockfile
=
Pod
::
Lockfile
.
new
(
hash
)
analyzer
=
Installer
::
Analyzer
.
new
(
sandbox
,
podfile
,
lockfile
)
should
.
raise
(
Informative
)
do
analyzer
.
analyze
(
false
)
end
.
message
.
should
.
match
/You should run `pod update Expecta`/
end
#--------------------------------------#
it
'takes into account locked implicit dependencies'
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