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
5467b1f4
Commit
5467b1f4
authored
Nov 12, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the search spec less brittle.
parent
97b8bb7b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
38 deletions
+8
-38
command_spec.rb
spec/functional/command_spec.rb
+8
-38
No files found.
spec/functional/command_spec.rb
View file @
5467b1f4
...
@@ -66,61 +66,31 @@ describe "Pod::Command" do
...
@@ -66,61 +66,31 @@ describe "Pod::Command" do
it
"searches for a pod with name matching the given query ignoring case"
do
it
"searches for a pod with name matching the given query ignoring case"
do
[
[
[
[
' s '
,
%w{ ASIHTTPRequest ASIWebPageRequest JSONKit SSZipArchive }
],
' s '
,
[
'json'
,
%w{ JSONKit SBJson }
],
"==> ASIHTTPRequest (1.8.1)
\n
"
\
].
each
do
|
query
,
results
|
" Easy to use CFNetwork wrapper for HTTP requests, Objective-C, "
\
"Mac OS X and iPhone
\n\n
"
\
"==> ASIWebPageRequest (1.8.1)
\n
"
\
" The ASIWebPageRequest class included with ASIHTTPRequest lets you "
\
"download
\n
complete webpages, including external resources like "
\
"images and stylesheets.
\n\n
"
\
"==> JSONKit (1.4)
\n
"
\
" A Very High Performance Objective-C JSON Library.
\n\n
"
\
"==> SSZipArchive (0.1.0)
\n
"
\
" Utility class for unzipping files on iOS and Mac.
\n\n
"
],
[
'json'
,
"==> JSONKit (1.4)
\n
"
\
" A Very High Performance Objective-C JSON Library.
\n\n
"
,
]
].
each
do
|
query
,
result
|
command
=
Pod
::
Command
.
parse
(
'search'
,
'--silent'
,
query
)
command
=
Pod
::
Command
.
parse
(
'search'
,
'--silent'
,
query
)
def
command
.
puts
(
msg
=
''
)
def
command
.
puts
(
msg
=
''
)
(
@printed
||=
''
)
<<
"
#{
msg
}
\n
"
(
@printed
||=
''
)
<<
"
#{
msg
}
\n
"
end
end
command
.
run
command
.
run
printed
=
command
.
instance_variable_get
(
:@printed
)
printed
=
command
.
instance_variable_get
(
:@printed
)
result
.
split
(
"
\n\n
"
)
.
each
{
|
pod
|
printed
.
should
.
include?
pod
}
result
s
.
each
{
|
pod
|
printed
.
should
.
include?
pod
}
end
end
end
end
it
"searches for a pod with name, summary, or description matching the given query ignoring case"
do
it
"searches for a pod with name, summary, or description matching the given query ignoring case"
do
[
[
[
[
'systemCONfiguration'
,
%w{ Reachablity }
],
'systemCONfiguration'
,
[
'is'
,
%w{ ASIHTTPRequest Reachablity SSZipArchive }
],
"==> Reachability (2.0.4)
\n
"
\
].
each
do
|
query
,
results
|
" A wrapper for the SystemConfiguration Reachablity APIs.
\n\n
"
,
],
[
'is'
,
"==> ASIHTTPRequest (1.8.1)
\n
"
\
" Easy to use CFNetwork wrapper for HTTP requests, Objective-C, "
\
"Mac OS X and iPhone
\n\n
"
\
"==> Reachability (2.0.4)
\n
"
\
" A wrapper for the SystemConfiguration Reachablity APIs.
\n\n
"
\
"==> SSZipArchive (0.1.0)
\n
"
\
" Utility class for unzipping files on iOS and Mac.
\n\n
"
]
].
each
do
|
query
,
result
|
command
=
Pod
::
Command
.
parse
(
'search'
,
'--silent'
,
'--full'
,
query
)
command
=
Pod
::
Command
.
parse
(
'search'
,
'--silent'
,
'--full'
,
query
)
def
command
.
puts
(
msg
=
''
)
def
command
.
puts
(
msg
=
''
)
(
@printed
||=
''
)
<<
"
#{
msg
}
\n
"
(
@printed
||=
''
)
<<
"
#{
msg
}
\n
"
end
end
command
.
run
command
.
run
printed
=
command
.
instance_variable_get
(
:@printed
)
printed
=
command
.
instance_variable_get
(
:@printed
)
result
.
split
(
"
\n\n
"
)
.
each
{
|
pod
|
printed
.
should
.
include?
pod
}
result
s
.
each
{
|
pod
|
printed
.
should
.
include?
pod
}
end
end
end
end
end
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