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
5e850082
Commit
5e850082
authored
Nov 04, 2013
by
Maximilian Tagher
Committed by
Fabio Pelosin
Nov 14, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor some `pod spec COMMAND` tests and add browse tests
parent
4a0d6098
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
7 deletions
+26
-7
spec_spec.rb
spec/functional/command/spec_spec.rb
+26
-7
No files found.
spec/functional/command/spec_spec.rb
View file @
5e850082
...
...
@@ -15,6 +15,7 @@ module Pod
lambda
{
run_command
(
'spec'
,
'which'
)
}.
should
.
raise
CLAide
::
Help
lambda
{
run_command
(
'spec'
,
'cat'
)
}.
should
.
raise
CLAide
::
Help
lambda
{
run_command
(
'spec'
,
'edit'
)
}.
should
.
raise
CLAide
::
Help
lambda
{
run_command
(
'spec'
,
'browse'
)
}.
should
.
raise
CLAide
::
Help
end
end
...
...
@@ -174,32 +175,50 @@ module Pod
#-------------------------------------------------------------------------#
de
scribe
Command
::
Spec
::
Which
do
de
f
it_should_check_for_existence
(
command
)
it
"errors if a given podspec doesn't exist"
do
e
=
lambda
{
command
(
'spec'
,
'which'
,
'some_pod_that_doesnt_exist'
).
run
}.
should
.
raise
Informative
e
=
lambda
{
command
(
'spec'
,
command
,
'some_pod_that_doesnt_exist'
).
run
}.
should
.
raise
Informative
e
.
message
.
should
.
match
/Unable to find a pod with/
end
end
def
it_should_check_for_ambiguity
(
command
)
it
"complains provided spec name is ambigious"
do
e
=
lambda
{
command
(
'spec'
,
command
,
'AF'
).
run
}.
should
.
raise
Informative
e
.
message
.
should
.
match
/More than one/
end
end
describe
Command
::
Spec
::
Which
do
it_should_check_for_existence
(
"which"
)
it_should_check_for_ambiguity
(
"which"
)
it
"prints the path of a given podspec"
do
lambda
{
command
(
'spec'
,
'which'
,
'AFNetworking'
).
run
}.
should
.
not
.
raise
text
=
"AFNetworking.podspec"
UI
.
output
.
should
.
include
text
.
gsub
(
/\n/
,
''
)
end
it
"complains provided spec name is ambigious"
do
e
=
lambda
{
command
(
'spec'
,
'cat'
,
'AF'
).
run
}.
should
.
raise
Informative
e
.
message
.
should
.
match
/More than one/
end
end
#-------------------------------------------------------------------------#
describe
Command
::
Spec
::
Cat
do
it_should_check_for_existence
(
"cat"
)
it_should_check_for_ambiguity
(
"cat"
)
end
#-------------------------------------------------------------------------#
describe
Command
::
Spec
::
Edit
do
it_should_check_for_existence
(
"edit"
)
it_should_check_for_ambiguity
(
"edit"
)
end
#-------------------------------------------------------------------------#
describe
Command
::
Spec
::
Browse
do
it_should_check_for_existence
(
"browse"
)
it_should_check_for_ambiguity
(
"browse"
)
end
#-------------------------------------------------------------------------#
...
...
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