class Xcodeproj::XCScheme::TestAction
This class wraps the TestAction
node of a .xcscheme XML file
Public Instance Methods
add_coverage_target(target, root_project = nil)
click to toggle source
@param [Xcodeproj::Project::Object::AbstractTarget] test_target @param [Xcodeproj::Project] the root project to reference from
(when nil the project of the target is used)
# File lib/cocoapods-unit-test/xcodeproj/test_action.rb, line 36 def add_coverage_target(target, root_project = nil) add_coverage_target_ref BuildableReference.new(target, root_project) unless target.nil? end
add_coverage_target_ref(ref)
click to toggle source
@param [BuildableReference] targets
# File lib/cocoapods-unit-test/xcodeproj/test_action.rb, line 21 def add_coverage_target_ref(ref) coverage_targets = @xml_element.elements['CodeCoverageTargets'] || @xml_element.add_element('CodeCoverageTargets') added = coverage_targets.get_elements('BuildableReference').map { |node| BuildableReference.new(node) }.select { |build| build.target_name == ref.target_name } if added.empty? coverage_targets.add_element(ref.xml_element) end end
coverage_specified_targets=(flag)
click to toggle source
@param [Bool] flag
# File lib/cocoapods-unit-test/xcodeproj/test_action.rb, line 15 def coverage_specified_targets=(flag) @xml_element.attributes['onlyGenerateCoverageForSpecifiedTargets'] = bool_to_string(flag) end
coverage_specified_targets?()
click to toggle source
# File lib/cocoapods-unit-test/xcodeproj/test_action.rb, line 10 def coverage_specified_targets? string_to_bool(@xml_element.attributes['onlyGenerateCoverageForSpecifiedTargets']) end