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
fbcb700b
Commit
fbcb700b
authored
Aug 23, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[LocalSource] Specs.
parent
9e8c7b56
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
0 deletions
+59
-0
local_pod_spec.rb
spec/unit/local_pod_spec.rb
+53
-0
specification_spec.rb
spec/unit/specification_spec.rb
+6
-0
No files found.
spec/unit/local_pod_spec.rb
View file @
fbcb700b
...
...
@@ -323,4 +323,57 @@ describe Pod::LocalPod do
public_headers
.
should
==
%w{ UIKit.h }
end
end
describe
"concerning a Pod with a local source"
do
extend
SpecHelper
::
TemporaryDirectory
before
do
@local_path
=
temporary_directory
+
'localBanana'
@sandbox
=
temporary_sandbox
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@spec
.
source
=
{
:local
=>
@local_path
}
@pod
=
Pod
::
LocalPod
::
LocalSourcedPod
.
new
(
@spec
,
@sandbox
,
Pod
::
Platform
.
new
(
:ios
))
end
it
"is marked as local"
do
@pod
.
to_s
.
should
.
include?
'[LOCAL]'
end
it
"is marked as downloaded"
do
@pod
.
downloaded?
.
should
.
be
.
true
end
it
"correctly repports the root of the pod"
do
@pod
.
root
.
should
==
@local_path
end
it
"doesn't create the root"
do
@pod
.
create
@local_path
.
exist?
.
should
.
be
.
false
end
before
do
FileUtils
.
cp_r
(
fixture
(
'banana-lib'
),
@local_path
)
end
it
"doesn't cleans the user files"
do
useless_file
=
@local_path
+
'useless.txt'
FileUtils
.
touch
(
useless_file
)
@pod
.
root
.
should
==
@local_path
@pod
.
clean!
useless_file
.
exist?
.
should
.
be
.
true
end
it
"doesn't implode"
do
@pod
.
implode
@local_path
.
exist?
.
should
.
be
.
true
end
it
"detects the files of the pod"
do
@pod
.
source_files
.
map
{
|
path
|
path
.
to_s
.
gsub
(
/.*tmp\//
,
''
)
}.
sort
.
should
==
[
"localBanana/Classes/Banana.m"
,
"localBanana/Classes/Banana.h"
].
sort
end
end
end
spec/unit/specification_spec.rb
View file @
fbcb700b
...
...
@@ -230,6 +230,12 @@ describe "A Pod::Specification, in general," do
@spec
.
platform
=
:ios
@spec
.
activate_platform
(
:ios
).
should
==
@spec
end
it
"it handles local sources"
do
@spec
.
activate_platform
(
:ios
)
@spec
.
source
=
{
:local
=>
'/tmp/local/path'
}
@spec
.
local?
.
should
.
be
.
true
end
end
describe
"A Pod::Specification, hierarchy"
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