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
b5bdcea6
Commit
b5bdcea6
authored
May 29, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Specs] Fix for incompatibility with current master repo.
parent
0ad82acd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
7 deletions
+4
-7
push_spec.rb
spec/functional/command/push_spec.rb
+3
-5
repo_spec.rb
spec/functional/command/repo_spec.rb
+0
-2
temporary_repos.rb
spec/spec_helper/temporary_repos.rb
+1
-0
No files found.
spec/functional/command/push_spec.rb
View file @
b5bdcea6
...
@@ -29,7 +29,6 @@ describe Pod::Command::Push do
...
@@ -29,7 +29,6 @@ describe Pod::Command::Push do
it
"it raises if the pod is not validated"
do
it
"it raises if the pod is not validated"
do
repo1
=
add_repo
(
'repo1'
,
master_repo
)
repo1
=
add_repo
(
'repo1'
,
master_repo
)
git
(
'repo1'
,
'checkout master'
)
# checkout master, because the fixture is a submodule
repo2
=
add_repo
(
'repo2'
,
repo1
.
dir
)
repo2
=
add_repo
(
'repo2'
,
repo1
.
dir
)
git_config
(
'repo2'
,
'remote.origin.url'
).
should
==
(
tmp_repos_path
+
'repo1'
).
to_s
git_config
(
'repo2'
,
'remote.origin.url'
).
should
==
(
tmp_repos_path
+
'repo1'
).
to_s
Dir
.
chdir
(
fixture
(
'banana-lib'
))
do
Dir
.
chdir
(
fixture
(
'banana-lib'
))
do
...
@@ -41,10 +40,8 @@ describe Pod::Command::Push do
...
@@ -41,10 +40,8 @@ describe Pod::Command::Push do
before
do
before
do
# prepare the repos
# prepare the repos
@upstream
=
add_repo
(
'upstream'
,
master_repo
)
@upstream
=
add_repo
(
'upstream'
,
master_repo
)
git
(
'upstream'
,
'checkout -b master'
)
# checkout master, because the fixture is a submodule
@local_repo
=
add_repo
(
'local_repo'
,
@upstream
.
dir
)
@local_repo
=
add_repo
(
'local_repo'
,
@upstream
.
dir
)
git_config
(
'local_repo'
,
'remote.origin.url'
).
should
==
(
tmp_repos_path
+
'upstream'
).
to_s
git_config
(
'local_repo'
,
'remote.origin.url'
).
should
==
(
tmp_repos_path
+
'upstream'
).
to_s
git
(
'upstream'
,
'checkout -b no-master'
)
# checkout no-master, to allow push in a non-bare repository
# prepare the spec
# prepare the spec
spec_fix
=
(
fixture
(
'spec-repos'
)
+
'master/JSONKit/1.4/JSONKit.podspec'
).
read
spec_fix
=
(
fixture
(
'spec-repos'
)
+
'master/JSONKit/1.4/JSONKit.podspec'
).
read
...
@@ -61,18 +58,19 @@ describe Pod::Command::Push do
...
@@ -61,18 +58,19 @@ describe Pod::Command::Push do
cmd
.
expects
(
:validate_podspec_files
).
returns
(
true
)
cmd
.
expects
(
:validate_podspec_files
).
returns
(
true
)
Dir
.
chdir
(
temporary_directory
)
{
lambda
{
cmd
.
run
}.
should
.
raise
Pod
::
Informative
}
Dir
.
chdir
(
temporary_directory
)
{
lambda
{
cmd
.
run
}.
should
.
raise
Pod
::
Informative
}
git
(
'upstream'
,
'checkout master'
)
# checkout master, because the fixture is a submodule
(
@upstream
.
dir
+
'PushTest/1.4/PushTest.podspec'
).
should
.
not
.
exist?
(
@upstream
.
dir
+
'PushTest/1.4/PushTest.podspec'
).
should
.
not
.
exist?
end
end
it
"sucessfully pushes a spec"
do
it
"sucessfully pushes a spec"
do
git
(
'upstream'
,
'checkout master'
)
# checkout master, to allow push in a non-bare repository
cmd
=
command
(
'push'
,
'local_repo'
)
cmd
=
command
(
'push'
,
'local_repo'
)
cmd
.
expects
(
:validate_podspec_files
).
returns
(
true
)
cmd
.
expects
(
:validate_podspec_files
).
returns
(
true
)
Dir
.
chdir
(
temporary_directory
)
{
cmd
.
run
}
Dir
.
chdir
(
temporary_directory
)
{
cmd
.
run
}
cmd
.
output
.
should
.
include
(
'[Add] PushTest (1.4)'
)
cmd
.
output
.
should
.
include
(
'[Add] PushTest (1.4)'
)
cmd
.
output
.
should
.
include
(
'[Fix] JSONKit (1.4)'
)
cmd
.
output
.
should
.
include
(
'[Fix] JSONKit (1.4)'
)
git
(
'upstream'
,
'checkout master'
)
# checkout master, because the fixture is a submodule
git
(
'upstream'
,
'checkout test'
)
# checkout because test because is it the branch used in the specs.
(
@upstream
.
dir
+
'PushTest/1.4/PushTest.podspec'
).
read
.
should
.
include
(
'PushTest'
)
(
@upstream
.
dir
+
'PushTest/1.4/PushTest.podspec'
).
read
.
should
.
include
(
'PushTest'
)
end
end
end
end
spec/functional/command/repo_spec.rb
View file @
b5bdcea6
...
@@ -23,7 +23,6 @@ describe "Pod::Command::Repo" do
...
@@ -23,7 +23,6 @@ describe "Pod::Command::Repo" do
it
"updates a spec-repo"
do
it
"updates a spec-repo"
do
repo1
=
add_repo
(
'repo1'
,
fixture
(
'spec-repos/master'
))
repo1
=
add_repo
(
'repo1'
,
fixture
(
'spec-repos/master'
))
git
(
'repo1'
,
'checkout master'
)
# checkout master, because the fixture is a submodule
repo2
=
add_repo
(
'repo2'
,
repo1
.
dir
)
repo2
=
add_repo
(
'repo2'
,
repo1
.
dir
)
make_change
(
repo1
,
'repo1'
)
make_change
(
repo1
,
'repo1'
)
run_command
(
'repo'
,
'update'
,
'repo2'
)
run_command
(
'repo'
,
'update'
,
'repo2'
)
...
@@ -32,7 +31,6 @@ describe "Pod::Command::Repo" do
...
@@ -32,7 +31,6 @@ describe "Pod::Command::Repo" do
it
"updates all the spec-repos"
do
it
"updates all the spec-repos"
do
repo1
=
add_repo
(
'repo1'
,
fixture
(
'spec-repos/master'
))
repo1
=
add_repo
(
'repo1'
,
fixture
(
'spec-repos/master'
))
git
(
'repo1'
,
'checkout master'
)
# checkout master, because the fixture is a submodule
repo2
=
add_repo
(
'repo2'
,
repo1
.
dir
)
repo2
=
add_repo
(
'repo2'
,
repo1
.
dir
)
repo3
=
add_repo
(
'repo3'
,
repo1
.
dir
)
repo3
=
add_repo
(
'repo3'
,
repo1
.
dir
)
make_change
(
repo1
,
'repo1'
)
make_change
(
repo1
,
'repo1'
)
...
...
spec/spec_helper/temporary_repos.rb
View file @
b5bdcea6
...
@@ -30,6 +30,7 @@ module SpecHelper
...
@@ -30,6 +30,7 @@ module SpecHelper
def
add_repo
(
name
,
from
)
def
add_repo
(
name
,
from
)
command
=
command
(
'repo'
,
'add'
,
name
,
from
)
command
=
command
(
'repo'
,
'add'
,
name
,
from
)
command
.
run
command
.
run
Dir
.
chdir
(
command
.
dir
)
{
`git checkout -b test >/dev/null 2>&1`
}
command
command
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