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
88e5a85a
Commit
88e5a85a
authored
Feb 16, 2014
by
Kyle Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor repo spec to separate subcommands
parent
8a814f81
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
8 deletions
+38
-8
repo_spec.rb
spec/functional/command/repo_spec.rb
+38
-8
No files found.
spec/functional/command/repo_spec.rb
View file @
88e5a85a
...
...
@@ -2,7 +2,7 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
describe
Command
::
Repo
do
describe
"In general"
do
describe
Command
::
Repo
::
Update
do
extend
SpecHelper
::
Command
extend
SpecHelper
::
TemporaryRepos
...
...
@@ -23,10 +23,39 @@ module Pod
lambda
{
command
(
'repo'
,
'update'
).
run
}.
should
.
not
.
raise
end
it
"updates a spec-repo"
do
repo1
=
repo_make
(
'repo1'
)
repo2
=
repo_clone
(
'repo1'
,
'repo2'
)
repo_make_readme_change
(
repo1
,
'Updated'
)
Dir
.
chdir
(
repo1
)
{
`git commit -a -m "Update"`
}
run_command
(
'repo'
,
'update'
,
'repo2'
)
(
repo2
+
'README'
).
read
.
should
.
include
'Updated'
end
end
describe
Command
::
Repo
::
Lint
do
extend
SpecHelper
::
Command
extend
SpecHelper
::
TemporaryRepos
before
do
set_up_test_repo
config
.
repos_dir
=
SpecHelper
.
tmp_repos_path
end
it
"lints a repository"
do
repo
=
fixture
(
'spec-repos/test_repo'
).
to_s
lambda
{
run_command
(
'repo'
,
'lint'
,
repo
)
}.
should
.
not
.
raise
end
end
describe
Command
::
Repo
::
Add
do
extend
SpecHelper
::
Command
extend
SpecHelper
::
TemporaryRepos
before
do
set_up_test_repo
config
.
repos_dir
=
SpecHelper
.
tmp_repos_path
end
it
"adds a spec-repo"
do
run_command
(
'repo'
,
'add'
,
'private'
,
test_repo_path
)
...
...
@@ -56,14 +85,15 @@ module Pod
`git log --pretty=oneline`
.
strip
.
split
(
"
\n
"
).
size
.
should
==
1
end
end
end
it
"updates a spec-repo"
do
repo1
=
repo_make
(
'repo1'
)
repo2
=
repo_clone
(
'repo1'
,
'repo2'
)
repo_make_readme_change
(
repo1
,
'Updated'
)
Dir
.
chdir
(
repo1
)
{
`git commit -a -m "Update"`
}
run_command
(
'repo'
,
'update'
,
'repo2'
)
(
repo2
+
'README'
).
read
.
should
.
include
'Updated'
describe
Command
::
Repo
::
Remove
do
extend
SpecHelper
::
Command
extend
SpecHelper
::
TemporaryRepos
before
do
set_up_test_repo
config
.
repos_dir
=
SpecHelper
.
tmp_repos_path
end
it
"removes a spec-repo"
do
...
...
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