Class: Yolo::Tasks::Ios::Calabash
- Defined in:
- lib/yolo/tasks/ios/calabash.rb
Overview
Executes all calabash related tasks
Instance Attribute Summary collapse
-
#device ⇒ Object
The device to run the tests on.
-
#format ⇒ Object
The test report output format.
-
#output_dir ⇒ Object
The directory to output the test reports.
Instance Method Summary collapse
-
#define ⇒ Object
Defines rake tasks available to the Calabash class.
-
#initialize ⇒ Calabash
constructor
Initializes the class with default settings.
-
#scheme ⇒ String
Returns the calabash class’s scheme attribute, if no attribute is set then check for the scheme env var.
Methods inherited from BaseTask
Constructor Details
#initialize ⇒ Calabash
Initializes the class with default settings
21 22 23 24 25 26 27 |
# File 'lib/yolo/tasks/ios/calabash.rb', line 21 def initialize self.sdk = "iphonesimulator" unless sdk self.format = :junit self.device = "iphone" self.output_dir = "test-reports/calabash" super end |
Instance Attribute Details
#device ⇒ Object
The device to run the tests on
16 17 18 |
# File 'lib/yolo/tasks/ios/calabash.rb', line 16 def device @device end |
#format ⇒ Object
The test report output format
12 13 14 |
# File 'lib/yolo/tasks/ios/calabash.rb', line 12 def format @format end |
#output_dir ⇒ Object
The directory to output the test reports
14 15 16 |
# File 'lib/yolo/tasks/ios/calabash.rb', line 14 def output_dir @output_dir end |
Instance Method Details
#define ⇒ Object
Defines rake tasks available to the Calabash class
47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/yolo/tasks/ios/calabash.rb', line 47 def define super namespace :yolo do namespace :calabash do desc "Runs the specified scheme(s) calabash tests." task :test do xcodebuild :clean xcodebuild :build Yolo::Tools::Ios::Calabash.run(format, output_dir, device) end end end end |
#scheme ⇒ String
Returns the calabash class’s scheme attribute, if no attribute is set then check for the scheme env var
34 35 36 37 38 39 40 41 42 |
# File 'lib/yolo/tasks/ios/calabash.rb', line 34 def scheme scheme = @scheme if !scheme scheme = ENV['YOLO_CALABASH_SCHEME'] end return scheme end |