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
5690b44c
Commit
5690b44c
authored
Aug 24, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Issue#376] Added specs that evidence architectural issues.
parent
8a61d2db
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
1 deletion
+50
-1
Reachability
spec/fixtures/integration/Reachability
+1
-1
installer_spec.rb
spec/unit/installer_spec.rb
+49
-0
No files found.
Reachability
@
6116b0a3
Subproject commit
c8a3e521ee57ce2e6fa73c55a3e2f0042cc2033a
Subproject commit
6116b0a386a0313d7183ea219be1b51d56962546
spec/unit/installer_spec.rb
View file @
5690b44c
...
...
@@ -33,6 +33,55 @@ module Pod
end
end
describe
"concerning multiple pods originating form the same spec"
do
extend
SpecHelper
::
Fixture
before
do
sandbox
=
temporary_sandbox
Pod
::
Config
.
instance
.
project_pods_root
=
sandbox
.
root
Pod
::
Config
.
instance
.
integrate_targets
=
false
podspec_path
=
fixture
(
'integration/Reachability/Reachability.podspec'
)
podfile
=
Podfile
.
new
do
platform
:osx
pod
'Reachability'
,
:podspec
=>
podspec_path
.
to_s
target
:debug
do
pod
'Reachability'
end
end
resolver
=
Resolver
.
new
(
podfile
,
nil
,
sandbox
)
@installer
=
Installer
.
new
(
resolver
)
end
# The double installation leads to a bug when different subspecs are
# activated for the same pod. We need a way to install a pod only
# once while keeping all the files of the actived subspecs.
#
# LocalPodSet?
#
it
"installs the pods only once"
do
LocalPod
.
any_instance
.
stubs
(
:downloaded?
).
returns
(
false
)
Downloader
::
GitHub
.
any_instance
.
expects
(
:download
).
once
@installer
.
install!
end
it
"cleans a pod only once"
do
LocalPod
.
any_instance
.
expects
(
:clean!
).
once
@installer
.
install!
end
it
"adds the files of the pod to the Pods project only once"
do
@installer
.
install!
group
=
@installer
.
project
.
pods
.
groups
.
find
{
|
g
|
g
.
name
==
'Reachability'
}
group
.
files
.
map
(
&
:name
).
should
==
[
"Reachability.h"
,
"Reachability.m"
]
end
it
"it list a pod only once"
do
reachability_pods
=
@installer
.
pods
.
map
(
&
:to_s
).
select
{
|
s
|
s
.
include?
(
'Reachability'
)}
reachability_pods
.
count
.
should
==
1
end
end
it
"generates a BridgeSupport metadata file from all the pod headers"
do
podfile
=
Podfile
.
new
do
platform
:osx
...
...
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