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
7e2dbedd
Commit
7e2dbedd
authored
Nov 27, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No more need to reset global state in the specs.
parent
b09aaebd
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
42 deletions
+6
-42
command_spec.rb
spec/functional/command_spec.rb
+0
-2
integration_spec.rb
spec/integration_spec.rb
+0
-10
spec_helper.rb
spec/spec_helper.rb
+0
-13
resolver_spec.rb
spec/unit/resolver_spec.rb
+0
-1
source_spec.rb
spec/unit/source_spec.rb
+0
-2
set_spec.rb
spec/unit/specification/set_spec.rb
+6
-14
No files found.
spec/functional/command_spec.rb
View file @
7e2dbedd
...
...
@@ -54,8 +54,6 @@ describe "Pod::Command" do
end
before
do
Pod
::
Source
.
reset!
Pod
::
Spec
::
Set
.
reset!
config
.
repos_dir
=
fixture
(
'spec-repos'
)
end
...
...
spec/integration_spec.rb
View file @
7e2dbedd
...
...
@@ -32,8 +32,6 @@ else
extend
SpecHelper
::
TemporaryDirectory
before
do
Pod
::
Source
.
reset!
Pod
::
Spec
::
Set
.
reset!
fixture
(
'spec-repos/master'
)
# ensure the archive is unpacked
@config_before
=
config
...
...
@@ -264,8 +262,6 @@ else
installer
=
SpecHelper
::
Installer
.
new
(
spec
)
installer
.
install!
Pod
::
Source
.
reset!
Pod
::
Spec
::
Set
.
reset!
spec
=
Pod
::
Podfile
.
new
do
# first ensure that the correct info is available to the specs when they load
config
.
rootspec
=
self
...
...
@@ -281,9 +277,6 @@ else
end
it
"creates a project with multiple targets"
do
Pod
::
Source
.
reset!
Pod
::
Spec
::
Set
.
reset!
podfile
=
Pod
::
Podfile
.
new
do
# first ensure that the correct info is available to the specs when they load
config
.
rootspec
=
self
...
...
@@ -370,9 +363,6 @@ else
end
it
"should prevent duplication cleaning headers symlinks with multiple targets"
do
Pod
::
Source
.
reset!
Pod
::
Spec
::
Set
.
reset!
podfile
=
Pod
::
Podfile
.
new
do
# first ensure that the correct info is available to the specs when they load
config
.
rootspec
=
self
...
...
spec/spec_helper.rb
View file @
7e2dbedd
...
...
@@ -30,18 +30,6 @@ config = Pod::Config.instance
config
.
silent
=
true
config
.
repos_dir
=
SpecHelper
.
tmp_repos_path
class
Pod
::
Source
def
self
.
reset!
@sources
=
nil
end
end
class
Pod
::
Spec
::
Set
def
self
.
reset!
@sets
=
nil
end
end
require
'tmpdir'
def
temporary_sandbox
...
...
@@ -58,5 +46,4 @@ def copy_fixture_to_pod(name, pod)
FileUtils
.
cp_r
(
path
,
pod
.
root
)
end
SpecHelper
::
Fixture
.
fixture
(
'banana-lib'
)
# ensure it exists
spec/unit/resolver_spec.rb
View file @
7e2dbedd
...
...
@@ -2,7 +2,6 @@ require File.expand_path('../../spec_helper', __FILE__)
describe
"Pod::Resolver"
do
before
do
Pod
::
Spec
::
Set
.
reset!
@config_before
=
config
Pod
::
Config
.
instance
=
nil
config
.
silent
=
true
...
...
spec/unit/source_spec.rb
View file @
7e2dbedd
...
...
@@ -5,8 +5,6 @@ describe "Pod::Source" do
extend
SpecHelper
::
TemporaryDirectory
before
do
Pod
::
Source
.
reset!
Pod
::
Spec
::
Set
.
reset!
add_repo
(
'repo1'
,
fixture
(
'spec-repos/master'
))
(
config
.
repos_dir
+
'repo1/JSONKit'
).
rmtree
add_repo
(
'repo2'
,
fixture
(
'spec-repos/master'
))
...
...
spec/unit/specification/set_spec.rb
View file @
7e2dbedd
require
File
.
expand_path
(
'../../../spec_helper'
,
__FILE__
)
class
Pod
::
Spec
::
Set
def
reset!
@required_by
=
[]
end
end
describe
"Pod::Specification::Set"
do
before
do
@set
=
Pod
::
Spec
::
Set
.
new
(
fixture
(
'spec-repos/master/CocoaLumberjack'
))
@set
.
reset!
end
it
"returns the name of the pod"
do
...
...
@@ -36,6 +29,12 @@ describe "Pod::Specification::Set" do
lambda
{
@set
.
required_version
}.
should
.
raise
Pod
::
Informative
end
it
"returns that this set is only part for other pods"
do
@set
.
required_by
(
Pod
::
Spec
.
new
{
|
s
|
s
.
part_of
=
'CocoaLumberjack'
})
@set
.
required_by
(
Pod
::
Spec
.
new
{
|
s
|
s
.
part_of
=
'CocoaLumberjack'
})
@set
.
should
.
be
.
only_part_of_other_pod
end
before
do
@set
.
required_by
(
Pod
::
Spec
.
new
{
|
s
|
s
.
dependency
'CocoaLumberjack'
,
'< 1.2.1'
})
end
...
...
@@ -57,13 +56,6 @@ describe "Pod::Specification::Set" do
@set
.
should
.
not
.
be
.
only_part_of_other_pod
end
it
"returns that this set is only part for other pods"
do
@set
.
reset!
@set
.
required_by
(
Pod
::
Spec
.
new
{
|
s
|
s
.
part_of
=
'CocoaLumberjack'
})
@set
.
required_by
(
Pod
::
Spec
.
new
{
|
s
|
s
.
part_of
=
'CocoaLumberjack'
})
@set
.
should
.
be
.
only_part_of_other_pod
end
it
"ignores dotfiles when getting the version directories"
do
`touch
#{
fixture
(
'spec-repos/master/CocoaLumberjack/.DS_Store'
)
}
`
lambda
{
@set
.
versions
}.
should
.
not
.
raise
...
...
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