使用cocoapods版本1.6.0.rc.1和cocoapods-generate,我有两个如下的test_specs:
s.test_spec 'UnitTests' do |test_spec|
test_spec.requires_app_host = false
test_spec.source_files = 'MyThing/Tests/Common/**/*.{h,m}'
test_spec.source_files = 'MyThing/Tests/Unit/**/*.{h,m}'
end
s.test_spec 'EndToEndUnitTest' do |test_spec|
test_spec.requires_app_host = true
test_spec.source_files = 'MyThing/Tests/Common/**/*.{h,m}'
test_spec.source_files = 'MyThing/Tests/EndToEnd/**/*.{h,m}'
end
两个test_specs都包含该行
test_spec.source_files = 'MyThing/Tests/Common/**/*.{h,m}'
但是cocoapods-generate无法确定共同来源属于哪个目标,因此在项目中将其省略。
如何定义test_specs共有的一组来源?
答案 0 :(得分:0)
Podspec是Ruby,我用第二行覆盖了先前的source_files变量值。我很笨。