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
398e9c60
Commit
398e9c60
authored
Oct 28, 2017
by
Jon Sorrells
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add test for updating repo with --silent flag
parent
0b19a004
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
sources_manager_spec.rb
spec/unit/sources_manager_spec.rb
+24
-0
No files found.
spec/unit/sources_manager_spec.rb
View file @
398e9c60
...
...
@@ -111,6 +111,30 @@ module Pod
@sources_manager
.
update
(
test_repo_path
.
basename
.
to_s
,
true
)
end
it
'updates source with --silent flag'
do
set_up_test_repo_for_update
@sources_manager
.
expects
(
:update_search_index_if_needed_in_background
).
with
({}).
returns
(
nil
)
repo_update
=
sequence
(
'repo update --silent'
)
MasterSource
.
any_instance
.
expects
(
:git!
).
with
(
%W(-C
#{
test_repo_path
}
fetch origin)
).
in_sequence
(
repo_update
)
MasterSource
.
any_instance
.
expects
(
:git!
).
with
(
%W(-C
#{
test_repo_path
}
rev-parse --abbrev-ref HEAD)
).
returns
(
"my-special-branch
\n
"
).
in_sequence
(
repo_update
)
MasterSource
.
any_instance
.
expects
(
:git!
).
with
(
%W(-C
#{
test_repo_path
}
reset --hard origin/my-special-branch)
).
in_sequence
(
repo_update
)
@sources_manager
.
update
(
test_repo_path
.
basename
.
to_s
,
false
)
end
it
'unshallows if the git repo is shallow'
do
set_up_test_repo_for_update
test_repo_path
.
join
(
'.git'
,
'shallow'
).
open
(
'w'
)
{
|
f
|
f
<<
'a'
*
40
}
...
...
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