Module: Utilities
- Defined in:
- lib/utilities/utilities.rb
Class Method Summary collapse
- .browser=(browser) ⇒ Object
- .browser_options=(*opts) ⇒ Object
- .delete_browser_options ⇒ Object
- .download_builds(build_type) ⇒ Object
- .feature_path=(path) ⇒ Object
- .helper_path=(path) ⇒ Object
- .page_path=(path) ⇒ Object
- .parallel_run(opts = nil, _settings = nil) ⇒ Object
- .platform=(platform) ⇒ Object
- .run(opts = nil) ⇒ Object
- .spec_path=(path) ⇒ Object
- .url=(url) ⇒ Object
Class Method Details
.browser=(browser) ⇒ Object
10 11 12 13 |
# File 'lib/utilities/utilities.rb', line 10 def browser=(browser) config['browser'] = browser overwrite_yaml end |
.browser_options=(*opts) ⇒ Object
45 46 47 48 |
# File 'lib/utilities/utilities.rb', line 45 def (*opts) config['browser_options'] = opts.flatten overwrite_yaml end |
.delete_browser_options ⇒ Object
50 51 52 53 |
# File 'lib/utilities/utilities.rb', line 50 def config.delete('browser_options') overwrite_yaml end |
.download_builds(build_type) ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/utilities/utilities.rb', line 65 def download_builds(build_type) case build_type when 'android' download_android_build when 'ios' download_ios_build else download_android_build download_ios_build end end |
.feature_path=(path) ⇒ Object
25 26 27 28 |
# File 'lib/utilities/utilities.rb', line 25 def feature_path=(path) config['feature_path'] = path overwrite_yaml end |
.helper_path=(path) ⇒ Object
30 31 32 33 |
# File 'lib/utilities/utilities.rb', line 30 def helper_path=(path) config['helper_path'] = path overwrite_yaml end |
.page_path=(path) ⇒ Object
15 16 17 18 |
# File 'lib/utilities/utilities.rb', line 15 def page_path=(path) config['page_path'] = path overwrite_yaml end |
.parallel_run(opts = nil, _settings = nil) ⇒ Object
60 61 62 63 |
# File 'lib/utilities/utilities.rb', line 60 def parallel_run(opts = nil, _settings = nil) command = File.directory?('spec') ? 'parallel_rspec spec/' : 'parallel_cucumber features' system "#{command} #{opts}" end |
.platform=(platform) ⇒ Object
40 41 42 43 |
# File 'lib/utilities/utilities.rb', line 40 def platform=(platform) config['platform'] = platform overwrite_yaml end |
.run(opts = nil) ⇒ Object
55 56 57 58 |
# File 'lib/utilities/utilities.rb', line 55 def run(opts = nil) command = File.directory?('spec') ? 'rspec spec/' : 'cucumber features' system "#{command} #{opts}" end |
.spec_path=(path) ⇒ Object
20 21 22 23 |
# File 'lib/utilities/utilities.rb', line 20 def spec_path=(path) config['spec_path'] = path overwrite_yaml end |
.url=(url) ⇒ Object
35 36 37 38 |
# File 'lib/utilities/utilities.rb', line 35 def url=(url) config['url'] = url overwrite_yaml end |