Method: Xcodeproj::XCScheme::TestAction#code_coverage_targets=

Defined in:
lib/xcodeproj/scheme/test_action.rb

#code_coverage_targets=(buildable_references) ⇒ Object

Parameters:

  • buildable_references (Array<BuildableReference>)

    Sets the list of BuildableReference (code coverage targets) associated with this Test Action



168
169
170
171
172
173
174
175
176
177
178
# File 'lib/xcodeproj/scheme/test_action.rb', line 168

def code_coverage_targets=(buildable_references)
  @xml_element.attributes['onlyGenerateCoverageForSpecifiedTargets'] = bool_to_string(true)

  @xml_element.delete_element('CodeCoverageTargets')
  coverage_targets_element = @xml_element.add_element('CodeCoverageTargets')
  buildable_references.each do |reference|
    coverage_targets_element.add_element(reference.xml_element)
  end

  code_coverage_targets
end