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
fde9d9a6
Commit
fde9d9a6
authored
Oct 16, 2013
by
Marin Usalj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disabled config/manager specs until we merge refactor
parent
e7548a80
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
manager_spec.rb
spec/unit/config/manager_spec.rb
+18
-18
No files found.
spec/unit/config/manager_spec.rb
View file @
fde9d9a6
...
...
@@ -14,86 +14,86 @@ module Pod
@subject
=
Config
::
Manager
.
new
end
it
"has a singleton"
do
x
it
"has a singleton"
do
Config
::
Manager
.
instance
.
should
===
Config
::
Manager
.
instance
end
it
"creates a global config file if one didn't exist"
do
x
it
"creates a global config file if one didn't exist"
do
FileUtils
.
rm_rf
(
@config_file_path
)
@subject
.
set_global
(
'verbose'
,
true
)
@config_file_path
.
should
.
exist
end
it
"stores a global setting"
do
x
it
"stores a global setting"
do
@subject
.
set_global
(
'verbose'
,
true
)
yaml
=
YAML
.
load_file
(
@config_file_path
)
yaml
[
'verbose'
].
should
==
true
end
it
"preserves the existing settings of the configuration file"
do
x
it
"preserves the existing settings of the configuration file"
do
@subject
.
set_global
(
'silent'
,
true
)
@subject
.
set_global
(
'verbose'
,
true
)
yaml
=
YAML
.
load_file
(
@config_file_path
)
yaml
[
'silent'
].
should
==
true
end
it
"allows to store a development pod"
do
x
it
"allows to store a development pod"
do
@subject
.
set_global
(
'development.ObjectiveSugar'
,
'~/code/OS'
)
yaml
=
YAML
.
load_file
(
@config_file_path
)
yaml
[
'development.ObjectiveSugar'
].
should
==
'~/code/OS'
end
it
"returns a globally decided setting"
do
x
it
"returns a globally decided setting"
do
@subject
.
set_global
(
'silent'
,
true
)
@subject
.
should
.
be
.
silent
end
it
"verbose by default is false"
do
x
it
"verbose by default is false"
do
@subject
.
should
.
not
.
be
.
verbose
end
it
"silent by default is false"
do
x
it
"silent by default is false"
do
@subject
.
should
.
not
.
be
.
silent
end
it
"is verbose only if silent is false and verbose is true"
do
x
it
"is verbose only if silent is false and verbose is true"
do
@subject
.
set_global
(
'silent'
,
true
)
@subject
.
set_global
(
'verbose'
,
true
)
@subject
.
should
.
not
.
be
.
verbose
end
it
"skips repo update by default is false"
do
x
it
"skips repo update by default is false"
do
@subject
.
should
.
not
.
skip_repo_update?
end
it
"clean by default is true"
do
x
it
"clean by default is true"
do
@subject
.
should
.
be
.
clean
end
it
"integrate_targets by default is true"
do
x
it
"integrate_targets by default is true"
do
@subject
.
should
.
integrate_targets
end
it
"new_version_message by default is true"
do
x
it
"new_version_message by default is true"
do
@subject
.
should
.
new_version_message
end
it
"max_cache_size is 500 MB by default"
do
x
it
"max_cache_size is 500 MB by default"
do
@subject
.
max_cache_size
.
should
==
500
end
it
"aggressive_cache is false by default"
do
x
it
"aggressive_cache is false by default"
do
@subject
.
should
.
not
.
aggressive_cache
end
it
"raises if there is an attempt to access an unrecognized attribute"
do
should
.
raise
Config
::
Config
Manager
::
NoKeyError
do
x
it
"raises if there is an attempt to access an unrecognized attribute"
do
should
.
raise
Config
::
Manager
::
NoKeyError
do
@subject
.
get_setting
(
'idafjaeilfjoasijfopasdj'
)
end
end
it
"can accept aggressive cache from ENV"
do
x
it
"can accept aggressive cache from ENV"
do
@subject
.
set_global
(
'aggressive_cache'
,
false
)
ENV
[
'CP_AGGRESSIVE_CACHE'
]
=
'TRUE'
@subject
.
get_setting
(
'aggressive_cache'
).
should
==
true
...
...
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