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
8ae9f97c
Commit
8ae9f97c
authored
May 25, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Specs] Forgot to update the specs for the previous changes :-)
Bonus: stray #puts for debug.
parent
1bffe1cd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
local_pod.rb
lib/cocoapods/local_pod.rb
+0
-1
markdown_spec.rb
spec/unit/generator/acknowledgements/markdown_spec.rb
+3
-3
local_pod_spec.rb
spec/unit/local_pod_spec.rb
+4
-3
No files found.
lib/cocoapods/local_pod.rb
View file @
8ae9f97c
...
@@ -75,7 +75,6 @@ module Pod
...
@@ -75,7 +75,6 @@ module Pod
# it might prevent a bundle from being deleted
# it might prevent a bundle from being deleted
dirs
=
Dir
.
glob
(
root
+
"**/*"
,
File
::
FNM_DOTMATCH
)
dirs
=
Dir
.
glob
(
root
+
"**/*"
,
File
::
FNM_DOTMATCH
)
dirs
=
dirs
.
reject
{
|
d
|
d
.
end_with?
(
'.'
,
'..'
)
||
!
File
.
directory?
(
d
)
}.
sort_by
(
&
:length
).
reverse
dirs
=
dirs
.
reject
{
|
d
|
d
.
end_with?
(
'.'
,
'..'
)
||
!
File
.
directory?
(
d
)
}.
sort_by
(
&
:length
).
reverse
dirs
.
each
{
|
d
|
puts
d
}
dirs
.
each
{
|
d
|
FileUtils
.
rm_rf
(
d
)
if
File
.
symlink?
(
d
)
||
(
Dir
.
entries
(
d
)
==
%w[ . .. ]
)
}
dirs
.
each
{
|
d
|
FileUtils
.
rm_rf
(
d
)
if
File
.
symlink?
(
d
)
||
(
Dir
.
entries
(
d
)
==
%w[ . .. ]
)
}
end
end
...
...
spec/unit/generator/acknowledgements/markdown_spec.rb
View file @
8ae9f97c
...
@@ -13,11 +13,11 @@ describe Pod::Generator::Markdown do
...
@@ -13,11 +13,11 @@ describe Pod::Generator::Markdown do
it
"returns a correctly formatted title string"
do
it
"returns a correctly formatted title string"
do
@pods
[
0
].
unstub
(
:license_text
)
@pods
[
0
].
unstub
(
:license_text
)
@pods
[
0
].
unstub
(
:name
)
@pods
[
0
].
unstub
(
:name
)
@markdown
.
title_from_string
(
"A Title"
).
should
.
equal
"A Title
\n
-------
\n
"
@markdown
.
title_from_string
(
"A Title"
,
2
).
should
.
equal
"## A Title
"
end
end
it
"returns a correctly formatted license string for each pod"
do
it
"returns a correctly formatted license string for each pod"
do
@markdown
.
string_for_pod
(
@pods
[
0
]).
should
.
equal
"
POD_NAME
\n
--------
\n
LICENSE_TEXT
\n
"
@markdown
.
string_for_pod
(
@pods
[
0
]).
should
.
equal
"
\n
## POD_NAME
\n
\n
LICENSE_TEXT
\n
"
end
end
it
"returns a correctly formatted markdown string for the target"
do
it
"returns a correctly formatted markdown string for the target"
do
...
@@ -25,7 +25,7 @@ describe Pod::Generator::Markdown do
...
@@ -25,7 +25,7 @@ describe Pod::Generator::Markdown do
@markdown
.
stubs
(
:header_text
).
returns
(
"HEADER_TEXT"
)
@markdown
.
stubs
(
:header_text
).
returns
(
"HEADER_TEXT"
)
@markdown
.
stubs
(
:footnote_title
).
returns
(
""
)
# Test that extra \n isn't added for empty strings
@markdown
.
stubs
(
:footnote_title
).
returns
(
""
)
# Test that extra \n isn't added for empty strings
@markdown
.
stubs
(
:footnote_text
).
returns
(
"FOOTNOTE_TEXT"
)
@markdown
.
stubs
(
:footnote_text
).
returns
(
"FOOTNOTE_TEXT"
)
@markdown
.
licenses
.
should
.
equal
"
HEADER_TITLE
\n
------------
\n
HEADER_TEXT
\n
POD_NAME
\n
--------
\n
LICENSE_TEXT
\n
FOOTNOTE_TEXT
\n
"
@markdown
.
licenses
.
should
.
equal
"
# HEADER_TITLE
\n
HEADER_TEXT
\n\n
## POD_NAME
\n
\n
LICENSE_TEXT
\n
FOOTNOTE_TEXT
\n
"
end
end
it
"writes a markdown file to disk"
do
it
"writes a markdown file to disk"
do
...
...
spec/unit/local_pod_spec.rb
View file @
8ae9f97c
...
@@ -37,9 +37,10 @@ describe Pod::LocalPod do
...
@@ -37,9 +37,10 @@ describe Pod::LocalPod do
].
sort
].
sort
end
end
it
'returns an expanded list of absolute clean paths'
do
it
'returns an expanded list the files to clean'
do
#TODO: there are some temporary files that prevent a complete check
clean_files
=
@pod
.
clean_files
.
map
{
|
p
|
p
.
to_s
}
@pod
.
clean_paths
.
map
{
|
p
|
p
.
relative_path_from
(
@sandbox
.
root
).
to_s
}.
should
.
include
'BananaLib/sub-dir/sub-dir-2/somefile.txt'
clean_files
.
should
.
include
"
#{
@sandbox
.
root
}
/BananaLib/.git/config"
clean_files
.
reject
{
|
p
|
p
.
to_s
.
include?
(
'/.git/'
)
}.
should
==
[
"
#{
@sandbox
.
root
}
/BananaLib/sub-dir/sub-dir-2/somefile.txt"
]
end
end
it
'returns an expanded list of resources, relative to the sandbox root'
do
it
'returns an expanded list of resources, relative to the sandbox root'
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