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
4412dac4
Commit
4412dac4
authored
Dec 15, 2013
by
Carson McDonald
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more test coverage for Command
parent
5699bf84
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
command.rb
lib/cocoapods/command.rb
+2
-2
command_spec.rb
spec/functional/command_spec.rb
+18
-0
user_interface.rb
spec/spec_helper/user_interface.rb
+3
-0
No files found.
lib/cocoapods/command.rb
View file @
4412dac4
...
@@ -45,8 +45,8 @@ module Pod
...
@@ -45,8 +45,8 @@ module Pod
def
self
.
run
(
argv
)
def
self
.
run
(
argv
)
argv
=
CLAide
::
ARGV
.
new
(
argv
)
argv
=
CLAide
::
ARGV
.
new
(
argv
)
if
argv
.
flag?
(
'version'
)
if
argv
.
flag?
(
'version'
)
puts
VERSION
UI
.
puts
VERSION
exit
!
(
0
)
exit
0
end
end
super
(
argv
)
super
(
argv
)
UI
.
print_warnings
UI
.
print_warnings
...
...
spec/functional/command_spec.rb
0 → 100644
View file @
4412dac4
require
File
.
expand_path
(
'../../spec_helper'
,
__FILE__
)
module
Pod
describe
Command
do
extend
SpecHelper
::
Command
it
"displays the current version number with the --version flag"
do
lambda
{
Pod
::
Command
.
run
([
'--version'
])
}.
should
.
raise
SystemExit
UI
.
output
.
should
.
include
VERSION
end
it
"reports the location of the AFNetworking spec"
do
lambda
{
Pod
::
Command
.
run
([
'spec'
,
'which'
,
'AFNetworking'
])
}.
should
.
not
.
raise
UI
.
output
.
should
.
include
'spec/fixtures/spec-repos/master/AFNetworking'
end
end
end
spec/spec_helper/user_interface.rb
View file @
4412dac4
...
@@ -25,6 +25,9 @@ module Pod
...
@@ -25,6 +25,9 @@ module Pod
def
print
(
message
)
def
print
(
message
)
@output
<<
message
@output
<<
message
end
end
def
print_warnings
end
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