Class: XCTasks::TestTask::Subtask
- Inherits:
-
Object
- Object
- XCTasks::TestTask::Subtask
- Extended by:
- Configuration::Delegations
- Includes:
- Rake::DSL
- Defined in:
- lib/xctasks/test_task.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #define_rake_tasks ⇒ Object
-
#initialize(name_options, config) ⇒ Subtask
constructor
A new instance of Subtask.
Methods included from Configuration::Delegations
Constructor Details
#initialize(name_options, config) ⇒ Subtask
Returns a new instance of Subtask.
183 184 185 186 187 |
# File 'lib/xctasks/test_task.rb', line 183 def initialize(, config) @config = config.dup self.name = .kind_of?(Hash) ? .keys.first : .to_s self.scheme = .values.first if .kind_of?(Hash) end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
181 182 183 |
# File 'lib/xctasks/test_task.rb', line 181 def config @config end |
#name ⇒ Object
Returns the value of attribute name.
181 182 183 |
# File 'lib/xctasks/test_task.rb', line 181 def name @name end |
Instance Method Details
#define_rake_tasks ⇒ Object
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
# File 'lib/xctasks/test_task.rb', line 193 def define_rake_tasks @config.validate! if namespaced? namespace(name) do ios_versions.each do |ios_version| desc "Run #{name} tests against iOS Simulator #{ios_version} SDK" task ios_version => :prepare do run_tests(ios_version: ios_version) end end end desc "Run #{name} tests against iOS Simulator #{ios_versions.join(', ')}" task name => ios_versions.map { |ios_version| "#{name}:#{ios_version}" } else desc "Run #{name} tests" task self.name => :prepare do run_tests end end end |