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
cb2942f8
Commit
cb2942f8
authored
May 16, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Specs] Adapting existing specs for recent changes.
parent
2426f95c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
15 deletions
+18
-15
spec_spec.rb
spec/functional/command/spec_spec.rb
+12
-6
integration_spec.rb
spec/integration_spec.rb
+1
-1
spec_spec.rb
spec/unit/command/spec_spec.rb
+4
-4
documentation_spec.rb
spec/unit/generator/documentation_spec.rb
+1
-4
local_pod_spec.rb
spec/unit/local_pod_spec.rb
+0
-0
No files found.
spec/functional/command/spec_spec.rb
View file @
cb2942f8
...
@@ -125,17 +125,23 @@ describe "Pod::Command::Spec#lint" do
...
@@ -125,17 +125,23 @@ describe "Pod::Command::Spec#lint" do
end
end
end
end
before
do
text
=
(
fixture
(
'spec-repos'
)
+
'master/JSONKit/1.4/JSONKit.podspec'
).
read
text
.
gsub!
(
/.*license.*/
,
""
)
file
=
temporary_directory
+
'JSONKit.podspec'
File
.
open
(
file
,
'w'
)
{
|
f
|
f
.
write
(
text
)
}
@spec_path
=
file
.
to_s
end
it
"lints a givent podspec"
do
it
"lints a givent podspec"
do
spec_file
=
fixture
(
'spec-repos'
)
+
'master/JSONKit/1.4/JSONKit.podspec'
cmd
=
command
(
'spec'
,
'lint'
,
'--quick'
,
@spec_path
)
cmd
=
command
(
'spec'
,
'lint'
,
'--quick'
,
spec_file
.
to_s
)
lambda
{
cmd
.
run
}.
should
.
raise
Pod
::
Informative
lambda
{
cmd
.
run
}.
should
.
raise
Pod
::
Informative
cmd
.
output
.
should
.
include
"Missing license
file or text
"
cmd
.
output
.
should
.
include
"Missing license
type
"
end
end
it
"respects the -only--errors option"
do
it
"respects the -only--errors option"
do
spec_file
=
fixture
(
'spec-repos'
)
+
'master/JSONKit/1.4/JSONKit.podspec'
cmd
=
command
(
'spec'
,
'lint'
,
'--quick'
,
'--only-errors'
,
@spec_path
)
cmd
=
command
(
'spec'
,
'lint'
,
'--quick'
,
'--only-errors'
,
spec_file
.
to_s
)
lambda
{
cmd
.
run
}.
should
.
not
.
raise
lambda
{
cmd
.
run
}.
should
.
not
.
raise
cmd
.
output
.
should
.
include
"Missing license
file or text
"
cmd
.
output
.
should
.
include
"Missing license
type
"
end
end
end
end
spec/integration_spec.rb
View file @
cb2942f8
...
@@ -155,7 +155,7 @@ else
...
@@ -155,7 +155,7 @@ else
end
end
end
end
Pod
::
Specification
.
any_instance
.
stubs
(
:
clean_paths
).
returns
([
'JSONKit/
CHANGELOG.md'
])
Pod
::
Specification
.
any_instance
.
stubs
(
:
preserve_paths
).
returns
([
'
CHANGELOG.md'
])
installer
=
SpecHelper
::
Installer
.
new
(
podfile
)
installer
=
SpecHelper
::
Installer
.
new
(
podfile
)
installer
.
install!
installer
.
install!
...
...
spec/unit/command/spec_spec.rb
View file @
cb2942f8
...
@@ -53,7 +53,7 @@ describe "Pod::Command::Spec::Linter" do
...
@@ -53,7 +53,7 @@ describe "Pod::Command::Spec::Linter" do
end
end
it
"fails validation if the specification contains warnings"
do
it
"fails validation if the specification contains warnings"
do
spec
,
file
=
write_podspec
(
stub_podspec
)
spec
,
file
=
write_podspec
(
stub_podspec
(
/.*license.*/
,
""
)
)
linter
=
Pod
::
Command
::
Spec
::
Linter
.
new
(
spec
)
linter
=
Pod
::
Command
::
Spec
::
Linter
.
new
(
spec
)
linter
.
lenient
,
linter
.
quick
=
false
,
true
linter
.
lenient
,
linter
.
quick
=
false
,
true
linter
.
lint
.
should
==
false
linter
.
lint
.
should
==
false
...
@@ -62,7 +62,7 @@ describe "Pod::Command::Spec::Linter" do
...
@@ -62,7 +62,7 @@ describe "Pod::Command::Spec::Linter" do
end
end
it
"validates in lenient mode if there are no erros but there are warnings"
do
it
"validates in lenient mode if there are no erros but there are warnings"
do
spec
,
file
=
write_podspec
(
stub_podspec
)
spec
,
file
=
write_podspec
(
stub_podspec
(
/.*license.*/
,
""
)
)
linter
=
Pod
::
Command
::
Spec
::
Linter
.
new
(
spec
)
linter
=
Pod
::
Command
::
Spec
::
Linter
.
new
(
spec
)
linter
.
lenient
,
linter
.
quick
=
true
,
true
linter
.
lenient
,
linter
.
quick
=
true
,
true
linter
.
lint
.
should
==
true
linter
.
lint
.
should
==
true
...
@@ -87,7 +87,7 @@ describe "Pod::Command::Spec::Linter" do
...
@@ -87,7 +87,7 @@ describe "Pod::Command::Spec::Linter" do
linter
.
lenient
,
linter
.
quick
=
false
,
true
linter
.
lenient
,
linter
.
quick
=
false
,
true
linter
.
lint
.
should
==
false
linter
.
lint
.
should
==
false
linter
.
errors
.
should
.
be
.
empty
linter
.
errors
.
should
.
be
.
empty
linter
.
warnings
.
join
(
' | '
).
should
=~
/`config.ios\?' and `config.osx\?' are deprecated
and will be removed in version 0.7
/
linter
.
warnings
.
join
(
' | '
).
should
=~
/`config.ios\?' and `config.osx\?' are deprecated/
end
end
it
"uses xcodebuild to generate notes and warnings"
do
it
"uses xcodebuild to generate notes and warnings"
do
...
@@ -104,6 +104,6 @@ describe "Pod::Command::Spec::Linter" do
...
@@ -104,6 +104,6 @@ describe "Pod::Command::Spec::Linter" do
linter
.
stubs
(
:xcodebuild_output
).
returns
([])
linter
.
stubs
(
:xcodebuild_output
).
returns
([])
linter
.
lenient
,
linter
.
quick
=
false
,
false
linter
.
lenient
,
linter
.
quick
=
false
,
false
linter
.
lint
.
should
==
false
linter
.
lint
.
should
==
false
linter
.
errors
.
join
(
' | '
).
should
.
include
"
[resources = 'WRONG_FOLDER'] ->
did not match any file"
linter
.
errors
.
join
(
' | '
).
should
.
include
"
The resources
did not match any file"
end
end
end
end
spec/unit/generator/documentation_spec.rb
View file @
cb2942f8
...
@@ -19,10 +19,7 @@ describe Pod::Generator::Documentation do
...
@@ -19,10 +19,7 @@ describe Pod::Generator::Documentation do
end
end
it
'returns the Pod documentation documentation files'
do
it
'returns the Pod documentation documentation files'
do
@doc_installer
.
files
.
sort
.
should
==
[
@doc_installer
.
files
.
sort
.
should
==
%w[ Classes/Banana.m Classes/Banana.h ]
.
sort
(
@pod
.
root
+
"Classes/Banana.m"
).
to_s
,
(
@pod
.
root
+
"Classes/Banana.h"
).
to_s
,
].
sort
end
end
it
'returns the Pod documentation options'
do
it
'returns the Pod documentation options'
do
...
...
spec/unit/local_pod_spec.rb
View file @
cb2942f8
This diff is collapsed.
Click to expand it.
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