Commit 3fa2c3bb authored by Swizzlr's avatar Swizzlr

Update tests with new behaviour and make it pass

parent 11d5ac1a
......@@ -44,13 +44,12 @@ module Pod
# @return [Xcodeproj::Config]
#
def generate
header_search_paths = target.sandbox.public_headers.search_paths
warning_suppressed_paths = target.pod_targets.each
header_search_path_flags = target.sandbox.public_headers.search_paths.map {|path| '-isystem'+path}
@xcconfig = Xcodeproj::Config.new({
'OTHER_LDFLAGS' => XCConfigHelper.default_ld_flags(target),
'HEADER_SEARCH_PATHS' => XCConfigHelper.quote(target.sandbox.public_headers.search_paths),
'PODS_ROOT' => target.relative_pods_root,
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1',
'OTHER_CFLAGS' => XCConfigHelper.quote(header_search_path_flags)
})
target.pod_targets.each do |pod_target|
......
......@@ -55,15 +55,13 @@ module Pod
@xcconfig.to_hash['PODS_ROOT'].should == '${SRCROOT}/Pods'
end
it 'adds the sandbox public headers search paths to the xcconfig, with quotes' do
expected = "\"#{config.sandbox.public_headers.search_paths.join('" "')}\""
@xcconfig.to_hash['HEADER_SEARCH_PATHS'].should == expected
end
# it 'adds the sandbox public headers search paths to the xcconfig, with quotes' do
# expected = "\"#{config.sandbox.public_headers.search_paths.join('" "')}\""
# @xcconfig.to_hash['HEADER_SEARCH_PATHS'].should == expected
# end
it 'sets search path as system header given pod warning inhibition' do
it 'adds the sandbox public headers search paths to the xcconfig, with quotes, as system headers' do
expected = "\"-isystem#{config.sandbox.public_headers.search_paths.join('" -isystem"')}\""
@target.target_definition.stubs(:inhibits_warnings_for_pod?).returns(true)
@xcconfig = @generator.generate
@xcconfig.to_hash['OTHER_CFLAGS'].should == expected
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment