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
7cd74f94
Commit
7cd74f94
authored
Sep 09, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AgregateTargetInstaller] Fix specs
parent
f0ccdcfc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
54 deletions
+8
-54
aggregate_target_installer_spec.rb
...rator/target_installer/aggregate_target_installer_spec.rb
+8
-54
No files found.
spec/unit/installer/pods_project_generator/target_installer/aggregate_target_installer_spec.rb
View file @
7cd74f94
...
...
@@ -17,26 +17,26 @@ module Pod
#-----------------------------------------------------------------------#
it
'adds the target for the static target to the project'
do
@sut
.
generate
!
@sut
.
install
!
config
.
sandbox
.
project
.
targets
.
count
.
should
==
1
config
.
sandbox
.
project
.
targets
.
first
.
name
.
should
==
'Pods'
end
it
"adds the user build configurations to the target"
do
@sut
.
generate
!
@sut
.
install
!
target
=
config
.
sandbox
.
project
.
targets
.
first
target
.
build_settings
(
'Test'
)[
"VALIDATE_PRODUCT"
].
should
==
nil
target
.
build_settings
(
'AppStore'
)[
"VALIDATE_PRODUCT"
].
should
==
"YES"
end
it
"sets VALIDATE_PRODUCT to YES for the Release configuration for iOS targets"
do
@sut
.
generate
!
@sut
.
install
!
target
=
config
.
sandbox
.
project
.
targets
.
first
target
.
build_settings
(
'Release'
)[
"VALIDATE_PRODUCT"
].
should
==
"YES"
end
it
"sets the platform and the deployment target for iOS targets"
do
@sut
.
generate
!
@sut
.
install
!
target
=
config
.
sandbox
.
project
.
targets
.
first
target
.
platform_name
.
should
==
:ios
target
.
deployment_target
.
should
==
"6.0"
...
...
@@ -46,7 +46,7 @@ module Pod
it
"sets the platform and the deployment target for OS X targets"
do
@target
.
stubs
(
:platform
).
returns
(
Platform
.
new
(
:osx
,
'10.8'
))
@sut
.
generate
!
@sut
.
install
!
target
=
config
.
sandbox
.
project
.
targets
.
first
target
.
platform_name
.
should
==
:osx
target
.
deployment_target
.
should
==
"10.8"
...
...
@@ -55,18 +55,18 @@ module Pod
end
it
"adds the user's build configurations to the target"
do
@sut
.
generate
!
@sut
.
install
!
config
.
sandbox
.
project
.
targets
.
first
.
build_configurations
.
map
(
&
:name
).
sort
.
should
==
%w{ AppStore Debug Release Test }
end
it
"it creates different hash instances for the build settings of various build configurations"
do
@sut
.
generate
!
@sut
.
install
!
build_settings
=
config
.
sandbox
.
project
.
targets
.
first
.
build_configurations
.
map
(
&
:build_settings
)
build_settings
.
map
(
&
:object_id
).
uniq
.
count
.
should
==
4
end
it
"does not enable the GCC_WARN_INHIBIT_ALL_WARNINGS flag by default"
do
@sut
.
generate
!
@sut
.
install
!
@sut
.
target
.
target
.
build_configurations
.
each
do
|
config
|
config
.
build_settings
[
'GCC_WARN_INHIBIT_ALL_WARNINGS'
].
should
.
be
.
nil
end
...
...
@@ -74,52 +74,6 @@ module Pod
#-----------------------------------------------------------------------#
it
"adds file references for the support files of the target"
do
@sut
.
generate!
@project
.
support_files_group
group
=
@project
[
'Pods/BananaLib/Support Files'
]
group
.
children
.
map
(
&
:display_name
).
sort
.
should
==
[
"Pods-BananaLib-Private.xcconfig"
,
"Pods-BananaLib-dummy.m"
,
"Pods-BananaLib-prefix.pch"
,
"Pods-BananaLib.xcconfig"
,
]
end
it
"creates the xcconfig file"
do
@sut
.
generate!
file
=
config
.
sandbox
.
root
+
@pod_target
.
xcconfig_private_path
xcconfig
=
Xcodeproj
::
Config
.
new
(
file
)
xcconfig
.
to_hash
[
'PODS_ROOT'
].
should
==
'${SRCROOT}'
end
it
"creates a prefix header, including the contents of the specification's prefix header"
do
@spec
.
prefix_header_contents
=
'#import "BlocksKit.h"'
@sut
.
generate!
prefix_header
=
config
.
sandbox
.
root
+
'Pods-BananaLib-prefix.pch'
generated
=
prefix_header
.
read
expected
=
<<-
EOS
.
strip_heredoc
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#endif
#import "Pods-environment.h"
#import "BlocksKit.h"
#import <BananaTree/BananaTree.h>
EOS
generated
.
should
==
expected
end
it
"creates a dummy source to ensure the compilation of libraries with only categories"
do
@sut
.
generate!
build_files
=
@sut
.
target
.
target
.
source_build_phase
.
files
build_file
=
build_files
.
find
{
|
bf
|
bf
.
file_ref
.
display_name
==
'Pods-BananaLib-dummy.m'
}
build_file
.
should
.
be
.
not
.
nil
build_file
.
file_ref
.
path
.
should
==
'Pods-BananaLib-dummy.m'
dummy
=
config
.
sandbox
.
root
+
'Pods-BananaLib-dummy.m'
dummy
.
read
.
should
.
include?
(
'@interface PodsDummy_Pods'
)
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