Class: Pod::Command::Test
- Inherits:
-
Pod::Command
- Object
- Pod::Command
- Pod::Command::Test
- Defined in:
- lib/cocoapods-unit-test/command/test.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Test
constructor
A new instance of Test.
- #run ⇒ Object
- #validate! ⇒ Object
Constructor Details
#initialize(argv) ⇒ Test
Returns a new instance of Test.
24 25 26 27 28 29 30 |
# File 'lib/cocoapods-unit-test/command/test.rb', line 24 def initialize(argv) @simulator = argv.option('simulator', 'iPhone 8') @reinstall = argv.flag?('reinstall') @name = argv.shift_argument @project = TestProject.new(@name, @simulator) super end |
Class Method Details
.options ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/cocoapods-unit-test/command/test.rb', line 16 def self. = [ ['--reinstall', 're pod install'], ["--simulator='SIMULATOR'", "simulator name like 'iPhone 8'"], ] .concat(super.reject { |option, _| option == '--silent' }) end |
Instance Method Details
#run ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/cocoapods-unit-test/command/test.rb', line 38 def run UI.title "Runing Test..." do @project.run(@reinstall) end UI.title "Finish Test..." end |
#validate! ⇒ Object
32 33 34 35 36 |
# File 'lib/cocoapods-unit-test/command/test.rb', line 32 def validate! super help! 'A Pod name is required.' unless @name @project.validate! end |