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
0684132b
Commit
0684132b
authored
Jan 03, 2015
by
Kyle Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Gemfile] Update rubocop
parent
8c920151
Hide whitespace changes
Inline
Side-by-side
Showing
61 changed files
with
7 additions
and
290 deletions
+7
-290
Gemfile.lock
Gemfile.lock
+7
-7
Rakefile
Rakefile
+0
-2
lib.rb
lib/cocoapods/command/lib.rb
+0
-1
outdated.rb
lib/cocoapods/command/outdated.rb
+0
-2
downloader.rb
lib/cocoapods/downloader.rb
+0
-2
installer.rb
lib/cocoapods/installer.rb
+0
-1
sandbox.rb
lib/cocoapods/sandbox.rb
+0
-2
init_spec.rb
spec/functional/command/init_spec.rb
+0
-1
inter_process_communication_spec.rb
spec/functional/command/inter_process_communication_spec.rb
+0
-12
lib_spec.rb
spec/functional/command/lib_spec.rb
+0
-1
project_spec.rb
spec/functional/command/project_spec.rb
+0
-5
search_spec.rb
spec/functional/command/search_spec.rb
+0
-4
setup_spec.rb
spec/functional/command/setup_spec.rb
+0
-1
spec_spec.rb
spec/functional/command/spec_spec.rb
+0
-10
integration.rb
spec/integration.rb
+0
-9
spec_helper.rb
spec/spec_helper.rb
+0
-2
config_spec.rb
spec/unit/config_spec.rb
+0
-8
abstract_external_source_spec.rb
spec/unit/external_sources/abstract_external_source_spec.rb
+0
-4
path_source_spec.rb
spec/unit/external_sources/path_source_spec.rb
+0
-1
podspec_source_spec.rb
spec/unit/external_sources/podspec_source_spec.rb
+0
-2
acknowledgements_spec.rb
spec/unit/generator/acknowledgements_spec.rb
+0
-5
copy_resources_script_spec.rb
spec/unit/generator/copy_resources_script_spec.rb
+0
-2
dummy_source_spec.rb
spec/unit/generator/dummy_source_spec.rb
+0
-2
embed_frameworks_script_spec.rb
spec/unit/generator/embed_frameworks_script_spec.rb
+0
-2
header_spec.rb
spec/unit/generator/header_spec.rb
+0
-1
info_plist_file_spec.rb
spec/unit/generator/info_plist_file_spec.rb
+0
-2
module_map_spec.rb
spec/unit/generator/module_map_spec.rb
+0
-2
prefix_header_spec.rb
spec/unit/generator/prefix_header_spec.rb
+0
-1
target_environment_header_spec.rb
spec/unit/generator/target_environment_header_spec.rb
+0
-2
aggregate_xcconfig_spec.rb
spec/unit/generator/xcconfig/aggregate_xcconfig_spec.rb
+0
-8
private_pod_xcconfig_spec.rb
spec/unit/generator/xcconfig/private_pod_xcconfig_spec.rb
+0
-9
public_pod_xcconfig_spec.rb
spec/unit/generator/xcconfig/public_pod_xcconfig_spec.rb
+0
-2
xcconfig_helper_spec.rb
spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
+0
-2
xcconfig_spec.rb
spec/unit/generator/xcconfig_spec.rb
+0
-1
installer_representation_spec.rb
spec/unit/hooks/installer_representation_spec.rb
+0
-6
library_representation_spec.rb
spec/unit/hooks/library_representation_spec.rb
+0
-6
pod_representation_spec.rb
spec/unit/hooks/pod_representation_spec.rb
+0
-4
sandbox_analyzer_spec.rb
spec/unit/installer/analyzer/sandbox_analyzer_spec.rb
+0
-9
analyzer_spec.rb
spec/unit/installer/analyzer_spec.rb
+0
-8
file_references_installer_spec.rb
spec/unit/installer/file_references_installer_spec.rb
+0
-6
pod_source_installer_spec.rb
spec/unit/installer/pod_source_installer_spec.rb
+0
-12
aggregate_target_installer_spec.rb
...aller/target_installer/aggregate_target_installer_spec.rb
+0
-2
pod_target_installer_spec.rb
...t/installer/target_installer/pod_target_installer_spec.rb
+0
-2
target_installer_spec.rb
spec/unit/installer/target_installer_spec.rb
+0
-2
xcconfig_integrator_spec.rb
..._integrator/target_integrator/xcconfig_integrator_spec.rb
+0
-2
target_integrator_spec.rb
...staller/user_project_integrator/target_integrator_spec.rb
+0
-1
user_project_integrator_spec.rb
spec/unit/installer/user_project_integrator_spec.rb
+0
-9
installer_spec.rb
spec/unit/installer_spec.rb
+0
-36
library_spec.rb
spec/unit/library_spec.rb
+0
-2
project_spec.rb
spec/unit/project_spec.rb
+0
-17
resolver_spec.rb
spec/unit/resolver_spec.rb
+0
-2
file_accessor_spec.rb
spec/unit/sandbox/file_accessor_spec.rb
+0
-10
headers_store_spec.rb
spec/unit/sandbox/headers_store_spec.rb
+0
-1
path_list_spec.rb
spec/unit/sandbox/path_list_spec.rb
+0
-10
sandbox_spec.rb
spec/unit/sandbox_spec.rb
+0
-9
sources_manager_spec.rb
spec/unit/sources_manager_spec.rb
+0
-5
pod_target_spec.rb
spec/unit/target/pod_target_spec.rb
+0
-1
target_spec.rb
spec/unit/target_spec.rb
+0
-3
error_report_spec.rb
spec/unit/user_interface/error_report_spec.rb
+0
-1
user_interface_spec.rb
spec/unit/user_interface_spec.rb
+0
-3
validator_spec.rb
spec/unit/validator_spec.rb
+0
-3
No files found.
Gemfile.lock
View file @
0684132b
...
@@ -40,7 +40,7 @@ GIT
...
@@ -40,7 +40,7 @@ GIT
GIT
GIT
remote: https://github.com/CocoaPods/cocoapods-plugins.git
remote: https://github.com/CocoaPods/cocoapods-plugins.git
revision:
376141a815c8dcafdb8e1ca6e16eb9a380e9641d
revision:
4e60d8458d374ef54d3ba7d9592bd2750344df49
branch: master
branch: master
specs:
specs:
cocoapods-plugins (0.4.0)
cocoapods-plugins (0.4.0)
...
@@ -93,7 +93,7 @@ GEM
...
@@ -93,7 +93,7 @@ GEM
ast (2.0.0)
ast (2.0.0)
astrolabe (1.3.0)
astrolabe (1.3.0)
parser (>= 2.2.0.pre.3, < 3.0)
parser (>= 2.2.0.pre.3, < 3.0)
awesome_print (1.
2.0
)
awesome_print (1.
6.1
)
bacon (1.2.0)
bacon (1.2.0)
clintegracon (0.6.1)
clintegracon (0.6.1)
colored (~> 1.2)
colored (~> 1.2)
...
@@ -127,7 +127,7 @@ GEM
...
@@ -127,7 +127,7 @@ GEM
netrc (0.7.8)
netrc (0.7.8)
notify (0.5.2)
notify (0.5.2)
open4 (1.3.4)
open4 (1.3.4)
parser (2.2.0.
pre.7
)
parser (2.2.0.
1
)
ast (>= 1.1, < 3.0)
ast (>= 1.1, < 3.0)
slop (~> 3.4, >= 3.4.5)
slop (~> 3.4, >= 3.4.5)
powerpack (0.0.9)
powerpack (0.0.9)
...
@@ -138,26 +138,26 @@ GEM
...
@@ -138,26 +138,26 @@ GEM
method_source (~> 0.8.1)
method_source (~> 0.8.1)
slop (~> 3.4)
slop (~> 3.4)
rainbow (2.0.0)
rainbow (2.0.0)
rake (10.
3
.2)
rake (10.
4
.2)
rb-fsevent (0.9.4)
rb-fsevent (0.9.4)
rb-inotify (0.9.5)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
ffi (>= 0.5.0)
rb-kqueue (0.2.3)
rb-kqueue (0.2.3)
ffi (>= 0.5.0)
ffi (>= 0.5.0)
rubocop (0.2
7.1
)
rubocop (0.2
8.0
)
astrolabe (~> 1.3)
astrolabe (~> 1.3)
parser (>= 2.2.0.pre.7, < 3.0)
parser (>= 2.2.0.pre.7, < 3.0)
powerpack (~> 0.0.6)
powerpack (~> 0.0.6)
rainbow (>= 1.99.1, < 3.0)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.4)
ruby-progressbar (~> 1.4)
ruby-prof (0.15.2)
ruby-prof (0.15.2)
ruby-progressbar (1.7.
0
)
ruby-progressbar (1.7.
1
)
safe_yaml (1.0.4)
safe_yaml (1.0.4)
slop (3.6.0)
slop (3.6.0)
thread_safe (0.3.4)
thread_safe (0.3.4)
tzinfo (1.2.2)
tzinfo (1.2.2)
thread_safe (~> 0.1)
thread_safe (~> 0.1)
webmock (1.20.
3
)
webmock (1.20.
4
)
addressable (>= 2.3.6)
addressable (>= 2.3.6)
crack (>= 0.3.2)
crack (>= 0.3.2)
...
...
Rakefile
View file @
0684132b
...
@@ -75,7 +75,6 @@ begin
...
@@ -75,7 +75,6 @@ begin
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
namespace
:spec
do
namespace
:spec
do
def
specs
(
dir
)
def
specs
(
dir
)
FileList
[
"spec/
#{
dir
}
_spec.rb"
].
shuffle
.
join
(
' '
)
FileList
[
"spec/
#{
dir
}
_spec.rb"
].
shuffle
.
join
(
' '
)
end
end
...
@@ -210,7 +209,6 @@ begin
...
@@ -210,7 +209,6 @@ begin
task
:examples
=>
'examples:build'
task
:examples
=>
'examples:build'
namespace
:examples
do
namespace
:examples
do
desc
'Open all example workspaces in Xcode, which recreates the schemes.'
desc
'Open all example workspaces in Xcode, which recreates the schemes.'
task
:recreate_workspace_schemes
do
task
:recreate_workspace_schemes
do
examples
.
each
do
|
example
|
examples
.
each
do
|
example
|
...
...
lib/cocoapods/command/lib.rb
View file @
0684132b
...
@@ -138,7 +138,6 @@ module Pod
...
@@ -138,7 +138,6 @@ module Pod
def
run
def
run
UI
.
puts
UI
.
puts
podspecs_to_lint
.
each
do
|
podspec
|
podspecs_to_lint
.
each
do
|
podspec
|
validator
=
Validator
.
new
(
podspec
,
@source_urls
)
validator
=
Validator
.
new
(
podspec
,
@source_urls
)
validator
.
local
=
true
validator
.
local
=
true
validator
.
quick
=
@quick
validator
.
quick
=
@quick
...
...
lib/cocoapods/command/outdated.rb
View file @
0684132b
...
@@ -69,8 +69,6 @@ module Pod
...
@@ -69,8 +69,6 @@ module Pod
matching_version
=
matching_version
=
matching_spec
?
matching_spec
.
version
:
'(unused)'
matching_spec
?
matching_spec
.
version
:
'(unused)'
[
pod_name
,
lockfile_version
,
matching_version
,
source_version
]
[
pod_name
,
lockfile_version
,
matching_version
,
source_version
]
else
nil
end
end
end
.
compact
.
uniq
end
.
compact
.
uniq
end
end
...
...
lib/cocoapods/downloader.rb
View file @
0684132b
...
@@ -7,7 +7,6 @@ module Pod
...
@@ -7,7 +7,6 @@ module Pod
class
Base
class
Base
override_api
do
override_api
do
def
execute_command
(
executable
,
command
,
raise_on_failure
=
false
)
def
execute_command
(
executable
,
command
,
raise_on_failure
=
false
)
Executable
.
execute_command
(
executable
,
command
,
raise_on_failure
)
Executable
.
execute_command
(
executable
,
command
,
raise_on_failure
)
rescue
CLAide
::
InformativeError
=>
e
rescue
CLAide
::
InformativeError
=>
e
...
@@ -56,7 +55,6 @@ module Pod
...
@@ -56,7 +55,6 @@ module Pod
def
ui_message
(
message
)
def
ui_message
(
message
)
UI
.
puts
message
UI
.
puts
message
end
end
end
end
end
end
end
end
...
...
lib/cocoapods/installer.rb
View file @
0684132b
...
@@ -479,7 +479,6 @@ module Pod
...
@@ -479,7 +479,6 @@ module Pod
aggregate_target
.
native_target
.
add_dependency
(
pod_target
.
native_target
)
aggregate_target
.
native_target
.
add_dependency
(
pod_target
.
native_target
)
pod_target
.
dependencies
.
each
do
|
dep
|
pod_target
.
dependencies
.
each
do
|
dep
|
unless
dep
==
pod_target
.
pod_name
unless
dep
==
pod_target
.
pod_name
pod_dependency_target
=
aggregate_target
.
pod_targets
.
find
{
|
target
|
target
.
pod_name
==
dep
}
pod_dependency_target
=
aggregate_target
.
pod_targets
.
find
{
|
target
|
target
.
pod_name
==
dep
}
# TODO remove me
# TODO remove me
...
...
lib/cocoapods/sandbox.rb
View file @
0684132b
...
@@ -231,8 +231,6 @@ module Pod
...
@@ -231,8 +231,6 @@ module Pod
path
=
specifications_root
+
"
#{
name
}
.podspec.json"
path
=
specifications_root
+
"
#{
name
}
.podspec.json"
if
path
.
exist?
if
path
.
exist?
path
path
else
nil
end
end
end
end
end
end
...
...
spec/functional/command/init_spec.rb
View file @
0684132b
...
@@ -4,7 +4,6 @@ require 'xcodeproj'
...
@@ -4,7 +4,6 @@ require 'xcodeproj'
module
Pod
module
Pod
describe
Command
::
Init
do
describe
Command
::
Init
do
it
'complains if project does not exist'
do
it
'complains if project does not exist'
do
lambda
{
run_command
(
'init'
)
}.
should
.
raise
Informative
lambda
{
run_command
(
'init'
)
}.
should
.
raise
Informative
lambda
{
run_command
(
'init'
,
'foo.xcodeproj'
)
}.
should
.
raise
CLAide
::
Help
lambda
{
run_command
(
'init'
,
'foo.xcodeproj'
)
}.
should
.
raise
CLAide
::
Help
...
...
spec/functional/command/inter_process_communication_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Command
::
IPC
do
describe
Command
::
IPC
do
before
do
before
do
Command
::
IPC
::
Spec
.
any_instance
.
stubs
(
:output_pipe
).
returns
(
UI
)
Command
::
IPC
::
Spec
.
any_instance
.
stubs
(
:output_pipe
).
returns
(
UI
)
Command
::
IPC
::
Podfile
.
any_instance
.
stubs
(
:output_pipe
).
returns
(
UI
)
Command
::
IPC
::
Podfile
.
any_instance
.
stubs
(
:output_pipe
).
returns
(
UI
)
...
@@ -12,20 +11,17 @@ module Pod
...
@@ -12,20 +11,17 @@ module Pod
end
end
describe
Command
::
IPC
::
Spec
do
describe
Command
::
IPC
::
Spec
do
it
'converts a podspec to JSON and prints it to STDOUT'
do
it
'converts a podspec to JSON and prints it to STDOUT'
do
out
=
run_command
(
'ipc'
,
'spec'
,
fixture
(
'banana-lib/BananaLib.podspec'
))
out
=
run_command
(
'ipc'
,
'spec'
,
fixture
(
'banana-lib/BananaLib.podspec'
))
out
.
should
.
match
/"name": "BananaLib"/
out
.
should
.
match
/"name": "BananaLib"/
out
.
should
.
match
/"version": "1.0"/
out
.
should
.
match
/"version": "1.0"/
out
.
should
.
match
/"description": "Full of chunky bananas."/
out
.
should
.
match
/"description": "Full of chunky bananas."/
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
Command
::
IPC
::
Podfile
do
describe
Command
::
IPC
::
Podfile
do
it
'converts a Podfile to yaml and prints it to STDOUT'
do
it
'converts a Podfile to yaml and prints it to STDOUT'
do
out
=
run_command
(
'ipc'
,
'podfile'
,
fixture
(
'Podfile'
))
out
=
run_command
(
'ipc'
,
'podfile'
,
fixture
(
'Podfile'
))
out
.
should
.
include
(
'---'
)
out
.
should
.
include
(
'---'
)
...
@@ -33,13 +29,11 @@ module Pod
...
@@ -33,13 +29,11 @@ module Pod
out
.
should
.
match
/platform: ios/
out
.
should
.
match
/platform: ios/
out
.
should
.
match
/- SSZipArchive:/
out
.
should
.
match
/- SSZipArchive:/
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
Command
::
IPC
::
List
do
describe
Command
::
IPC
::
List
do
it
'prints a list of podspecs in the yaml format and prints it to STDOUT'
do
it
'prints a list of podspecs in the yaml format and prints it to STDOUT'
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
set
=
Specification
::
Set
.
new
(
'BananaLib'
,
[])
set
=
Specification
::
Set
.
new
(
'BananaLib'
,
[])
...
@@ -51,25 +45,21 @@ module Pod
...
@@ -51,25 +45,21 @@ module Pod
out
.
should
.
match
/BananaLib:/
out
.
should
.
match
/BananaLib:/
out
.
should
.
match
/description: Full of chunky bananas./
out
.
should
.
match
/description: Full of chunky bananas./
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
Command
::
IPC
::
UpdateSearchIndex
do
describe
Command
::
IPC
::
UpdateSearchIndex
do
it
'updates the search index and prints its path to STDOUT'
do
it
'updates the search index and prints its path to STDOUT'
do
SourcesManager
.
expects
(
:updated_search_index
)
SourcesManager
.
expects
(
:updated_search_index
)
out
=
run_command
(
'ipc'
,
'update-search-index'
)
out
=
run_command
(
'ipc'
,
'update-search-index'
)
out
.
should
.
include
(
SourcesManager
.
search_index_path
.
to_s
)
out
.
should
.
include
(
SourcesManager
.
search_index_path
.
to_s
)
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
Command
::
IPC
::
Repl
do
describe
Command
::
IPC
::
Repl
do
it
'prints the version of CocoaPods as its first message'
do
it
'prints the version of CocoaPods as its first message'
do
command
=
Command
::
IPC
::
Repl
.
new
(
CLAide
::
ARGV
.
new
([]))
command
=
Command
::
IPC
::
Repl
.
new
(
CLAide
::
ARGV
.
new
([]))
command
.
stubs
(
:listen
)
command
.
stubs
(
:listen
)
...
@@ -90,10 +80,8 @@ module Pod
...
@@ -90,10 +80,8 @@ module Pod
out
.
should
.
match
/- SSZipArchive:/
out
.
should
.
match
/- SSZipArchive:/
out
.
should
.
end_with?
(
"
\n\r\n
"
)
out
.
should
.
end_with?
(
"
\n\r\n
"
)
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
end
end
end
end
spec/functional/command/lib_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Command
::
Lib
::
Create
do
describe
Command
::
Lib
::
Create
do
before
do
before
do
@sut
=
Command
::
Lib
::
Create
@sut
=
Command
::
Lib
::
Create
end
end
...
...
spec/functional/command/project_spec.rb
View file @
0684132b
...
@@ -2,23 +2,19 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,23 +2,19 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Command
::
Project
do
describe
Command
::
Project
do
it
'tells the user that no Podfile or podspec was found in the current working dir'
do
it
'tells the user that no Podfile or podspec was found in the current working dir'
do
Command
::
Install
.
new
(
CLAide
::
ARGV
.
new
([
'--no-repo-update'
]))
Command
::
Install
.
new
(
CLAide
::
ARGV
.
new
([
'--no-repo-update'
]))
config
.
skip_repo_update
.
should
.
be
.
true
config
.
skip_repo_update
.
should
.
be
.
true
end
end
end
end
#---------------------------------------------------------------------------#
#---------------------------------------------------------------------------#
describe
Command
::
Install
do
describe
Command
::
Install
do
it
'tells the user that no Podfile or podspec was found in the project dir'
do
it
'tells the user that no Podfile or podspec was found in the project dir'
do
exception
=
lambda
{
run_command
(
'install'
,
'--no-repo-update'
)
}.
should
.
raise
Informative
exception
=
lambda
{
run_command
(
'install'
,
'--no-repo-update'
)
}.
should
.
raise
Informative
exception
.
message
.
should
.
include
"No `Podfile' found in the project directory."
exception
.
message
.
should
.
include
"No `Podfile' found in the project directory."
end
end
end
end
#---------------------------------------------------------------------------#
#---------------------------------------------------------------------------#
...
@@ -83,7 +79,6 @@ module Pod
...
@@ -83,7 +79,6 @@ module Pod
end
end
end
end
end
end
end
end
#---------------------------------------------------------------------------#
#---------------------------------------------------------------------------#
...
...
spec/functional/command/search_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Command
::
Search
do
describe
Command
::
Search
do
extend
SpecHelper
::
TemporaryRepos
extend
SpecHelper
::
TemporaryRepos
before
do
before
do
...
@@ -72,7 +71,6 @@ module Pod
...
@@ -72,7 +71,6 @@ module Pod
end
end
describe
'option --web'
do
describe
'option --web'
do
extend
SpecHelper
::
TemporaryRepos
extend
SpecHelper
::
TemporaryRepos
it
'searches with invalid regex'
do
it
'searches with invalid regex'
do
...
@@ -107,8 +105,6 @@ module Pod
...
@@ -107,8 +105,6 @@ module Pod
Command
::
Search
.
any_instance
.
expects
(
:open!
).
with
(
'http://cocoapods.org/?q=on%3Aosx%20on%3Aios%20bananalib'
)
Command
::
Search
.
any_instance
.
expects
(
:open!
).
with
(
'http://cocoapods.org/?q=on%3Aosx%20on%3Aios%20bananalib'
)
run_command
(
'search'
,
'--web'
,
'--osx'
,
'--ios'
,
'bananalib'
)
run_command
(
'search'
,
'--web'
,
'--osx'
,
'--ios'
,
'bananalib'
)
end
end
end
end
end
end
end
end
spec/functional/command/setup_spec.rb
View file @
0684132b
...
@@ -73,6 +73,5 @@ module Pod
...
@@ -73,6 +73,5 @@ module Pod
source
.
should
.
not
.
exist?
source
.
should
.
not
.
exist?
target
.
should
.
exist?
target
.
should
.
exist?
end
end
end
end
end
end
spec/functional/command/spec_spec.rb
View file @
0684132b
...
@@ -20,9 +20,7 @@ end
...
@@ -20,9 +20,7 @@ end
module
Pod
module
Pod
describe
Command
::
Spec
do
describe
Command
::
Spec
do
describe
'In general'
do
describe
'In general'
do
it
'complains for wrong parameters'
do
it
'complains for wrong parameters'
do
lambda
{
run_command
(
'spec'
)
}.
should
.
raise
CLAide
::
Help
lambda
{
run_command
(
'spec'
)
}.
should
.
raise
CLAide
::
Help
lambda
{
run_command
(
'spec'
,
'create'
)
}.
should
.
raise
CLAide
::
Help
lambda
{
run_command
(
'spec'
,
'create'
)
}.
should
.
raise
CLAide
::
Help
...
@@ -353,24 +351,19 @@ module Pod
...
@@ -353,24 +351,19 @@ module Pod
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Private helpers'
do
describe
'Private helpers'
do
before
do
before
do
# TODO Use class methods
# TODO Use class methods
@command
=
Command
::
Spec
.
new
(
CLAide
::
ARGV
.
new
([]))
@command
=
Command
::
Spec
.
new
(
CLAide
::
ARGV
.
new
([]))
end
end
describe
'#get_path_of_spec'
do
describe
'#get_path_of_spec'
do
it
'returns the path of the specification with the given name'
do
it
'returns the path of the specification with the given name'
do
path
=
@command
.
send
(
:get_path_of_spec
,
'AFNetworking'
)
path
=
@command
.
send
(
:get_path_of_spec
,
'AFNetworking'
)
path
.
should
==
fixture
(
'spec-repos'
)
+
'master/Specs/AFNetworking/2.4.1/AFNetworking.podspec.json'
path
.
should
==
fixture
(
'spec-repos'
)
+
'master/Specs/AFNetworking/2.4.1/AFNetworking.podspec.json'
end
end
end
end
describe
'#choose_from_array'
do
describe
'#choose_from_array'
do
it
'should return a valid index for the given array'
do
it
'should return a valid index for the given array'
do
UI
.
next_input
=
"1
\n
"
UI
.
next_input
=
"1
\n
"
index
=
@command
.
send
(
:choose_from_array
,
%w(item1 item2 item3)
,
'A message'
)
index
=
@command
.
send
(
:choose_from_array
,
%w(item1 item2 item3)
,
'A message'
)
...
@@ -384,12 +377,9 @@ module Pod
...
@@ -384,12 +377,9 @@ module Pod
UI
.
next_input
=
"0
\n
"
UI
.
next_input
=
"0
\n
"
lambda
{
@command
.
send
(
:choose_from_array
,
%w(item1 item2 item3)
,
'A message'
)
}.
should
.
raise
Pod
::
Informative
lambda
{
@command
.
send
(
:choose_from_array
,
%w(item1 item2 item3)
,
'A message'
)
}.
should
.
raise
Pod
::
Informative
end
end
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
end
end
end
end
spec/integration.rb
View file @
0684132b
...
@@ -90,7 +90,6 @@ CLIntegracon.configure do |c|
...
@@ -90,7 +90,6 @@ CLIntegracon.configure do |c|
end
end
describe_cli
'pod'
do
describe_cli
'pod'
do
Process
.
wait
(
spawn
(
'which hg'
,
:err
=>
:out
,
:out
=>
'/dev/null'
))
Process
.
wait
(
spawn
(
'which hg'
,
:err
=>
:out
,
:out
=>
'/dev/null'
))
has_mercurial
=
$?
.
success?
has_mercurial
=
$?
.
success?
...
@@ -115,7 +114,6 @@ describe_cli 'pod' do
...
@@ -115,7 +114,6 @@ describe_cli 'pod' do
end
end
describe
'Pod install'
do
describe
'Pod install'
do
# Test installation with no integration
# Test installation with no integration
# Test subspecs inheritance
# Test subspecs inheritance
...
@@ -215,7 +213,6 @@ describe_cli 'pod' do
...
@@ -215,7 +213,6 @@ describe_cli 'pod' do
#--------------------------------------#
#--------------------------------------#
describe
'Pod update'
do
describe
'Pod update'
do
describe
'Updates an existing installation'
do
describe
'Updates an existing installation'
do
behaves_like
cli_spec
'update_all'
,
behaves_like
cli_spec
'update_all'
,
'update --no-repo-update'
'update --no-repo-update'
...
@@ -225,31 +222,25 @@ describe_cli 'pod' do
...
@@ -225,31 +222,25 @@ describe_cli 'pod' do
behaves_like
cli_spec
'update_selected'
,
behaves_like
cli_spec
'update_selected'
,
'update Reachability --no-repo-update'
'update Reachability --no-repo-update'
end
end
end
end
#--------------------------------------#
#--------------------------------------#
describe
'Pod lint'
do
describe
'Pod lint'
do
describe
'Lints a Pod'
do
describe
'Lints a Pod'
do
behaves_like
cli_spec
'spec_lint'
,
behaves_like
cli_spec
'spec_lint'
,
'spec lint --quick'
'spec lint --quick'
end
end
end
end
#--------------------------------------#
#--------------------------------------#
describe
'Pod init'
do
describe
'Pod init'
do
describe
'Initializes a Podfile with a single platform'
do
describe
'Initializes a Podfile with a single platform'
do
behaves_like
cli_spec
'init_single_platform'
,
behaves_like
cli_spec
'init_single_platform'
,
'init'
'init'
end
end
end
end
#--------------------------------------#
#--------------------------------------#
end
end
spec/spec_helper.rb
View file @
0684132b
...
@@ -61,8 +61,6 @@ module Pod
...
@@ -61,8 +61,6 @@ module Pod
if
fixture
.
exist?
if
fixture
.
exist?
# puts "Using fixture [#{name}]"
# puts "Using fixture [#{name}]"
result
[
:git
]
=
fixture
.
to_s
result
[
:git
]
=
fixture
.
to_s
else
# puts "MISSING fixture [#{name}]"
end
end
result
result
end
end
...
...
spec/unit/config_spec.rb
View file @
0684132b
...
@@ -9,7 +9,6 @@ module Pod
...
@@ -9,7 +9,6 @@ module Pod
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'In general'
do
describe
'In general'
do
it
'returns the singleton config instance'
do
it
'returns the singleton config instance'
do
@config
.
should
.
be
.
instance_of
Config
@config
.
should
.
be
.
instance_of
Config
end
end
...
@@ -47,7 +46,6 @@ module Pod
...
@@ -47,7 +46,6 @@ module Pod
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Paths'
do
describe
'Paths'
do
it
'returns the working directory as the installation root if a Podfile can be found'
do
it
'returns the working directory as the installation root if a Podfile can be found'
do
Dir
.
chdir
(
temporary_directory
)
do
Dir
.
chdir
(
temporary_directory
)
do
File
.
open
(
'Podfile'
,
'w'
)
{}
File
.
open
(
'Podfile'
,
'w'
)
{}
...
@@ -123,13 +121,11 @@ module Pod
...
@@ -123,13 +121,11 @@ module Pod
it
'returns the search index file'
do
it
'returns the search index file'
do
@config
.
search_index_file
.
to_s
.
should
.
end_with?
(
'search_index.yaml'
)
@config
.
search_index_file
.
to_s
.
should
.
end_with?
(
'search_index.yaml'
)
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Default settings'
do
describe
'Default settings'
do
it
'prints out normal information'
do
it
'prints out normal information'
do
@config
.
should
.
not
.
be
.
silent
@config
.
should
.
not
.
be
.
silent
end
end
...
@@ -150,7 +146,6 @@ module Pod
...
@@ -150,7 +146,6 @@ module Pod
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Private helpers'
do
describe
'Private helpers'
do
it
'returns the path of the user settings file'
do
it
'returns the path of the user settings file'
do
@config
.
send
(
:user_settings_file
).
should
==
Pathname
.
new
(
'~/.cocoapods/config.yaml'
).
expand_path
@config
.
send
(
:user_settings_file
).
should
==
Pathname
.
new
(
'~/.cocoapods/config.yaml'
).
expand_path
end
end
...
@@ -164,7 +159,6 @@ module Pod
...
@@ -164,7 +159,6 @@ module Pod
#----------------------------------------#
#----------------------------------------#
describe
'#podfile_path_in_dir'
do
describe
'#podfile_path_in_dir'
do
it
'detects the CocoaPods.podfile.yaml file'
do
it
'detects the CocoaPods.podfile.yaml file'
do
expected
=
temporary_directory
+
'CocoaPods.podfile.yaml'
expected
=
temporary_directory
+
'CocoaPods.podfile.yaml'
File
.
open
(
expected
,
'w'
)
{}
File
.
open
(
expected
,
'w'
)
{}
...
@@ -190,11 +184,9 @@ module Pod
...
@@ -190,11 +184,9 @@ module Pod
path
=
@config
.
send
(
:podfile_path_in_dir
,
temporary_directory
)
path
=
@config
.
send
(
:podfile_path_in_dir
,
temporary_directory
)
path
.
should
.
nil?
path
.
should
.
nil?
end
end
end
end
#-----------------------------------------------------------------------#
#-----------------------------------------------------------------------#
end
end
end
end
end
end
spec/unit/external_sources/abstract_external_source_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
ExternalSources
::
AbstractExternalSource
do
describe
ExternalSources
::
AbstractExternalSource
do
before
do
before
do
dependency
=
Dependency
.
new
(
'Reachability'
,
:git
=>
fixture
(
'integration/Reachability'
))
dependency
=
Dependency
.
new
(
'Reachability'
,
:git
=>
fixture
(
'integration/Reachability'
))
@subject
=
ExternalSources
.
from_dependency
(
dependency
,
nil
)
@subject
=
ExternalSources
.
from_dependency
(
dependency
,
nil
)
...
@@ -12,7 +11,6 @@ module Pod
...
@@ -12,7 +11,6 @@ module Pod
#--------------------------------------#
#--------------------------------------#
describe
'In general'
do
describe
'In general'
do
it
'compares to another'
do
it
'compares to another'
do
dependency_1
=
Dependency
.
new
(
'Reachability'
,
:git
=>
'url'
)
dependency_1
=
Dependency
.
new
(
'Reachability'
,
:git
=>
'url'
)
dependency_2
=
Dependency
.
new
(
'Another_name'
,
:git
=>
'url'
)
dependency_2
=
Dependency
.
new
(
'Another_name'
,
:git
=>
'url'
)
...
@@ -28,13 +26,11 @@ module Pod
...
@@ -28,13 +26,11 @@ module Pod
@subject
.
fetch
(
config
.
sandbox
)
@subject
.
fetch
(
config
.
sandbox
)
config
.
sandbox
.
specification
(
'Reachability'
).
name
.
should
==
'Reachability'
config
.
sandbox
.
specification
(
'Reachability'
).
name
.
should
==
'Reachability'
end
end
end
end
#--------------------------------------#
#--------------------------------------#
describe
'Subclasses helpers'
do
describe
'Subclasses helpers'
do
it
'pre-downloads the Pod and stores the relevant information in the sandbox'
do
it
'pre-downloads the Pod and stores the relevant information in the sandbox'
do
@subject
.
send
(
:pre_download
,
config
.
sandbox
)
@subject
.
send
(
:pre_download
,
config
.
sandbox
)
path
=
config
.
sandbox
.
specifications_root
+
'Reachability.podspec.json'
path
=
config
.
sandbox
.
specifications_root
+
'Reachability.podspec.json'
...
...
spec/unit/external_sources/path_source_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
ExternalSources
::
PathSource
do
describe
ExternalSources
::
PathSource
do
before
do
before
do
params
=
{
:path
=>
fixture
(
'integration/Reachability'
)
}
params
=
{
:path
=>
fixture
(
'integration/Reachability'
)
}
dependency
=
Dependency
.
new
(
'Reachability'
,
params
)
dependency
=
Dependency
.
new
(
'Reachability'
,
params
)
...
...
spec/unit/external_sources/podspec_source_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
ExternalSources
::
PodspecSource
do
describe
ExternalSources
::
PodspecSource
do
before
do
before
do
podspec_path
=
fixture
(
'integration/Reachability/Reachability.podspec'
)
podspec_path
=
fixture
(
'integration/Reachability/Reachability.podspec'
)
dependency
=
Dependency
.
new
(
'Reachability'
,
:podspec
=>
podspec_path
.
to_s
)
dependency
=
Dependency
.
new
(
'Reachability'
,
:podspec
=>
podspec_path
.
to_s
)
...
@@ -21,7 +20,6 @@ module Pod
...
@@ -21,7 +20,6 @@ module Pod
end
end
describe
'Helpers'
do
describe
'Helpers'
do
it
'handles absolute paths'
do
it
'handles absolute paths'
do
@subject
.
stubs
(
:params
).
returns
(
:podspec
=>
fixture
(
'integration/Reachability'
))
@subject
.
stubs
(
:params
).
returns
(
:podspec
=>
fixture
(
'integration/Reachability'
))
path
=
@subject
.
send
(
:podspec_uri
)
path
=
@subject
.
send
(
:podspec_uri
)
...
...
spec/unit/generator/acknowledgements_spec.rb
View file @
0684132b
...
@@ -9,7 +9,6 @@ module Pod
...
@@ -9,7 +9,6 @@ module Pod
end
end
describe
'In general'
do
describe
'In general'
do
it
'returns the classes of the concrete generators generators'
do
it
'returns the classes of the concrete generators generators'
do
generators
=
Pod
::
Generator
::
Acknowledgements
.
generators
generators
=
Pod
::
Generator
::
Acknowledgements
.
generators
generators
.
map
{
|
g
|
g
.
name
.
split
(
'::'
).
last
}.
should
==
%w(Plist Markdown)
generators
.
map
{
|
g
|
g
.
name
.
split
(
'::'
).
last
}.
should
==
%w(Plist Markdown)
...
@@ -21,13 +20,11 @@ module Pod
...
@@ -21,13 +20,11 @@ module Pod
@generator
.
footnote_title
.
should
.
be
.
kind_of
(
String
)
@generator
.
footnote_title
.
should
.
be
.
kind_of
(
String
)
@generator
.
footnote_text
.
should
.
be
.
kind_of
(
String
)
@generator
.
footnote_text
.
should
.
be
.
kind_of
(
String
)
end
end
end
end
#-----------------------------------------------------------------------#
#-----------------------------------------------------------------------#
describe
'Private methods'
do
describe
'Private methods'
do
it
'returns the root specifications'
do
it
'returns the root specifications'
do
generator
=
Pod
::
Generator
::
Acknowledgements
.
new
([
@file_accessor
,
@file_accessor
])
generator
=
Pod
::
Generator
::
Acknowledgements
.
new
([
@file_accessor
,
@file_accessor
])
generator
.
send
(
:specs
).
should
==
[
@file_accessor
.
spec
]
generator
.
send
(
:specs
).
should
==
[
@file_accessor
.
spec
]
...
@@ -49,10 +46,8 @@ module Pod
...
@@ -49,10 +46,8 @@ module Pod
@generator
.
send
(
:license_text
,
@spec
)
@generator
.
send
(
:license_text
,
@spec
)
UI
.
warnings
.
should
.
include
'Unable to read the license file'
UI
.
warnings
.
should
.
include
'Unable to read the license file'
end
end
end
end
#-----------------------------------------------------------------------#
#-----------------------------------------------------------------------#
end
end
end
end
spec/unit/generator/copy_resources_script_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Generator
::
CopyResourcesScript
do
describe
Generator
::
CopyResourcesScript
do
it
'returns the copy resources script'
do
it
'returns the copy resources script'
do
resources
=
[
'path/to/resource.png'
]
resources
=
[
'path/to/resource.png'
]
generator
=
Pod
::
Generator
::
CopyResourcesScript
.
new
(
resources
,
Platform
.
new
(
:ios
,
'6.0'
))
generator
=
Pod
::
Generator
::
CopyResourcesScript
.
new
(
resources
,
Platform
.
new
(
:ios
,
'6.0'
))
...
@@ -18,6 +17,5 @@ module Pod
...
@@ -18,6 +17,5 @@ module Pod
generator_1
.
send
(
:script
).
should
.
not
.
include
'--reference-external-strings-file'
generator_1
.
send
(
:script
).
should
.
not
.
include
'--reference-external-strings-file'
generator_2
.
send
(
:script
).
should
.
include
'--reference-external-strings-file'
generator_2
.
send
(
:script
).
should
.
include
'--reference-external-strings-file'
end
end
end
end
end
end
spec/unit/generator/dummy_source_spec.rb
View file @
0684132b
require
File
.
expand_path
(
'../../../spec_helper'
,
__FILE__
)
require
File
.
expand_path
(
'../../../spec_helper'
,
__FILE__
)
describe
Pod
::
Generator
::
DummySource
do
describe
Pod
::
Generator
::
DummySource
do
it
'generates a dummy source file with the appropriate class for the class name identifier'
do
it
'generates a dummy source file with the appropriate class for the class name identifier'
do
generator
=
Pod
::
Generator
::
DummySource
.
new
(
'SomeIdentification'
)
generator
=
Pod
::
Generator
::
DummySource
.
new
(
'SomeIdentification'
)
file
=
temporary_directory
+
'PodsDummy.m'
file
=
temporary_directory
+
'PodsDummy.m'
...
@@ -27,5 +26,4 @@ describe Pod::Generator::DummySource do
...
@@ -27,5 +26,4 @@ describe Pod::Generator::DummySource do
@end
@end
EOS
EOS
end
end
end
end
spec/unit/generator/embed_frameworks_script_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Generator
::
EmbedFrameworksScript
do
describe
Generator
::
EmbedFrameworksScript
do
it
'returns the embed frameworks script'
do
it
'returns the embed frameworks script'
do
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
frameworks
=
{
frameworks
=
{
...
@@ -22,6 +21,5 @@ module Pod
...
@@ -22,6 +21,5 @@ module Pod
fi
fi
eos
eos
end
end
end
end
end
end
spec/unit/generator/header_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Header
=
Generator
::
Header
do
describe
Header
=
Generator
::
Header
do
before
do
before
do
@gen
=
Header
.
new
(
Pod
::
Platform
.
ios
)
@gen
=
Header
.
new
(
Pod
::
Platform
.
ios
)
end
end
...
...
spec/unit/generator/info_plist_file_spec.rb
View file @
0684132b
require
File
.
expand_path
(
'../../../spec_helper'
,
__FILE__
)
require
File
.
expand_path
(
'../../../spec_helper'
,
__FILE__
)
describe
Pod
::
Generator
::
InfoPlistFile
do
describe
Pod
::
Generator
::
InfoPlistFile
do
describe
'#target_version'
do
describe
'#target_version'
do
it
'returns 1.0.0 for the aggregate target'
do
it
'returns 1.0.0 for the aggregate target'
do
generator
=
Pod
::
Generator
::
InfoPlistFile
.
new
(
fixture_aggregate_target
)
generator
=
Pod
::
Generator
::
InfoPlistFile
.
new
(
fixture_aggregate_target
)
...
@@ -26,5 +25,4 @@ describe Pod::Generator::InfoPlistFile do
...
@@ -26,5 +25,4 @@ describe Pod::Generator::InfoPlistFile do
`plutil -lint
#{
file
}
`
`plutil -lint
#{
file
}
`
$?
.
should
.
be
.
success
$?
.
should
.
be
.
success
end
end
end
end
spec/unit/generator/module_map_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Generator
::
ModuleMap
do
describe
Generator
::
ModuleMap
do
before
do
before
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
...
@@ -22,6 +21,5 @@ module Pod
...
@@ -22,6 +21,5 @@ module Pod
}
}
EOS
EOS
end
end
end
end
end
end
spec/unit/generator/prefix_header_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
PrefixHeader
=
Generator
::
PrefixHeader
do
describe
PrefixHeader
=
Generator
::
PrefixHeader
do
before
do
before
do
file_accessor
=
fixture_file_accessor
(
'banana-lib/BananaLib.podspec'
)
file_accessor
=
fixture_file_accessor
(
'banana-lib/BananaLib.podspec'
)
@spec
=
file_accessor
.
spec
@spec
=
file_accessor
.
spec
...
...
spec/unit/generator/target_environment_header_spec.rb
View file @
0684132b
require
File
.
expand_path
(
'../../../spec_helper'
,
__FILE__
)
require
File
.
expand_path
(
'../../../spec_helper'
,
__FILE__
)
describe
Pod
::
Generator
::
TargetEnvironmentHeader
do
describe
Pod
::
Generator
::
TargetEnvironmentHeader
do
before
do
before
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@gen
=
Pod
::
Generator
::
TargetEnvironmentHeader
.
new
(
'Debug'
=>
[
spec
])
@gen
=
Pod
::
Generator
::
TargetEnvironmentHeader
.
new
(
'Debug'
=>
[
spec
])
...
@@ -80,5 +79,4 @@ describe Pod::Generator::TargetEnvironmentHeader do
...
@@ -80,5 +79,4 @@ describe Pod::Generator::TargetEnvironmentHeader do
@gen
.
generate
.
should
.
include
'BUILD_CONFIGURATION_COPY'
@gen
.
generate
.
should
.
include
'BUILD_CONFIGURATION_COPY'
@gen
.
generate
.
should
.
include
'BUILD__CONFIG_COPY'
@gen
.
generate
.
should
.
include
'BUILD__CONFIG_COPY'
end
end
end
end
spec/unit/generator/xcconfig/aggregate_xcconfig_spec.rb
View file @
0684132b
...
@@ -4,7 +4,6 @@ module Pod
...
@@ -4,7 +4,6 @@ module Pod
module
Generator
module
Generator
module
XCConfig
module
XCConfig
describe
AggregateXCConfig
do
describe
AggregateXCConfig
do
def
spec
def
spec
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
end
end
...
@@ -21,7 +20,6 @@ module Pod
...
@@ -21,7 +20,6 @@ module Pod
end
end
shared
'AggregateXCConfig'
do
shared
'AggregateXCConfig'
do
it
'returns the path of the pods root relative to the user project'
do
it
'returns the path of the pods root relative to the user project'
do
@generator
.
target
.
relative_pods_root
.
should
==
'${SRCROOT}/Pods'
@generator
.
target
.
relative_pods_root
.
should
==
'${SRCROOT}/Pods'
end
end
...
@@ -67,13 +65,11 @@ module Pod
...
@@ -67,13 +65,11 @@ module Pod
it
'should configure OTHER_LIBTOOLFLAGS flags to include OTHER_LDFLAGS'
do
it
'should configure OTHER_LIBTOOLFLAGS flags to include OTHER_LDFLAGS'
do
@xcconfig
.
to_hash
[
'OTHER_LIBTOOLFLAGS'
].
should
==
'$(OTHER_LDFLAGS)'
@xcconfig
.
to_hash
[
'OTHER_LIBTOOLFLAGS'
].
should
==
'$(OTHER_LDFLAGS)'
end
end
end
end
#-----------------------------------------------------------------------#
#-----------------------------------------------------------------------#
describe
'if a pod target does not contain source files'
do
describe
'if a pod target does not contain source files'
do
before
do
before
do
@pod_target
.
file_accessors
.
first
.
stubs
(
:source_files
).
returns
([])
@pod_target
.
file_accessors
.
first
.
stubs
(
:source_files
).
returns
([])
@xcconfig
=
@generator
.
generate
@xcconfig
=
@generator
.
generate
...
@@ -90,7 +86,6 @@ module Pod
...
@@ -90,7 +86,6 @@ module Pod
it
'does link with vendored libraries'
do
it
'does link with vendored libraries'
do
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
include
'-l"Bananalib"'
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
include
'-l"Bananalib"'
end
end
end
end
#-----------------------------------------------------------------------#
#-----------------------------------------------------------------------#
...
@@ -155,7 +150,6 @@ module Pod
...
@@ -155,7 +150,6 @@ module Pod
#-----------------------------------------------------------------------#
#-----------------------------------------------------------------------#
describe
'serializing and deserializing'
do
describe
'serializing and deserializing'
do
before
do
before
do
@path
=
temporary_directory
+
'sample.xcconfig'
@path
=
temporary_directory
+
'sample.xcconfig'
@generator
.
save_as
(
@path
)
@generator
.
save_as
(
@path
)
...
@@ -165,9 +159,7 @@ module Pod
...
@@ -165,9 +159,7 @@ module Pod
generated
=
Xcodeproj
::
Config
.
new
(
@path
)
generated
=
Xcodeproj
::
Config
.
new
(
@path
)
generated
.
class
.
should
==
Xcodeproj
::
Config
generated
.
class
.
should
==
Xcodeproj
::
Config
end
end
end
end
end
end
end
end
end
end
...
...
spec/unit/generator/xcconfig/private_pod_xcconfig_spec.rb
View file @
0684132b
...
@@ -4,7 +4,6 @@ module Pod
...
@@ -4,7 +4,6 @@ module Pod
module
Generator
module
Generator
module
XCConfig
module
XCConfig
describe
PrivatePodXCConfig
do
describe
PrivatePodXCConfig
do
describe
'in general'
do
describe
'in general'
do
before
do
before
do
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
...
@@ -69,13 +68,11 @@ module Pod
...
@@ -69,13 +68,11 @@ module Pod
generated
=
Xcodeproj
::
Config
.
new
(
path
)
generated
=
Xcodeproj
::
Config
.
new
(
path
)
generated
.
class
.
should
==
Xcodeproj
::
Config
generated
.
class
.
should
==
Xcodeproj
::
Config
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Private Helpers'
do
describe
'Private Helpers'
do
before
do
before
do
@config
=
PrivatePodXCConfig
.
new
(
stub
,
stub
)
@config
=
PrivatePodXCConfig
.
new
(
stub
,
stub
)
end
end
...
@@ -83,7 +80,6 @@ module Pod
...
@@ -83,7 +80,6 @@ module Pod
#----------------------------------------#
#----------------------------------------#
describe
'#add_xcconfig_namespaced_keys'
do
describe
'#add_xcconfig_namespaced_keys'
do
it
'appends to the values of the keys of the destination the value of the keys of the source'
do
it
'appends to the values of the keys of the destination the value of the keys of the source'
do
source_config
=
{
'HEADER_SEARCH_PATHS'
=>
'${PODS_ROOT}/MyPod'
}
source_config
=
{
'HEADER_SEARCH_PATHS'
=>
'${PODS_ROOT}/MyPod'
}
destination_config
=
{
'HEADER_SEARCH_PATHS'
=>
'${PODS_ROOT}/BuildHeaders'
}
destination_config
=
{
'HEADER_SEARCH_PATHS'
=>
'${PODS_ROOT}/BuildHeaders'
}
...
@@ -104,13 +100,11 @@ module Pod
...
@@ -104,13 +100,11 @@ module Pod
result
=
@config
.
send
(
:add_xcconfig_namespaced_keys
,
source_config
,
destination_config
,
'PREFIX_'
)
result
=
@config
.
send
(
:add_xcconfig_namespaced_keys
,
source_config
,
destination_config
,
'PREFIX_'
)
result
.
should
==
{
'EXCLUDED_SOURCE_FILE_NAMES'
=>
'${PREFIX_EXCLUDED_SOURCE_FILE_NAMES}'
}
result
.
should
==
{
'EXCLUDED_SOURCE_FILE_NAMES'
=>
'${PREFIX_EXCLUDED_SOURCE_FILE_NAMES}'
}
end
end
end
end
#----------------------------------------#
#----------------------------------------#
describe
'#conditional_less_key'
do
describe
'#conditional_less_key'
do
it
'returns the key without the xcconfig conditional syntax if present'
do
it
'returns the key without the xcconfig conditional syntax if present'
do
result
=
@config
.
send
(
:conditional_less_key
,
'EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*][arch=*]'
)
result
=
@config
.
send
(
:conditional_less_key
,
'EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*][arch=*]'
)
result
.
should
==
'EXCLUDED_SOURCE_FILE_NAMES'
result
.
should
==
'EXCLUDED_SOURCE_FILE_NAMES'
...
@@ -120,13 +114,10 @@ module Pod
...
@@ -120,13 +114,10 @@ module Pod
result
=
@config
.
send
(
:conditional_less_key
,
'EXCLUDED_SOURCE_FILE_NAMES'
)
result
=
@config
.
send
(
:conditional_less_key
,
'EXCLUDED_SOURCE_FILE_NAMES'
)
result
.
should
==
'EXCLUDED_SOURCE_FILE_NAMES'
result
.
should
==
'EXCLUDED_SOURCE_FILE_NAMES'
end
end
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
end
end
end
end
end
end
...
...
spec/unit/generator/xcconfig/public_pod_xcconfig_spec.rb
View file @
0684132b
...
@@ -4,7 +4,6 @@ module Pod
...
@@ -4,7 +4,6 @@ module Pod
module
Generator
module
Generator
module
XCConfig
module
XCConfig
describe
PublicPodXCConfig
do
describe
PublicPodXCConfig
do
before
do
before
do
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
...
@@ -92,7 +91,6 @@ module Pod
...
@@ -92,7 +91,6 @@ module Pod
generated
=
Xcodeproj
::
Config
.
new
(
@path
)
generated
=
Xcodeproj
::
Config
.
new
(
@path
)
generated
.
to_hash
.
each
{
|
k
,
_v
|
k
.
should
.
start_with
(
@pod_target
.
xcconfig_prefix
)
}
generated
.
to_hash
.
each
{
|
k
,
_v
|
k
.
should
.
start_with
(
@pod_target
.
xcconfig_prefix
)
}
end
end
end
end
end
end
end
end
...
...
spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
View file @
0684132b
...
@@ -4,7 +4,6 @@ module Pod
...
@@ -4,7 +4,6 @@ module Pod
module
Generator
module
Generator
module
XCConfig
module
XCConfig
describe
XCConfigHelper
do
describe
XCConfigHelper
do
before
do
before
do
@sut
=
XCConfigHelper
@sut
=
XCConfigHelper
end
end
...
@@ -207,7 +206,6 @@ module Pod
...
@@ -207,7 +206,6 @@ module Pod
end
end
#---------------------------------------------------------------------#
#---------------------------------------------------------------------#
end
end
end
end
end
end
...
...
spec/unit/generator/xcconfig_spec.rb
View file @
0684132b
...
@@ -2,6 +2,5 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,6 +2,5 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Generator
::
XCConfig
do
describe
Generator
::
XCConfig
do
end
end
end
end
spec/unit/hooks/installer_representation_spec.rb
View file @
0684132b
...
@@ -7,7 +7,6 @@ end
...
@@ -7,7 +7,6 @@ end
module
Pod
module
Pod
describe
Hooks
::
InstallerRepresentation
do
describe
Hooks
::
InstallerRepresentation
do
before
do
before
do
podfile
=
Pod
::
Podfile
.
new
do
podfile
=
Pod
::
Podfile
.
new
do
platform
:ios
platform
:ios
...
@@ -24,7 +23,6 @@ module Pod
...
@@ -24,7 +23,6 @@ module Pod
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Public Hooks API'
do
describe
'Public Hooks API'
do
it
'returns the sandbox root'
do
it
'returns the sandbox root'
do
@rep
.
sandbox_root
.
should
==
config
.
sandbox
.
root
@rep
.
sandbox_root
.
should
==
config
.
sandbox
.
root
end
end
...
@@ -55,13 +53,11 @@ module Pod
...
@@ -55,13 +53,11 @@ module Pod
target_definition
=
@installer
.
aggregate_targets
.
first
.
pod_targets
.
first
.
target_definition
target_definition
=
@installer
.
aggregate_targets
.
first
.
pod_targets
.
first
.
target_definition
pods_by_lib
[
target_definition
].
map
(
&
:name
).
should
==
[
'JSONKit'
]
pods_by_lib
[
target_definition
].
map
(
&
:name
).
should
==
[
'JSONKit'
]
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Unsafe Hooks API'
do
describe
'Unsafe Hooks API'
do
it
'returns the sandbox'
do
it
'returns the sandbox'
do
@rep
.
sandbox
.
should
==
config
.
sandbox
@rep
.
sandbox
.
should
==
config
.
sandbox
end
end
...
@@ -73,10 +69,8 @@ module Pod
...
@@ -73,10 +69,8 @@ module Pod
it
'returns the installer'
do
it
'returns the installer'
do
@rep
.
installer
.
should
==
@installer
@rep
.
installer
.
should
==
@installer
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
end
end
end
end
spec/unit/hooks/library_representation_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Hooks
::
LibraryRepresentation
do
describe
Hooks
::
LibraryRepresentation
do
before
do
before
do
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
'MyApp'
,
nil
)
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
'MyApp'
,
nil
)
@spec
=
Spec
.
new
@spec
=
Spec
.
new
...
@@ -14,7 +13,6 @@ module Pod
...
@@ -14,7 +13,6 @@ module Pod
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Public Hooks API'
do
describe
'Public Hooks API'
do
it
'returns the name'
do
it
'returns the name'
do
@rep
.
name
.
should
==
'Pods-MyApp'
@rep
.
name
.
should
==
'Pods-MyApp'
end
end
...
@@ -47,13 +45,11 @@ module Pod
...
@@ -47,13 +45,11 @@ module Pod
it
'returns the target definition'
do
it
'returns the target definition'
do
@rep
.
target_definition
.
should
==
@target_definition
@rep
.
target_definition
.
should
==
@target_definition
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Unsafe Hooks API'
do
describe
'Unsafe Hooks API'
do
it
'returns the sandbox'
do
it
'returns the sandbox'
do
@rep
.
sandbox
.
should
==
config
.
sandbox
@rep
.
sandbox
.
should
==
config
.
sandbox
end
end
...
@@ -67,10 +63,8 @@ module Pod
...
@@ -67,10 +63,8 @@ module Pod
@lib
.
native_target
=
target
@lib
.
native_target
=
target
@rep
.
target
.
should
==
target
@rep
.
target
.
should
==
target
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
end
end
end
end
spec/unit/hooks/pod_representation_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Hooks
::
PodRepresentation
do
describe
Hooks
::
PodRepresentation
do
before
do
before
do
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@root
=
fixture
(
'banana-lib'
)
@root
=
fixture
(
'banana-lib'
)
...
@@ -13,7 +12,6 @@ module Pod
...
@@ -13,7 +12,6 @@ module Pod
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Public Hooks API'
do
describe
'Public Hooks API'
do
it
'returns the name'
do
it
'returns the name'
do
@rep
.
name
.
should
==
'BananaLib'
@rep
.
name
.
should
==
'BananaLib'
end
end
...
@@ -43,10 +41,8 @@ module Pod
...
@@ -43,10 +41,8 @@ module Pod
'Classes/BananaTrace.d'
,
'Classes/BananaTrace.d'
,
]
]
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
end
end
end
end
spec/unit/installer/analyzer/sandbox_analyzer_spec.rb
View file @
0684132b
...
@@ -4,7 +4,6 @@ require File.expand_path('../../../../spec_helper', __FILE__)
...
@@ -4,7 +4,6 @@ require File.expand_path('../../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Installer
::
Analyzer
::
SandboxAnalyzer
do
describe
Installer
::
Analyzer
::
SandboxAnalyzer
do
before
do
before
do
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@sandbox
=
config
.
sandbox
@sandbox
=
config
.
sandbox
...
@@ -17,7 +16,6 @@ module Pod
...
@@ -17,7 +16,6 @@ module Pod
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Analysis'
do
describe
'Analysis'
do
it
'returns the sandbox state'
do
it
'returns the sandbox state'
do
@analyzer
.
stubs
(
:folder_exist?
).
returns
(
true
)
@analyzer
.
stubs
(
:folder_exist?
).
returns
(
true
)
@analyzer
.
stubs
(
:folder_empty?
).
returns
(
false
)
@analyzer
.
stubs
(
:folder_empty?
).
returns
(
false
)
...
@@ -31,13 +29,11 @@ module Pod
...
@@ -31,13 +29,11 @@ module Pod
@sandbox
.
stubs
(
:manifest
)
@sandbox
.
stubs
(
:manifest
)
@analyzer
.
analyze
.
added
.
should
==
[
'BananaLib'
]
@analyzer
.
analyze
.
added
.
should
==
[
'BananaLib'
]
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Analysis'
do
describe
'Analysis'
do
before
do
before
do
@analyzer
.
stubs
(
:folder_exist?
).
returns
(
true
)
@analyzer
.
stubs
(
:folder_exist?
).
returns
(
true
)
@analyzer
.
stubs
(
:folder_empty?
).
returns
(
false
)
@analyzer
.
stubs
(
:folder_empty?
).
returns
(
false
)
...
@@ -105,13 +101,11 @@ module Pod
...
@@ -105,13 +101,11 @@ module Pod
@analyzer
.
stubs
(
:update_mode?
).
returns
(
false
)
@analyzer
.
stubs
(
:update_mode?
).
returns
(
false
)
@analyzer
.
send
(
:pod_changed?
,
'BananaLib'
).
should
==
false
@analyzer
.
send
(
:pod_changed?
,
'BananaLib'
).
should
==
false
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Private helpers'
do
describe
'Private helpers'
do
it
'returns the sandbox manifest'
do
it
'returns the sandbox manifest'
do
@analyzer
.
send
(
:sandbox_manifest
).
should
==
@manifest
@analyzer
.
send
(
:sandbox_manifest
).
should
==
@manifest
end
end
...
@@ -171,7 +165,6 @@ module Pod
...
@@ -171,7 +165,6 @@ module Pod
path
=
temporary_directory
+
'Pods/BananaLib'
path
=
temporary_directory
+
'Pods/BananaLib'
path
.
mkpath
path
.
mkpath
@analyzer
.
send
(
:folder_exist?
,
'BananaLib'
).
should
.
be
.
true
@analyzer
.
send
(
:folder_exist?
,
'BananaLib'
).
should
.
be
.
true
end
end
it
'returns whether the folder containing the Pod with the given name is empty'
do
it
'returns whether the folder containing the Pod with the given name is empty'
do
...
@@ -181,10 +174,8 @@ module Pod
...
@@ -181,10 +174,8 @@ module Pod
File
.
open
(
path
+
'file'
,
'w'
)
{}
File
.
open
(
path
+
'file'
,
'w'
)
{}
@analyzer
.
send
(
:folder_empty?
,
'BananaLib'
).
should
.
be
.
false
@analyzer
.
send
(
:folder_empty?
,
'BananaLib'
).
should
.
be
.
false
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
end
end
end
end
spec/unit/installer/analyzer_spec.rb
View file @
0684132b
...
@@ -4,7 +4,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -4,7 +4,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Installer
::
Analyzer
do
describe
Installer
::
Analyzer
do
describe
'Analysis'
do
describe
'Analysis'
do
before
do
before
do
@podfile
=
Pod
::
Podfile
.
new
do
@podfile
=
Pod
::
Podfile
.
new
do
...
@@ -286,7 +285,6 @@ module Pod
...
@@ -286,7 +285,6 @@ module Pod
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Private helpers'
do
describe
'Private helpers'
do
describe
'#compute_user_project_targets'
do
describe
'#compute_user_project_targets'
do
it
'uses the path specified in the target definition while computing the path of the user project'
do
it
'uses the path specified in the target definition while computing the path of the user project'
do
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
...
@@ -343,7 +341,6 @@ module Pod
...
@@ -343,7 +341,6 @@ module Pod
#--------------------------------------#
#--------------------------------------#
describe
'#compute_user_project_targets'
do
describe
'#compute_user_project_targets'
do
it
'returns the targets specified in the target definition'
do
it
'returns the targets specified in the target definition'
do
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
.
link_with
=
[
'UserTarget'
]
target_definition
.
link_with
=
[
'UserTarget'
]
...
@@ -398,13 +395,11 @@ module Pod
...
@@ -398,13 +395,11 @@ module Pod
e
=
lambda
{
@analyzer
.
send
(
:compute_user_project_targets
,
target_definition
,
user_project
)
}.
should
.
raise
Informative
e
=
lambda
{
@analyzer
.
send
(
:compute_user_project_targets
,
target_definition
,
user_project
)
}.
should
.
raise
Informative
e
.
message
.
should
.
match
/Unable to find a target/
e
.
message
.
should
.
match
/Unable to find a target/
end
end
end
end
#--------------------------------------#
#--------------------------------------#
describe
'#compute_user_build_configurations'
do
describe
'#compute_user_build_configurations'
do
it
'returns the user build configurations of the user targets'
do
it
'returns the user build configurations of the user targets'
do
user_project
=
Xcodeproj
::
Project
.
new
(
'path'
)
user_project
=
Xcodeproj
::
Project
.
new
(
'path'
)
target
=
user_project
.
new_target
(
:application
,
'Target'
,
:ios
)
target
=
user_project
.
new_target
(
:application
,
'Target'
,
:ios
)
...
@@ -431,13 +426,11 @@ module Pod
...
@@ -431,13 +426,11 @@ module Pod
configurations
=
@analyzer
.
send
(
:compute_user_build_configurations
,
target_definition
,
user_targets
)
configurations
=
@analyzer
.
send
(
:compute_user_build_configurations
,
target_definition
,
user_targets
)
configurations
.
should
==
{
'AppStore'
=>
:release
}
configurations
.
should
==
{
'AppStore'
=>
:release
}
end
end
end
end
#--------------------------------------#
#--------------------------------------#
describe
'#compute_archs_for_target_definition'
do
describe
'#compute_archs_for_target_definition'
do
it
'handles a single ARCH defined in a single user target'
do
it
'handles a single ARCH defined in a single user target'
do
user_project
=
Xcodeproj
::
Project
.
new
(
'path'
)
user_project
=
Xcodeproj
::
Project
.
new
(
'path'
)
target
=
user_project
.
new_target
(
:application
,
'Target'
,
:ios
)
target
=
user_project
.
new_target
(
:application
,
'Target'
,
:ios
)
...
@@ -498,7 +491,6 @@ module Pod
...
@@ -498,7 +491,6 @@ module Pod
#--------------------------------------#
#--------------------------------------#
describe
'#compute_platform_for_target_definition'
do
describe
'#compute_platform_for_target_definition'
do
it
'returns the platform specified in the target definition'
do
it
'returns the platform specified in the target definition'
do
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
.
set_platform
(
:ios
,
'4.0'
)
target_definition
.
set_platform
(
:ios
,
'4.0'
)
...
...
spec/unit/installer/file_references_installer_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Installer
::
FileReferencesInstaller
do
describe
Installer
::
FileReferencesInstaller
do
before
do
before
do
@file_accessor
=
fixture_file_accessor
(
'banana-lib/BananaLib.podspec'
)
@file_accessor
=
fixture_file_accessor
(
'banana-lib/BananaLib.podspec'
)
@pod_target
=
PodTarget
.
new
([],
nil
,
config
.
sandbox
)
@pod_target
=
PodTarget
.
new
([],
nil
,
config
.
sandbox
)
...
@@ -16,7 +15,6 @@ module Pod
...
@@ -16,7 +15,6 @@ module Pod
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Installation'
do
describe
'Installation'
do
it
'adds the files references of the source files the Pods project'
do
it
'adds the files references of the source files the Pods project'
do
@file_accessor
.
path_list
.
read_file_system
@file_accessor
.
path_list
.
read_file_system
@file_accessor
.
path_list
.
expects
(
:read_file_system
)
@file_accessor
.
path_list
.
expects
(
:read_file_system
)
...
@@ -70,13 +68,11 @@ module Pod
...
@@ -70,13 +68,11 @@ module Pod
public_header
.
should
.
exist
public_header
.
should
.
exist
private_header
.
should
.
not
.
exist
private_header
.
should
.
not
.
exist
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Private Helpers'
do
describe
'Private Helpers'
do
describe
'#file_accessors'
do
describe
'#file_accessors'
do
it
'returns the file accessors'
do
it
'returns the file accessors'
do
pod_target_1
=
PodTarget
.
new
([],
nil
,
config
.
sandbox
)
pod_target_1
=
PodTarget
.
new
([],
nil
,
config
.
sandbox
)
...
@@ -129,10 +125,8 @@ module Pod
...
@@ -129,10 +125,8 @@ module Pod
}
}
end
end
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
end
end
end
end
spec/unit/installer/pod_source_installer_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Installer
::
PodSourceInstaller
do
describe
Installer
::
PodSourceInstaller
do
before
do
before
do
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@spec
.
source
=
{
:git
=>
SpecHelper
.
fixture
(
'banana-lib'
)
}
@spec
.
source
=
{
:git
=>
SpecHelper
.
fixture
(
'banana-lib'
)
}
...
@@ -13,7 +12,6 @@ module Pod
...
@@ -13,7 +12,6 @@ module Pod
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Installation'
do
describe
'Installation'
do
describe
'Download'
do
describe
'Download'
do
it
'downloads the source'
do
it
'downloads the source'
do
@spec
.
source
=
{
:git
=>
SpecHelper
.
fixture
(
'banana-lib'
),
:tag
=>
'v1.0'
}
@spec
.
source
=
{
:git
=>
SpecHelper
.
fixture
(
'banana-lib'
),
:tag
=>
'v1.0'
}
...
@@ -80,7 +78,6 @@ module Pod
...
@@ -80,7 +78,6 @@ module Pod
@installer
.
install!
@installer
.
install!
end
.
message
.
should
.
match
/does not support the :head option, as it uses a Http source./
end
.
message
.
should
.
match
/does not support the :head option, as it uses a Http source./
end
end
end
end
#--------------------------------------#
#--------------------------------------#
...
@@ -109,13 +106,11 @@ module Pod
...
@@ -109,13 +106,11 @@ module Pod
@spec
.
prepare_command
=
'cd Classes;ls Banana.h'
@spec
.
prepare_command
=
'cd Classes;ls Banana.h'
lambda
{
@installer
.
install!
}.
should
.
not
.
raise
lambda
{
@installer
.
install!
}.
should
.
not
.
raise
end
end
end
end
#--------------------------------------#
#--------------------------------------#
describe
'Cleaning'
do
describe
'Cleaning'
do
it
'cleans the paths non used by the installation'
do
it
'cleans the paths non used by the installation'
do
@installer
.
install!
@installer
.
install!
@installer
.
clean!
@installer
.
clean!
...
@@ -129,13 +124,11 @@ module Pod
...
@@ -129,13 +124,11 @@ module Pod
readme_file
=
config
.
sandbox
.
root
+
'BananaLib/README'
readme_file
=
config
.
sandbox
.
root
+
'BananaLib/README'
readme_file
.
should
.
exist
readme_file
.
should
.
exist
end
end
end
end
#--------------------------------------#
#--------------------------------------#
describe
'Options'
do
describe
'Options'
do
it
"doesn't downloads the source if the pod was already downloaded"
do
it
"doesn't downloads the source if the pod was already downloaded"
do
@installer
.
stubs
(
:predownloaded?
).
returns
(
true
)
@installer
.
stubs
(
:predownloaded?
).
returns
(
true
)
@installer
.
expects
(
:download_source
).
never
@installer
.
expects
(
:download_source
).
never
...
@@ -154,17 +147,14 @@ module Pod
...
@@ -154,17 +147,14 @@ module Pod
@installer
.
expects
(
:clean_installation
).
never
@installer
.
expects
(
:clean_installation
).
never
@installer
.
install!
@installer
.
install!
end
end
end
end
#--------------------------------------#
#--------------------------------------#
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Private Helpers'
do
describe
'Private Helpers'
do
it
'returns the clean paths'
do
it
'returns the clean paths'
do
@installer
.
send
(
:download_source
)
@installer
.
send
(
:download_source
)
paths
=
@installer
.
send
(
:clean_paths
)
paths
=
@installer
.
send
(
:clean_paths
)
...
@@ -236,10 +226,8 @@ module Pod
...
@@ -236,10 +226,8 @@ module Pod
paths
=
@installer
.
send
(
:used_files
)
paths
=
@installer
.
send
(
:used_files
)
paths
.
should
==
[]
paths
.
should
==
[]
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
end
end
end
end
spec/unit/installer/target_installer/aggregate_target_installer_spec.rb
View file @
0684132b
...
@@ -143,11 +143,9 @@ module Pod
...
@@ -143,11 +143,9 @@ module Pod
end
end
xit
'adds the resources bundles to the copy resources script'
do
xit
'adds the resources bundles to the copy resources script'
do
end
end
xit
'adds the bridge support file to the copy resources script, if one was created'
do
xit
'adds the bridge support file to the copy resources script, if one was created'
do
end
end
it
'does add pods to the embed frameworks script'
do
it
'does add pods to the embed frameworks script'
do
...
...
spec/unit/installer/target_installer/pod_target_installer_spec.rb
View file @
0684132b
...
@@ -119,7 +119,6 @@ module Pod
...
@@ -119,7 +119,6 @@ module Pod
end
end
xit
'adds the build configurations to the resources bundle targets'
do
xit
'adds the build configurations to the resources bundle targets'
do
end
end
#--------------------------------------#
#--------------------------------------#
...
@@ -211,7 +210,6 @@ module Pod
...
@@ -211,7 +210,6 @@ module Pod
end
end
describe
'concerning ARC before and after iOS 6.0 and OS X 10.8'
do
describe
'concerning ARC before and after iOS 6.0 and OS X 10.8'
do
it
'does not do anything if ARC is *not* required'
do
it
'does not do anything if ARC is *not* required'
do
@spec
.
ios
.
deployment_target
=
'5'
@spec
.
ios
.
deployment_target
=
'5'
@spec
.
osx
.
deployment_target
=
'10.6'
@spec
.
osx
.
deployment_target
=
'10.6'
...
...
spec/unit/installer/target_installer_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Installer
::
TargetInstaller
do
describe
Installer
::
TargetInstaller
do
before
do
before
do
@podfile
=
Podfile
.
new
do
@podfile
=
Podfile
.
new
do
platform
:ios
platform
:ios
...
@@ -45,6 +44,5 @@ module Pod
...
@@ -45,6 +44,5 @@ module Pod
@installer
.
send
(
:native_target
).
resolved_build_setting
(
'OTHER_LDFLAGS'
).
values
.
uniq
.
should
==
[
''
]
@installer
.
send
(
:native_target
).
resolved_build_setting
(
'OTHER_LDFLAGS'
).
values
.
uniq
.
should
==
[
''
]
@installer
.
send
(
:native_target
).
resolved_build_setting
(
'OTHER_LIBTOOLFLAGS'
).
values
.
uniq
.
should
==
[
''
]
@installer
.
send
(
:native_target
).
resolved_build_setting
(
'OTHER_LIBTOOLFLAGS'
).
values
.
uniq
.
should
==
[
''
]
end
end
end
end
end
end
spec/unit/installer/user_project_integrator/target_integrator/xcconfig_integrator_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
XCConfigIntegrator
=
Installer
::
UserProjectIntegrator
::
TargetIntegrator
::
XCConfigIntegrator
do
describe
XCConfigIntegrator
=
Installer
::
UserProjectIntegrator
::
TargetIntegrator
::
XCConfigIntegrator
do
before
do
before
do
project_path
=
SpecHelper
.
create_sample_app_copy_from_fixture
(
'SampleProject'
)
project_path
=
SpecHelper
.
create_sample_app_copy_from_fixture
(
'SampleProject'
)
@project
=
Xcodeproj
::
Project
.
open
(
project_path
)
@project
=
Xcodeproj
::
Project
.
open
(
project_path
)
...
@@ -71,6 +70,5 @@ module Pod
...
@@ -71,6 +70,5 @@ module Pod
UI
.
warnings
.
should
.
not
.
match
/not set.*base configuration/
UI
.
warnings
.
should
.
not
.
match
/not set.*base configuration/
end
end
end
end
end
end
spec/unit/installer/user_project_integrator/target_integrator_spec.rb
View file @
0684132b
...
@@ -3,7 +3,6 @@ require File.expand_path('../../../../spec_helper', __FILE__)
...
@@ -3,7 +3,6 @@ require File.expand_path('../../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
TargetIntegrator
=
Installer
::
UserProjectIntegrator
::
TargetIntegrator
do
describe
TargetIntegrator
=
Installer
::
UserProjectIntegrator
::
TargetIntegrator
do
describe
'In general'
do
describe
'In general'
do
# The project contains a `PBXReferenceProxy` in the build files of the
# The project contains a `PBXReferenceProxy` in the build files of the
# frameworks build phase which implicitly checks for the robustness of
# frameworks build phase which implicitly checks for the robustness of
# the detection of the target.
# the detection of the target.
...
...
spec/unit/installer/user_project_integrator_spec.rb
View file @
0684132b
...
@@ -2,9 +2,7 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,9 +2,7 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
UserProjectIntegrator
=
Installer
::
UserProjectIntegrator
do
describe
UserProjectIntegrator
=
Installer
::
UserProjectIntegrator
do
describe
'In general'
do
describe
'In general'
do
before
do
before
do
@sample_project_path
=
SpecHelper
.
create_sample_app_copy_from_fixture
(
'SampleProject'
)
@sample_project_path
=
SpecHelper
.
create_sample_app_copy_from_fixture
(
'SampleProject'
)
sample_project_path
=
@sample_project_path
sample_project_path
=
@sample_project_path
...
@@ -13,7 +11,6 @@ module Pod
...
@@ -13,7 +11,6 @@ module Pod
xcodeproj
sample_project_path
xcodeproj
sample_project_path
pod
'JSONKit'
pod
'JSONKit'
target
:empty
do
target
:empty
do
end
end
end
end
config
.
sandbox
.
project
=
Project
.
new
(
config
.
sandbox
.
project_path
)
config
.
sandbox
.
project
=
Project
.
new
(
config
.
sandbox
.
project_path
)
...
@@ -93,13 +90,11 @@ module Pod
...
@@ -93,13 +90,11 @@ module Pod
UI
.
warnings
.
should
.
not
.
include
'CODE_SIGN_IDENTITY'
UI
.
warnings
.
should
.
not
.
include
'CODE_SIGN_IDENTITY'
end
end
end
end
end
end
#-----------------------------------------------------------------------#
#-----------------------------------------------------------------------#
describe
'Workspace creation'
do
describe
'Workspace creation'
do
it
'creates a new workspace if needed'
do
it
'creates a new workspace if needed'
do
@integrator
.
send
(
:create_workspace
)
@integrator
.
send
(
:create_workspace
)
workspace_path
=
@integrator
.
send
(
:workspace_path
)
workspace_path
=
@integrator
.
send
(
:workspace_path
)
...
@@ -166,13 +161,11 @@ module Pod
...
@@ -166,13 +161,11 @@ module Pod
'SampleProject/SampleProject.xcodeproj'
,
'SampleProject/SampleProject.xcodeproj'
,
]
]
end
end
end
end
#-----------------------------------------------------------------------#
#-----------------------------------------------------------------------#
describe
'Private Helpers'
do
describe
'Private Helpers'
do
it
'uses the path of the workspace defined in the podfile'
do
it
'uses the path of the workspace defined in the podfile'
do
path
=
'a_path'
path
=
'a_path'
@podfile
.
workspace
(
path
)
@podfile
.
workspace
(
path
)
...
@@ -199,11 +192,9 @@ module Pod
...
@@ -199,11 +192,9 @@ module Pod
@integrator
.
targets
.
map
(
&
:name
).
should
==
[
'Pods'
,
'Pods-empty'
]
@integrator
.
targets
.
map
(
&
:name
).
should
==
[
'Pods'
,
'Pods-empty'
]
@integrator
.
send
(
:targets_to_integrate
).
map
(
&
:name
).
should
==
[
'Pods'
]
@integrator
.
send
(
:targets_to_integrate
).
map
(
&
:name
).
should
==
[
'Pods'
]
end
end
end
end
#-----------------------------------------------------------------------#
#-----------------------------------------------------------------------#
end
end
end
end
end
end
spec/unit/installer_spec.rb
View file @
0684132b
...
@@ -35,7 +35,6 @@ end
...
@@ -35,7 +35,6 @@ end
module
Pod
module
Pod
describe
Installer
do
describe
Installer
do
before
do
before
do
podfile
=
generate_podfile
podfile
=
generate_podfile
lockfile
=
generate_lockfile
lockfile
=
generate_lockfile
...
@@ -46,7 +45,6 @@ module Pod
...
@@ -46,7 +45,6 @@ module Pod
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'In general'
do
describe
'In general'
do
before
do
before
do
@installer
.
stubs
(
:resolve_dependencies
)
@installer
.
stubs
(
:resolve_dependencies
)
@installer
.
stubs
(
:download_dependencies
)
@installer
.
stubs
(
:download_dependencies
)
...
@@ -113,13 +111,11 @@ module Pod
...
@@ -113,13 +111,11 @@ module Pod
UI
.
warnings
.
should
.
include
'deprecated in favor of AFNetworking'
UI
.
warnings
.
should
.
include
'deprecated in favor of AFNetworking'
UI
.
warnings
.
should
.
include
'BlocksKit has been deprecated'
UI
.
warnings
.
should
.
include
'BlocksKit has been deprecated'
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'#determine_dependency_product_type'
do
describe
'#determine_dependency_product_type'
do
it
'does propagate that frameworks are required to all pod targets'
do
it
'does propagate that frameworks are required to all pod targets'
do
fixture_path
=
ROOT
+
'spec/fixtures'
fixture_path
=
ROOT
+
'spec/fixtures'
config
.
repos_dir
=
fixture_path
+
'spec-repos'
config
.
repos_dir
=
fixture_path
+
'spec-repos'
...
@@ -144,15 +140,12 @@ module Pod
...
@@ -144,15 +140,12 @@ module Pod
'Pods-monkey'
,
'Pods-monkey'
,
]
]
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Dependencies Resolution'
do
describe
'Dependencies Resolution'
do
describe
'#analyze'
do
describe
'#analyze'
do
it
'prints a warning if the version of the Lockfile is higher than the one of the executable'
do
it
'prints a warning if the version of the Lockfile is higher than the one of the executable'
do
Lockfile
.
any_instance
.
stubs
(
:cocoapods_version
).
returns
(
Version
.
new
(
'999'
))
Lockfile
.
any_instance
.
stubs
(
:cocoapods_version
).
returns
(
Version
.
new
(
'999'
))
STDERR
.
expects
(
:puts
)
STDERR
.
expects
(
:puts
)
...
@@ -177,7 +170,6 @@ module Pod
...
@@ -177,7 +170,6 @@ module Pod
@installer
.
aggregate_targets
.
map
(
&
:name
).
sort
.
should
==
[
'Pods'
]
@installer
.
aggregate_targets
.
map
(
&
:name
).
sort
.
should
==
[
'Pods'
]
@installer
.
pod_targets
.
map
(
&
:name
).
sort
.
should
==
[
'Pods-JSONKit'
]
@installer
.
pod_targets
.
map
(
&
:name
).
sort
.
should
==
[
'Pods-JSONKit'
]
end
end
end
end
#--------------------------------------#
#--------------------------------------#
...
@@ -205,7 +197,6 @@ module Pod
...
@@ -205,7 +197,6 @@ module Pod
#--------------------------------------#
#--------------------------------------#
describe
'#clean_sandbox'
do
describe
'#clean_sandbox'
do
before
do
before
do
@analysis_result
=
Installer
::
Analyzer
::
AnalysisResult
.
new
@analysis_result
=
Installer
::
Analyzer
::
AnalysisResult
.
new
@analysis_result
.
specifications
=
[]
@analysis_result
.
specifications
=
[]
...
@@ -228,15 +219,12 @@ module Pod
...
@@ -228,15 +219,12 @@ module Pod
config
.
sandbox
.
expects
(
:clean_pod
).
with
(
'Deleted-Pod'
)
config
.
sandbox
.
expects
(
:clean_pod
).
with
(
'Deleted-Pod'
)
@installer
.
send
(
:clean_sandbox
)
@installer
.
send
(
:clean_sandbox
)
end
end
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Downloading dependencies'
do
describe
'Downloading dependencies'
do
it
'installs head pods'
do
it
'installs head pods'
do
podfile
=
Podfile
.
new
do
podfile
=
Podfile
.
new
do
platform
:osx
,
'10.10'
platform
:osx
,
'10.10'
...
@@ -255,7 +243,6 @@ module Pod
...
@@ -255,7 +243,6 @@ module Pod
end
end
describe
'#install_pod_sources'
do
describe
'#install_pod_sources'
do
it
'installs all the Pods which are marked as needing installation'
do
it
'installs all the Pods which are marked as needing installation'
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
spec_2
=
Spec
.
new
spec_2
=
Spec
.
new
...
@@ -310,26 +297,21 @@ module Pod
...
@@ -310,26 +297,21 @@ module Pod
#--------------------------------------#
#--------------------------------------#
describe
'#clean'
do
describe
'#clean'
do
it
'it cleans only if the config instructs to do it'
do
it
'it cleans only if the config instructs to do it'
do
config
.
clean
=
false
config
.
clean
=
false
@installer
.
send
(
:clean_pod_sources
)
@installer
.
send
(
:clean_pod_sources
)
Installer
::
PodSourceInstaller
.
any_instance
.
expects
(
:install!
).
never
Installer
::
PodSourceInstaller
.
any_instance
.
expects
(
:install!
).
never
end
end
end
end
#--------------------------------------#
#--------------------------------------#
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Generating pods project'
do
describe
'Generating pods project'
do
describe
'#prepare_pods_project'
do
describe
'#prepare_pods_project'
do
before
do
before
do
@installer
.
stubs
(
:aggregate_targets
).
returns
([])
@installer
.
stubs
(
:aggregate_targets
).
returns
([])
end
end
...
@@ -389,25 +371,21 @@ module Pod
...
@@ -389,25 +371,21 @@ module Pod
build_setting
[
'IPHONEOS_DEPLOYMENT_TARGET'
].
should
==
'6.0'
build_setting
[
'IPHONEOS_DEPLOYMENT_TARGET'
].
should
==
'6.0'
end
end
end
end
end
end
#--------------------------------------#
#--------------------------------------#
describe
'#install_file_references'
do
describe
'#install_file_references'
do
it
'installs the file references'
do
it
'installs the file references'
do
@installer
.
stubs
(
:pod_targets
).
returns
([])
@installer
.
stubs
(
:pod_targets
).
returns
([])
Installer
::
FileReferencesInstaller
.
any_instance
.
expects
(
:install!
)
Installer
::
FileReferencesInstaller
.
any_instance
.
expects
(
:install!
)
@installer
.
send
(
:install_file_references
)
@installer
.
send
(
:install_file_references
)
end
end
end
end
#--------------------------------------#
#--------------------------------------#
describe
'#install_libraries'
do
describe
'#install_libraries'
do
it
'install the targets of the Pod project'
do
it
'install the targets of the Pod project'
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
...
@@ -435,13 +413,11 @@ module Pod
...
@@ -435,13 +413,11 @@ module Pod
names
=
@installer
.
sandbox
.
project
[
'Frameworks'
].
children
.
map
(
&
:name
)
names
=
@installer
.
sandbox
.
project
[
'Frameworks'
].
children
.
map
(
&
:name
)
names
.
sort
.
should
==
[
'Foundation.framework'
,
'QuartzCore.framework'
]
names
.
sort
.
should
==
[
'Foundation.framework'
,
'QuartzCore.framework'
]
end
end
end
end
#--------------------------------------#
#--------------------------------------#
describe
'#set_target_dependencies'
do
describe
'#set_target_dependencies'
do
it
'sets resource bundles for not build pods as target dependencies of the user target'
do
it
'sets resource bundles for not build pods as target dependencies of the user target'
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
@installer
.
podfile
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
@installer
.
podfile
)
...
@@ -463,23 +439,18 @@ module Pod
...
@@ -463,23 +439,18 @@ module Pod
end
end
xit
'sets the pod targets as dependencies of the aggregate target'
do
xit
'sets the pod targets as dependencies of the aggregate target'
do
end
end
xit
'sets the dependecies of the pod targets'
do
xit
'sets the dependecies of the pod targets'
do
end
end
xit
'is robusts against subspecs'
do
xit
'is robusts against subspecs'
do
end
end
end
end
#--------------------------------------#
#--------------------------------------#
describe
'#write_pod_project'
do
describe
'#write_pod_project'
do
before
do
before
do
@installer
.
stubs
(
:aggregate_targets
).
returns
([])
@installer
.
stubs
(
:aggregate_targets
).
returns
([])
@installer
.
stubs
(
:analysis_result
).
returns
(
stub
(
:all_user_build_configurations
=>
{}))
@installer
.
stubs
(
:analysis_result
).
returns
(
stub
(
:all_user_build_configurations
=>
{}))
...
@@ -498,13 +469,11 @@ module Pod
...
@@ -498,13 +469,11 @@ module Pod
@installer
.
pods_project
.
expects
(
:save
)
@installer
.
pods_project
.
expects
(
:save
)
@installer
.
send
(
:write_pod_project
)
@installer
.
send
(
:write_pod_project
)
end
end
end
end
#--------------------------------------#
#--------------------------------------#
describe
'#write_lockfiles'
do
describe
'#write_lockfiles'
do
before
do
before
do
@analysis_result
=
Installer
::
Analyzer
::
AnalysisResult
.
new
@analysis_result
=
Installer
::
Analyzer
::
AnalysisResult
.
new
@analysis_result
.
specifications
=
[
fixture_spec
(
'banana-lib/BananaLib.podspec'
)]
@analysis_result
.
specifications
=
[
fixture_spec
(
'banana-lib/BananaLib.podspec'
)]
...
@@ -527,21 +496,17 @@ module Pod
...
@@ -527,21 +496,17 @@ module Pod
lockfile
=
Lockfile
.
from_file
(
temporary_directory
+
'Pods/Manifest.lock'
)
lockfile
=
Lockfile
.
from_file
(
temporary_directory
+
'Pods/Manifest.lock'
)
lockfile
.
pod_names
.
should
==
[
'BananaLib'
]
lockfile
.
pod_names
.
should
==
[
'BananaLib'
]
end
end
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Integrating client projects'
do
describe
'Integrating client projects'
do
it
'integrates the client projects'
do
it
'integrates the client projects'
do
@installer
.
stubs
(
:aggregate_targets
).
returns
([
AggregateTarget
.
new
(
nil
,
config
.
sandbox
)])
@installer
.
stubs
(
:aggregate_targets
).
returns
([
AggregateTarget
.
new
(
nil
,
config
.
sandbox
)])
Installer
::
UserProjectIntegrator
.
any_instance
.
expects
(
:integrate!
)
Installer
::
UserProjectIntegrator
.
any_instance
.
expects
(
:integrate!
)
@installer
.
send
(
:integrate_user_project
)
@installer
.
send
(
:integrate_user_project
)
end
end
end
end
describe
'Plugins Hooks'
do
describe
'Plugins Hooks'
do
...
@@ -590,7 +555,6 @@ module Pod
...
@@ -590,7 +555,6 @@ module Pod
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Hooks'
do
describe
'Hooks'
do
before
do
before
do
@installer
.
send
(
:analyze
)
@installer
.
send
(
:analyze
)
@specs
=
@installer
.
pod_targets
.
map
(
&
:specs
).
flatten
@specs
=
@installer
.
pod_targets
.
map
(
&
:specs
).
flatten
...
...
spec/unit/library_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Pod
::
AggregateTarget
do
describe
Pod
::
AggregateTarget
do
describe
'In general'
do
describe
'In general'
do
before
do
before
do
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
...
@@ -68,7 +67,6 @@ module Pod
...
@@ -68,7 +67,6 @@ module Pod
it
'returns the path of the xcconfig file relative to the user project'
do
it
'returns the path of the xcconfig file relative to the user project'
do
@lib
.
xcconfig_relative_path
(
'Release'
).
should
==
'Pods/Target Support Files/Pods/Pods.release.xcconfig'
@lib
.
xcconfig_relative_path
(
'Release'
).
should
==
'Pods/Target Support Files/Pods/Pods.release.xcconfig'
end
end
end
end
end
end
end
end
spec/unit/project_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Project
do
describe
Project
do
before
do
before
do
@project
=
Project
.
new
(
config
.
sandbox
.
project_path
)
@project
=
Project
.
new
(
config
.
sandbox
.
project_path
)
end
end
...
@@ -10,7 +9,6 @@ module Pod
...
@@ -10,7 +9,6 @@ module Pod
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'In general'
do
describe
'In general'
do
it
'creates the support files group on initialization'
do
it
'creates the support files group on initialization'
do
@project
.
support_files_group
.
name
.
should
==
'Targets Support Files'
@project
.
support_files_group
.
name
.
should
==
'Targets Support Files'
end
end
...
@@ -22,15 +20,12 @@ module Pod
...
@@ -22,15 +20,12 @@ module Pod
it
'creates the development Pods group on initialization'
do
it
'creates the development Pods group on initialization'
do
@project
.
development_pods
.
name
.
should
==
'Development Pods'
@project
.
development_pods
.
name
.
should
==
'Development Pods'
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Pod Groups'
do
describe
'Pod Groups'
do
describe
'#add_pod_group'
do
describe
'#add_pod_group'
do
before
do
before
do
@path
=
config
.
sandbox
.
pod_dir
(
'BananaLib'
)
@path
=
config
.
sandbox
.
pod_dir
(
'BananaLib'
)
end
end
...
@@ -63,13 +58,11 @@ module Pod
...
@@ -63,13 +58,11 @@ module Pod
group
.
path
.
should
==
@path
.
to_s
group
.
path
.
should
==
@path
.
to_s
Pathname
.
new
(
group
.
path
).
should
.
be
.
absolute
Pathname
.
new
(
group
.
path
).
should
.
be
.
absolute
end
end
end
end
#----------------------------------------#
#----------------------------------------#
describe
'#pod_groups'
do
describe
'#pod_groups'
do
before
do
before
do
@project
.
add_pod_group
(
'BananaLib'
,
config
.
sandbox
.
pod_dir
(
'BananaLib'
))
@project
.
add_pod_group
(
'BananaLib'
,
config
.
sandbox
.
pod_dir
(
'BananaLib'
))
@project
.
add_pod_group
(
'OrangeLib'
,
config
.
sandbox
.
pod_dir
(
'OrangeLib'
),
true
)
@project
.
add_pod_group
(
'OrangeLib'
,
config
.
sandbox
.
pod_dir
(
'OrangeLib'
),
true
)
...
@@ -83,7 +76,6 @@ module Pod
...
@@ -83,7 +76,6 @@ module Pod
@project
.
pods
.
children
.
map
(
&
:name
).
sort
.
should
==
[
'BananaLib'
]
@project
.
pods
.
children
.
map
(
&
:name
).
sort
.
should
==
[
'BananaLib'
]
@project
.
development_pods
.
children
.
map
(
&
:name
).
sort
.
should
==
[
'OrangeLib'
]
@project
.
development_pods
.
children
.
map
(
&
:name
).
sort
.
should
==
[
'OrangeLib'
]
end
end
end
end
#----------------------------------------#
#----------------------------------------#
...
@@ -96,7 +88,6 @@ module Pod
...
@@ -96,7 +88,6 @@ module Pod
#----------------------------------------#
#----------------------------------------#
describe
'#group_for_spec'
do
describe
'#group_for_spec'
do
before
do
before
do
@project
.
add_pod_group
(
'BananaLib'
,
config
.
sandbox
.
pod_dir
(
'BananaLib'
))
@project
.
add_pod_group
(
'BananaLib'
,
config
.
sandbox
.
pod_dir
(
'BananaLib'
))
end
end
...
@@ -133,7 +124,6 @@ module Pod
...
@@ -133,7 +124,6 @@ module Pod
#----------------------------------------#
#----------------------------------------#
describe
'#pod_support_files_group'
do
describe
'#pod_support_files_group'
do
before
do
before
do
@project
.
add_pod_group
(
'BananaLib'
,
@path
,
false
,
true
)
@project
.
add_pod_group
(
'BananaLib'
,
@path
,
false
,
true
)
end
end
...
@@ -148,16 +138,13 @@ module Pod
...
@@ -148,16 +138,13 @@ module Pod
group_2
=
@project
.
pod_support_files_group
(
'BananaLib'
,
'path'
)
group_2
=
@project
.
pod_support_files_group
(
'BananaLib'
,
'path'
)
group_1
.
uuid
.
should
==
group_2
.
uuid
group_1
.
uuid
.
should
==
group_2
.
uuid
end
end
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'File references'
do
describe
'File references'
do
describe
'#reference_for_path'
do
describe
'#reference_for_path'
do
before
do
before
do
@project
.
add_pod_group
(
'BananaLib'
,
config
.
sandbox
.
pod_dir
(
'BananaLib'
),
false
)
@project
.
add_pod_group
(
'BananaLib'
,
config
.
sandbox
.
pod_dir
(
'BananaLib'
),
false
)
@file
=
config
.
sandbox
.
pod_dir
(
'BananaLib'
)
+
'file.m'
@file
=
config
.
sandbox
.
pod_dir
(
'BananaLib'
)
+
'file.m'
...
@@ -187,13 +174,11 @@ module Pod
...
@@ -187,13 +174,11 @@ module Pod
@project
.
add_file_reference
(
'relative/path/to/file.m'
,
@group
)
@project
.
add_file_reference
(
'relative/path/to/file.m'
,
@group
)
end
.
message
.
should
.
match
/Paths must be absolute/
end
.
message
.
should
.
match
/Paths must be absolute/
end
end
end
end
#----------------------------------------#
#----------------------------------------#
describe
'#reference_for_path'
do
describe
'#reference_for_path'
do
before
do
before
do
@project
.
add_pod_group
(
'BananaLib'
,
config
.
sandbox
.
pod_dir
(
'BananaLib'
),
false
)
@project
.
add_pod_group
(
'BananaLib'
,
config
.
sandbox
.
pod_dir
(
'BananaLib'
),
false
)
@file
=
config
.
sandbox
.
pod_dir
(
'BananaLib'
)
+
'file.m'
@file
=
config
.
sandbox
.
pod_dir
(
'BananaLib'
)
+
'file.m'
...
@@ -217,7 +202,6 @@ module Pod
...
@@ -217,7 +202,6 @@ module Pod
@project
.
reference_for_path
(
'relative/path/to/file.m'
)
@project
.
reference_for_path
(
'relative/path/to/file.m'
)
end
.
message
.
should
.
match
/Paths must be absolute/
end
.
message
.
should
.
match
/Paths must be absolute/
end
end
end
end
#----------------------------------------#
#----------------------------------------#
...
@@ -268,6 +252,5 @@ module Pod
...
@@ -268,6 +252,5 @@ module Pod
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
end
end
end
end
spec/unit/resolver_spec.rb
View file @
0684132b
...
@@ -473,13 +473,11 @@ module Pod
...
@@ -473,13 +473,11 @@ module Pod
resolved
[
osx_target
].
map
(
&
:to_s
).
should
.
include
osx_dependency
resolved
[
osx_target
].
map
(
&
:to_s
).
should
.
include
osx_dependency
end
end
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Pre-release versions'
do
describe
'Pre-release versions'
do
it
'resolves explicitly requested pre-release versions'
do
it
'resolves explicitly requested pre-release versions'
do
@podfile
=
Podfile
.
new
do
@podfile
=
Podfile
.
new
do
platform
:ios
,
'6.0'
platform
:ios
,
'6.0'
...
...
spec/unit/sandbox/file_accessor_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
FileAccessor
=
Sandbox
::
FileAccessor
do
describe
FileAccessor
=
Sandbox
::
FileAccessor
do
before
do
before
do
@root
=
fixture
(
'banana-lib'
)
@root
=
fixture
(
'banana-lib'
)
@path_list
=
Sandbox
::
PathList
.
new
(
@root
)
@path_list
=
Sandbox
::
PathList
.
new
(
@root
)
...
@@ -12,7 +11,6 @@ module Pod
...
@@ -12,7 +11,6 @@ module Pod
end
end
describe
'In general'
do
describe
'In general'
do
it
'raises if the consumer is nil'
do
it
'raises if the consumer is nil'
do
e
=
lambda
{
FileAccessor
.
new
(
@path_list
,
nil
)
}.
should
.
raise
Informative
e
=
lambda
{
FileAccessor
.
new
(
@path_list
,
nil
)
}.
should
.
raise
Informative
e
.
message
.
should
.
match
/without a specification consumer/
e
.
message
.
should
.
match
/without a specification consumer/
...
@@ -37,13 +35,11 @@ module Pod
...
@@ -37,13 +35,11 @@ module Pod
it
'returns the platform for which the spec is being consumed'
do
it
'returns the platform for which the spec is being consumed'
do
@accessor
.
platform_name
.
should
==
:ios
@accessor
.
platform_name
.
should
==
:ios
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Returning files'
do
describe
'Returning files'
do
it
'returns the source files'
do
it
'returns the source files'
do
@accessor
.
source_files
.
sort
.
should
==
[
@accessor
.
source_files
.
sort
.
should
==
[
@root
+
'Classes/Banana.h'
,
@root
+
'Classes/Banana.h'
,
...
@@ -202,15 +198,12 @@ module Pod
...
@@ -202,15 +198,12 @@ module Pod
]
]
end
end
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Private helpers'
do
describe
'Private helpers'
do
describe
'#paths_for_attribute'
do
describe
'#paths_for_attribute'
do
it
'takes into account dir patterns and excluded files'
do
it
'takes into account dir patterns and excluded files'
do
file_patterns
=
[
'Classes/*.{h,m,d}'
,
'Vendor'
]
file_patterns
=
[
'Classes/*.{h,m,d}'
,
'Vendor'
]
options
=
{
options
=
{
...
@@ -222,12 +215,9 @@ module Pod
...
@@ -222,12 +215,9 @@ module Pod
@accessor
.
expects
(
:expanded_paths
).
with
(
file_patterns
,
options
)
@accessor
.
expects
(
:expanded_paths
).
with
(
file_patterns
,
options
)
@accessor
.
send
(
:paths_for_attribute
,
:source_files
)
@accessor
.
send
(
:paths_for_attribute
,
:source_files
)
end
end
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
end
end
end
end
spec/unit/sandbox/headers_store_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Sandbox
::
HeadersStore
do
describe
Sandbox
::
HeadersStore
do
before
do
before
do
@sandbox
=
Pod
::
Sandbox
.
new
(
temporary_directory
+
'Sandbox'
)
@sandbox
=
Pod
::
Sandbox
.
new
(
temporary_directory
+
'Sandbox'
)
@header_dir
=
Sandbox
::
HeadersStore
.
new
(
@sandbox
,
'Public'
)
@header_dir
=
Sandbox
::
HeadersStore
.
new
(
@sandbox
,
'Public'
)
...
...
spec/unit/sandbox/path_list_spec.rb
View file @
0684132b
...
@@ -2,13 +2,11 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,13 +2,11 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Sandbox
::
PathList
do
describe
Sandbox
::
PathList
do
before
do
before
do
@path_list
=
Sandbox
::
PathList
.
new
(
fixture
(
'banana-lib'
))
@path_list
=
Sandbox
::
PathList
.
new
(
fixture
(
'banana-lib'
))
end
end
describe
'In general'
do
describe
'In general'
do
it
'creates the list of all the files'
do
it
'creates the list of all the files'
do
files
=
@path_list
.
files
files
=
@path_list
.
files
files
.
reject!
do
|
f
|
files
.
reject!
do
|
f
|
...
@@ -60,7 +58,6 @@ module Pod
...
@@ -60,7 +58,6 @@ module Pod
@path_list
=
Sandbox
::
PathList
.
new
(
root
)
@path_list
=
Sandbox
::
PathList
.
new
(
root
)
@path_list
.
files
.
should
==
[
'Class.h'
]
@path_list
.
files
.
should
==
[
'Class.h'
]
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
...
@@ -134,13 +131,11 @@ module Pod
...
@@ -134,13 +131,11 @@ module Pod
Resources/sub_dir
Resources/sub_dir
)
)
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Private Helpers'
do
describe
'Private Helpers'
do
describe
'#directory?'
do
describe
'#directory?'
do
it
'detects a directory'
do
it
'detects a directory'
do
@path_list
.
send
(
:directory?
,
'classes'
).
should
==
true
@path_list
.
send
(
:directory?
,
'classes'
).
should
==
true
...
@@ -178,25 +173,20 @@ module Pod
...
@@ -178,25 +173,20 @@ module Pod
Classes/file.m
Classes/file.m
)
)
end
end
end
end
#--------------------------------------#
#--------------------------------------#
describe
'#escape_path_for_glob'
do
describe
'#escape_path_for_glob'
do
it
'escapes metacharacters'
do
it
'escapes metacharacters'
do
escaped
=
@path_list
.
send
(
:escape_path_for_glob
,
'[]{}?**'
)
escaped
=
@path_list
.
send
(
:escape_path_for_glob
,
'[]{}?**'
)
escaped
.
to_s
.
should
==
'\[\]\{\}\?\*\*'
escaped
.
to_s
.
should
==
'\[\]\{\}\?\*\*'
end
end
end
end
#--------------------------------------#
#--------------------------------------#
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
end
end
end
end
spec/unit/sandbox_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Sandbox
do
describe
Sandbox
do
before
do
before
do
@sandbox
=
Pod
::
Sandbox
.
new
(
temporary_directory
+
'Sandbox'
)
@sandbox
=
Pod
::
Sandbox
.
new
(
temporary_directory
+
'Sandbox'
)
end
end
...
@@ -10,7 +9,6 @@ module Pod
...
@@ -10,7 +9,6 @@ module Pod
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'In general'
do
describe
'In general'
do
it
'reads the real path of the root so it can be used to build relative paths'
do
it
'reads the real path of the root so it can be used to build relative paths'
do
root_realpath
=
temporary_directory
+
'Folder/SubFolder'
root_realpath
=
temporary_directory
+
'Folder/SubFolder'
FileUtils
.
mkdir_p
(
root_realpath
)
FileUtils
.
mkdir_p
(
root_realpath
)
...
@@ -54,13 +52,11 @@ module Pod
...
@@ -54,13 +52,11 @@ module Pod
@sandbox
.
clean_pod
(
'BananaLib'
)
@sandbox
.
clean_pod
(
'BananaLib'
)
pod_root
.
should
.
exist
pod_root
.
should
.
exist
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Paths'
do
describe
'Paths'
do
it
'returns the path of the manifest'
do
it
'returns the path of the manifest'
do
@sandbox
.
manifest_path
.
should
==
@sandbox
.
manifest_path
.
should
==
temporary_directory
+
'Sandbox/Manifest.lock'
temporary_directory
+
'Sandbox/Manifest.lock'
...
@@ -97,7 +93,6 @@ module Pod
...
@@ -97,7 +93,6 @@ module Pod
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Specification store'
do
describe
'Specification store'
do
it
'loads the stored specification with the given name'
do
it
'loads the stored specification with the given name'
do
(
@sandbox
.
specifications_root
).
mkdir
(
@sandbox
.
specifications_root
).
mkdir
FileUtils
.
cp
(
fixture
(
'banana-lib/BananaLib.podspec'
),
@sandbox
.
specifications_root
)
FileUtils
.
cp
(
fixture
(
'banana-lib/BananaLib.podspec'
),
@sandbox
.
specifications_root
)
...
@@ -142,13 +137,11 @@ module Pod
...
@@ -142,13 +137,11 @@ module Pod
path
.
should
.
exist
path
.
should
.
exist
@sandbox
.
specification_path
(
'BananaLib'
).
should
==
path
@sandbox
.
specification_path
(
'BananaLib'
).
should
==
path
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Pods information'
do
describe
'Pods information'
do
it
'stores the list of the names of the pre-downloaded pods'
do
it
'stores the list of the names of the pre-downloaded pods'
do
@sandbox
.
store_pre_downloaded_pod
(
'BananaLib'
)
@sandbox
.
store_pre_downloaded_pod
(
'BananaLib'
)
@sandbox
.
predownloaded_pods
.
should
==
[
'BananaLib'
]
@sandbox
.
predownloaded_pods
.
should
==
[
'BananaLib'
]
...
@@ -212,10 +205,8 @@ module Pod
...
@@ -212,10 +205,8 @@ module Pod
@sandbox
.
local?
(
'BananaLib/Subspec'
).
should
.
be
.
true
@sandbox
.
local?
(
'BananaLib/Subspec'
).
should
.
be
.
true
@sandbox
.
local?
(
'Monkey'
).
should
.
be
.
false
@sandbox
.
local?
(
'Monkey'
).
should
.
be
.
false
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
end
end
end
end
spec/unit/sources_manager_spec.rb
View file @
0684132b
...
@@ -28,7 +28,6 @@ end
...
@@ -28,7 +28,6 @@ end
module
Pod
module
Pod
describe
SourcesManager
do
describe
SourcesManager
do
before
do
before
do
@test_source
=
Source
.
new
(
fixture
(
'spec-repos/test_repo'
))
@test_source
=
Source
.
new
(
fixture
(
'spec-repos/test_repo'
))
end
end
...
@@ -36,7 +35,6 @@ module Pod
...
@@ -36,7 +35,6 @@ module Pod
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'In general'
do
describe
'In general'
do
before
do
before
do
SourcesManager
.
stubs
(
:all
).
returns
([
@test_source
])
SourcesManager
.
stubs
(
:all
).
returns
([
@test_source
])
end
end
...
@@ -299,13 +297,11 @@ module Pod
...
@@ -299,13 +297,11 @@ module Pod
it
"it returns an empty array for the version information if the file can't be found"
do
it
"it returns an empty array for the version information if the file can't be found"
do
SourcesManager
.
version_information
(
temporary_directory
).
should
==
{}
SourcesManager
.
version_information
(
temporary_directory
).
should
==
{}
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Master repo'
do
describe
'Master repo'
do
it
'returns the master repo dir'
do
it
'returns the master repo dir'
do
SourcesManager
.
master_repo_dir
.
to_s
.
should
.
match
/fixtures\/spec-repos\/master/
SourcesManager
.
master_repo_dir
.
to_s
.
should
.
match
/fixtures\/spec-repos\/master/
end
end
...
@@ -315,7 +311,6 @@ module Pod
...
@@ -315,7 +311,6 @@ module Pod
config
.
repos_dir
=
SpecHelper
.
temporary_directory
config
.
repos_dir
=
SpecHelper
.
temporary_directory
SourcesManager
.
master_repo_functional?
.
should
.
be
.
false
SourcesManager
.
master_repo_functional?
.
should
.
be
.
false
end
end
end
end
end
end
end
end
spec/unit/target/pod_target_spec.rb
View file @
0684132b
...
@@ -209,6 +209,5 @@ module Pod
...
@@ -209,6 +209,5 @@ module Pod
end
end
end
end
end
end
end
end
end
end
spec/unit/target_spec.rb
View file @
0684132b
...
@@ -2,7 +2,6 @@ require File.expand_path('../../spec_helper', __FILE__)
...
@@ -2,7 +2,6 @@ require File.expand_path('../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Target
do
describe
Target
do
describe
'#c99ext_identifier'
do
describe
'#c99ext_identifier'
do
before
do
before
do
@target
=
Target
.
new
@target
=
Target
.
new
...
@@ -15,8 +14,6 @@ module Pod
...
@@ -15,8 +14,6 @@ module Pod
it
'should mask invalid chars'
do
it
'should mask invalid chars'
do
@target
.
send
(
:c99ext_identifier
,
'iOS-App BânánàLïb'
).
should
==
'iOS_App_B_n_n_L_b'
@target
.
send
(
:c99ext_identifier
,
'iOS-App BânánàLïb'
).
should
==
'iOS_App_B_n_n_L_b'
end
end
end
end
end
end
end
end
spec/unit/user_interface/error_report_spec.rb
View file @
0684132b
...
@@ -104,6 +104,5 @@ EOS
...
@@ -104,6 +104,5 @@ EOS
message
.
should
==
'[!] at -'
message
.
should
==
'[!] at -'
end
end
end
end
end
end
end
end
spec/unit/user_interface_spec.rb
View file @
0684132b
...
@@ -27,11 +27,9 @@ module Pod
...
@@ -27,11 +27,9 @@ module Pod
end
end
describe
'#labeled'
do
describe
'#labeled'
do
it
'prints nothing if value is nil'
do
it
'prints nothing if value is nil'
do
UI
.
labeled
(
'label'
,
nil
)
UI
.
labeled
(
'label'
,
nil
)
UI
.
output
.
should
==
''
UI
.
output
.
should
==
''
end
end
it
'prints label and value on one line if value is not an array'
do
it
'prints label and value on one line if value is not an array'
do
...
@@ -72,7 +70,6 @@ module Pod
...
@@ -72,7 +70,6 @@ module Pod
UI
.
labeled
(
'label'
,
values
,
12
)
UI
.
labeled
(
'label'
,
values
,
12
)
UI
.
output
.
should
==
"
#{
' '
*
10
}
- label:
\n
"
+
values
.
map
{
|
v
|
"
#{
' '
*
12
}
-
#{
v
}
\n
"
}.
join
UI
.
output
.
should
==
"
#{
' '
*
10
}
- label:
\n
"
+
values
.
map
{
|
v
|
"
#{
' '
*
12
}
-
#{
v
}
\n
"
}.
join
end
end
end
end
end
end
end
end
spec/unit/validator_spec.rb
View file @
0684132b
...
@@ -15,7 +15,6 @@ end
...
@@ -15,7 +15,6 @@ end
module
Pod
module
Pod
describe
Validator
do
describe
Validator
do
before
do
before
do
Validator
.
any_instance
.
stubs
(
:xcodebuild
).
returns
(
''
)
Validator
.
any_instance
.
stubs
(
:xcodebuild
).
returns
(
''
)
end
end
...
@@ -96,7 +95,6 @@ module Pod
...
@@ -96,7 +95,6 @@ module Pod
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'Extensive analysis'
do
describe
'Extensive analysis'
do
describe
'URL validation'
do
describe
'URL validation'
do
before
do
before
do
@validator
=
Validator
.
new
(
podspec_path
,
SourcesManager
.
master
.
map
(
&
:url
))
@validator
=
Validator
.
new
(
podspec_path
,
SourcesManager
.
master
.
map
(
&
:url
))
...
@@ -416,6 +414,5 @@ module Pod
...
@@ -416,6 +414,5 @@ module Pod
end
end
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
end
end
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