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
c03be4b6
Commit
c03be4b6
authored
Mar 19, 2014
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1900 from pietbrauer/fix_whitespace_in_target_installer_specs
Convert indention into spaces instead of tabs
parents
df204f8b
9b78482a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
85 additions
and
85 deletions
+85
-85
pod_target_installer_spec.rb
...t/installer/target_installer/pod_target_installer_spec.rb
+85
-85
No files found.
spec/unit/installer/target_installer/pod_target_installer_spec.rb
View file @
c03be4b6
...
@@ -50,7 +50,7 @@ module Pod
...
@@ -50,7 +50,7 @@ module Pod
@project
.
targets
.
first
.
name
.
should
==
'Pods-BananaLib'
@project
.
targets
.
first
.
name
.
should
==
'Pods-BananaLib'
end
end
it
"sets VALIDATE_PRODUCT to YES for the Release configuration for iOS targets"
do
it
"sets VALIDATE_PRODUCT to YES for the Release configuration for iOS targets"
do
@installer
.
install!
@installer
.
install!
target
=
@project
.
targets
.
first
target
=
@project
.
targets
.
first
target
.
build_settings
(
'Release'
)[
"VALIDATE_PRODUCT"
].
should
==
"YES"
target
.
build_settings
(
'Release'
)[
"VALIDATE_PRODUCT"
].
should
==
"YES"
...
@@ -147,91 +147,91 @@ module Pod
...
@@ -147,91 +147,91 @@ module Pod
dummy
=
config
.
sandbox
.
root
+
'Pods-BananaLib-dummy.m'
dummy
=
config
.
sandbox
.
root
+
'Pods-BananaLib-dummy.m'
dummy
.
read
.
should
.
include?
(
'@interface PodsDummy_Pods'
)
dummy
.
read
.
should
.
include?
(
'@interface PodsDummy_Pods'
)
end
end
#--------------------------------------------------------------------------------#
#--------------------------------------------------------------------------------#
describe
"concerning compiler flags"
do
describe
"concerning compiler flags"
do
before
do
before
do
@spec
=
Pod
::
Spec
.
new
@spec
=
Pod
::
Spec
.
new
end
end
it
"flags should not be added to dtrace files"
do
it
"flags should not be added to dtrace files"
do
@installer
.
library
.
target_definition
.
stubs
(
:inhibits_warnings_for_pod?
).
returns
(
true
)
@installer
.
library
.
target_definition
.
stubs
(
:inhibits_warnings_for_pod?
).
returns
(
true
)
@installer
.
install!
@installer
.
install!
dtrace_files
=
@installer
.
library
.
target
.
source_build_phase
.
files
.
reject
{
|
sf
|
dtrace_files
=
@installer
.
library
.
target
.
source_build_phase
.
files
.
reject
{
|
sf
|
!
(
File
.
extname
(
sf
.
file_ref
.
path
)
==
'.d'
)
!
(
File
.
extname
(
sf
.
file_ref
.
path
)
==
'.d'
)
}
}
dtrace_files
.
each
do
|
dt
|
dtrace_files
.
each
do
|
dt
|
dt
.
settings
.
should
.
be
.
nil
dt
.
settings
.
should
.
be
.
nil
end
end
end
end
it
"adds -w per pod if target definition inhibits warnings for that pod"
do
it
"adds -w per pod if target definition inhibits warnings for that pod"
do
@installer
.
library
.
target_definition
.
stubs
(
:inhibits_warnings_for_pod?
).
returns
(
true
)
@installer
.
library
.
target_definition
.
stubs
(
:inhibits_warnings_for_pod?
).
returns
(
true
)
flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:ios
))
flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:ios
))
flags
.
should
.
include?
(
'-w'
)
flags
.
should
.
include?
(
'-w'
)
end
end
it
"doesn't inhibit warnings by default"
do
it
"doesn't inhibit warnings by default"
do
flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:ios
))
flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:ios
))
flags
.
should
.
not
.
include?
(
'-w'
)
flags
.
should
.
not
.
include?
(
'-w'
)
end
end
it
"adds -Xanalyzer -analyzer-disable-checker per pod"
do
it
"adds -Xanalyzer -analyzer-disable-checker per pod"
do
@installer
.
library
.
target_definition
.
stubs
(
:inhibits_warnings_for_pod?
).
returns
(
true
)
@installer
.
library
.
target_definition
.
stubs
(
:inhibits_warnings_for_pod?
).
returns
(
true
)
flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:ios
))
flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:ios
))
flags
.
should
.
include?
(
'-Xanalyzer -analyzer-disable-checker'
)
flags
.
should
.
include?
(
'-Xanalyzer -analyzer-disable-checker'
)
end
end
it
"doesn't inhibit analyzer warnings by default"
do
it
"doesn't inhibit analyzer warnings by default"
do
flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:ios
))
flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:ios
))
flags
.
should
.
not
.
include?
(
'-Xanalyzer -analyzer-disable-checker'
)
flags
.
should
.
not
.
include?
(
'-Xanalyzer -analyzer-disable-checker'
)
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
.
requires_arc
=
false
@spec
.
requires_arc
=
false
@spec
.
ios
.
deployment_target
=
'5'
@spec
.
ios
.
deployment_target
=
'5'
@spec
.
osx
.
deployment_target
=
'10.6'
@spec
.
osx
.
deployment_target
=
'10.6'
ios_flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:ios
))
ios_flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:ios
))
osx_flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:osx
))
osx_flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:osx
))
ios_flags
.
should
.
not
.
include
'-DOS_OBJECT_USE_OBJC'
ios_flags
.
should
.
not
.
include
'-DOS_OBJECT_USE_OBJC'
osx_flags
.
should
.
not
.
include
'-DOS_OBJECT_USE_OBJC'
osx_flags
.
should
.
not
.
include
'-DOS_OBJECT_USE_OBJC'
end
end
it
"does *not* disable the `OS_OBJECT_USE_OBJC` flag if ARC is required and has a deployment target of >= iOS 6.0 or OS X 10.8"
do
it
"does *not* disable the `OS_OBJECT_USE_OBJC` flag if ARC is required and has a deployment target of >= iOS 6.0 or OS X 10.8"
do
@spec
.
requires_arc
=
false
@spec
.
requires_arc
=
false
@spec
.
ios
.
deployment_target
=
'6'
@spec
.
ios
.
deployment_target
=
'6'
@spec
.
osx
.
deployment_target
=
'10.8'
@spec
.
osx
.
deployment_target
=
'10.8'
ios_flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:ios
))
ios_flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:ios
))
osx_flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:osx
))
osx_flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:osx
))
ios_flags
.
should
.
not
.
include
'-DOS_OBJECT_USE_OBJC'
ios_flags
.
should
.
not
.
include
'-DOS_OBJECT_USE_OBJC'
osx_flags
.
should
.
not
.
include
'-DOS_OBJECT_USE_OBJC'
osx_flags
.
should
.
not
.
include
'-DOS_OBJECT_USE_OBJC'
end
end
it
"*does* disable the `OS_OBJECT_USE_OBJC` flag if ARC is required but has a deployment target < iOS 6.0 or OS X 10.8"
do
it
"*does* disable the `OS_OBJECT_USE_OBJC` flag if ARC is required but has a deployment target < iOS 6.0 or OS X 10.8"
do
@spec
.
requires_arc
=
true
@spec
.
requires_arc
=
true
@spec
.
ios
.
deployment_target
=
'5.1'
@spec
.
ios
.
deployment_target
=
'5.1'
@spec
.
osx
.
deployment_target
=
'10.7.2'
@spec
.
osx
.
deployment_target
=
'10.7.2'
ios_flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:ios
))
ios_flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:ios
))
osx_flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:osx
))
osx_flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:osx
))
ios_flags
.
should
.
include
'-DOS_OBJECT_USE_OBJC'
ios_flags
.
should
.
include
'-DOS_OBJECT_USE_OBJC'
osx_flags
.
should
.
include
'-DOS_OBJECT_USE_OBJC'
osx_flags
.
should
.
include
'-DOS_OBJECT_USE_OBJC'
end
end
it
"*does* disable the `OS_OBJECT_USE_OBJC` flag if ARC is required and *no* deployment target is specified"
do
it
"*does* disable the `OS_OBJECT_USE_OBJC` flag if ARC is required and *no* deployment target is specified"
do
@spec
.
requires_arc
=
true
@spec
.
requires_arc
=
true
ios_flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:ios
))
ios_flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:ios
))
osx_flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:osx
))
osx_flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:osx
))
ios_flags
.
should
.
include
'-DOS_OBJECT_USE_OBJC'
ios_flags
.
should
.
include
'-DOS_OBJECT_USE_OBJC'
osx_flags
.
should
.
include
'-DOS_OBJECT_USE_OBJC'
osx_flags
.
should
.
include
'-DOS_OBJECT_USE_OBJC'
end
end
end
end
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