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
02539e16
Unverified
Commit
02539e16
authored
May 16, 2016
by
Nate West
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPC Specs] Separate specs by IPC commands
parent
d29a8ae7
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
100 additions
and
87 deletions
+100
-87
list_spec.rb
spec/functional/command/ipc/list_spec.rb
+21
-0
podfile_spec.rb
spec/functional/command/ipc/podfile_spec.rb
+17
-0
repl_spec.rb
spec/functional/command/ipc/repl_spec.rb
+31
-0
spec_spec.rb
spec/functional/command/ipc/spec_spec.rb
+16
-0
update_search_index_spec.rb
spec/functional/command/ipc/update_search_index_spec.rb
+15
-0
ipc_spec.rb
spec/functional/command/ipc_spec.rb
+0
-87
No files found.
spec/functional/command/ipc/list_spec.rb
0 → 100644
View file @
02539e16
require
File
.
expand_path
(
'../../../../spec_helper'
,
__FILE__
)
module
Pod
describe
Command
::
IPC
::
List
do
before
do
Command
::
IPC
::
List
.
any_instance
.
stubs
(
:output_pipe
).
returns
(
UI
)
end
it
'prints a list of podspecs in the yaml format and prints it to STDOUT'
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
set
=
Specification
::
Set
.
new
(
'BananaLib'
,
[])
set
.
stubs
(
:specification
).
returns
(
spec
)
Source
::
Aggregate
.
any_instance
.
stubs
(
:all_sets
).
returns
([
set
])
out
=
run_command
(
'ipc'
,
'list'
)
out
.
should
.
include
(
'---'
)
out
.
should
.
match
/BananaLib:/
out
.
should
.
match
/description: Full of chunky bananas./
end
end
end
spec/functional/command/ipc/podfile_spec.rb
0 → 100644
View file @
02539e16
require
File
.
expand_path
(
'../../../../spec_helper'
,
__FILE__
)
module
Pod
describe
Command
::
IPC
::
Podfile
do
before
do
Command
::
IPC
::
Podfile
.
any_instance
.
stubs
(
:output_pipe
).
returns
(
UI
)
end
it
'converts a Podfile to yaml and prints it to STDOUT'
do
out
=
run_command
(
'ipc'
,
'podfile'
,
fixture
(
'Podfile'
))
out
.
should
.
include
(
'---'
)
out
.
should
.
match
/target_definitions:/
out
.
should
.
match
/platform: ios/
out
.
should
.
match
/- SSZipArchive:/
end
end
end
spec/functional/command/ipc/repl_spec.rb
0 → 100644
View file @
02539e16
require
File
.
expand_path
(
'../../../../spec_helper'
,
__FILE__
)
module
Pod
describe
Command
::
IPC
::
Repl
do
before
do
Command
::
IPC
::
Repl
.
any_instance
.
stubs
(
:output_pipe
).
returns
(
UI
)
Command
::
IPC
::
Podfile
.
any_instance
.
stubs
(
:output_pipe
).
returns
(
UI
)
end
it
'prints the version of CocoaPods as its first message'
do
command
=
Command
::
IPC
::
Repl
.
new
(
CLAide
::
ARGV
.
new
([]))
command
.
stubs
(
:listen
)
command
.
run
out
=
UI
.
output
out
.
should
.
match
/version: '
#{
Pod
::
VERSION
}
'/
end
it
'forwards the commands to the other ipc subcommands and prints the result to STDOUT'
do
command
=
Command
::
IPC
::
Repl
.
new
(
CLAide
::
ARGV
.
new
([]))
command
.
execute_repl_command
(
"podfile
#{
fixture
(
'Podfile'
)
}
"
)
out
=
UI
.
output
out
.
should
.
include
(
'---'
)
out
.
should
.
match
/target_definitions:/
out
.
should
.
match
/platform: ios/
out
.
should
.
match
/- SSZipArchive:/
out
.
should
.
end_with?
(
"
\n\r\n
"
)
end
end
end
spec/functional/command/ipc/spec_spec.rb
0 → 100644
View file @
02539e16
require
File
.
expand_path
(
'../../../../spec_helper'
,
__FILE__
)
module
Pod
describe
Command
::
IPC
::
Spec
do
before
do
Command
::
IPC
::
Spec
.
any_instance
.
stubs
(
:output_pipe
).
returns
(
UI
)
end
it
'converts a podspec to JSON and prints it to STDOUT'
do
out
=
run_command
(
'ipc'
,
'spec'
,
fixture
(
'banana-lib/BananaLib.podspec'
))
out
.
should
.
match
/"name": "BananaLib"/
out
.
should
.
match
/"version": "1.0"/
out
.
should
.
match
/"description": "Full of chunky bananas."/
end
end
end
spec/functional/command/ipc/update_search_index_spec.rb
0 → 100644
View file @
02539e16
require
File
.
expand_path
(
'../../../../spec_helper'
,
__FILE__
)
module
Pod
describe
Command
::
IPC
::
UpdateSearchIndex
do
before
do
Command
::
IPC
::
UpdateSearchIndex
.
any_instance
.
stubs
(
:output_pipe
).
returns
(
UI
)
end
it
'updates the search index and prints its path to STDOUT'
do
config
.
sources_manager
.
expects
(
:updated_search_index
)
out
=
run_command
(
'ipc'
,
'update-search-index'
)
out
.
should
.
include
(
config
.
sources_manager
.
search_index_path
.
to_s
)
end
end
end
spec/functional/command/ipc_spec.rb
deleted
100644 → 0
View file @
d29a8ae7
require
File
.
expand_path
(
'../../../spec_helper'
,
__FILE__
)
module
Pod
describe
Command
::
IPC
do
before
do
Command
::
IPC
::
Spec
.
any_instance
.
stubs
(
:output_pipe
).
returns
(
UI
)
Command
::
IPC
::
Podfile
.
any_instance
.
stubs
(
:output_pipe
).
returns
(
UI
)
Command
::
IPC
::
List
.
any_instance
.
stubs
(
:output_pipe
).
returns
(
UI
)
Command
::
IPC
::
UpdateSearchIndex
.
any_instance
.
stubs
(
:output_pipe
).
returns
(
UI
)
Command
::
IPC
::
Repl
.
any_instance
.
stubs
(
:output_pipe
).
returns
(
UI
)
end
describe
Command
::
IPC
::
Spec
do
it
'converts a podspec to JSON and prints it to STDOUT'
do
out
=
run_command
(
'ipc'
,
'spec'
,
fixture
(
'banana-lib/BananaLib.podspec'
))
out
.
should
.
match
/"name": "BananaLib"/
out
.
should
.
match
/"version": "1.0"/
out
.
should
.
match
/"description": "Full of chunky bananas."/
end
end
#-------------------------------------------------------------------------#
describe
Command
::
IPC
::
Podfile
do
it
'converts a Podfile to yaml and prints it to STDOUT'
do
out
=
run_command
(
'ipc'
,
'podfile'
,
fixture
(
'Podfile'
))
out
.
should
.
include
(
'---'
)
out
.
should
.
match
/target_definitions:/
out
.
should
.
match
/platform: ios/
out
.
should
.
match
/- SSZipArchive:/
end
end
#-------------------------------------------------------------------------#
describe
Command
::
IPC
::
List
do
it
'prints a list of podspecs in the yaml format and prints it to STDOUT'
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
set
=
Specification
::
Set
.
new
(
'BananaLib'
,
[])
set
.
stubs
(
:specification
).
returns
(
spec
)
Source
::
Aggregate
.
any_instance
.
stubs
(
:all_sets
).
returns
([
set
])
out
=
run_command
(
'ipc'
,
'list'
)
out
.
should
.
include
(
'---'
)
out
.
should
.
match
/BananaLib:/
out
.
should
.
match
/description: Full of chunky bananas./
end
end
#-------------------------------------------------------------------------#
describe
Command
::
IPC
::
UpdateSearchIndex
do
it
'updates the search index and prints its path to STDOUT'
do
config
.
sources_manager
.
expects
(
:updated_search_index
)
out
=
run_command
(
'ipc'
,
'update-search-index'
)
out
.
should
.
include
(
config
.
sources_manager
.
search_index_path
.
to_s
)
end
end
#-------------------------------------------------------------------------#
describe
Command
::
IPC
::
Repl
do
it
'prints the version of CocoaPods as its first message'
do
command
=
Command
::
IPC
::
Repl
.
new
(
CLAide
::
ARGV
.
new
([]))
command
.
stubs
(
:listen
)
command
.
run
out
=
UI
.
output
out
.
should
.
match
/version: '
#{
Pod
::
VERSION
}
'/
end
it
'forwards the commands to the other ipc subcommands and prints the result to STDOUT'
do
command
=
Command
::
IPC
::
Repl
.
new
(
CLAide
::
ARGV
.
new
([]))
command
.
execute_repl_command
(
"podfile
#{
fixture
(
'Podfile'
)
}
"
)
out
=
UI
.
output
out
.
should
.
include
(
'---'
)
out
.
should
.
match
/target_definitions:/
out
.
should
.
match
/platform: ios/
out
.
should
.
match
/- SSZipArchive:/
out
.
should
.
end_with?
(
"
\n\r\n
"
)
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