Class: AppCommand::Test
- Inherits:
-
Convoy::ActionCommand::Base
- Object
- Convoy::ActionCommand::Base
- AppCommand::Test
- Defined in:
- lib/routes/test.rb
Instance Method Summary collapse
- #execute ⇒ Object
- #opts_routing ⇒ Object
- #opts_validate ⇒ Object
- #run_behat ⇒ Object
- #run_cucumber ⇒ Object
- #run_fitnesse ⇒ Object
- #run_php ⇒ Object
- #run_ruby ⇒ Object
Instance Method Details
#execute ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/routes/test.rb', line 5 def execute @opts = @args = arguments opts_validate opts_routing end |
#opts_routing ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/routes/test.rb', line 24 def opts_routing if @opts[:cucumber] run_cucumber elsif @opts[:fitnesse] run_fitnesse elsif @opts[:php] run_php elsif @opts[:behat] run_behat elsif @opts[:ruby] run_ruby end end |
#opts_validate ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/routes/test.rb', line 14 def opts_validate App::UtilsRoutes::max_one_flag(@opts) if App::UtilsRoutes::flags_set(@opts) == 0 @opts[:php] == true end end |
#run_behat ⇒ Object
60 61 62 63 64 65 |
# File 'lib/routes/test.rb', line 60 def run_behat App::Terminal::info("Running #{App::Terminal::format_action('Behat Tests')} on VM \xe2\x80\x94 #{App::Terminal::format_highlight("#{App::Config.param(ConfigUnique::VM_IP)}")}") App::SSH::run_script_on_remote('vm', 'run-behat-tests.sh', $args) end |
#run_cucumber ⇒ Object
40 41 42 43 44 45 |
# File 'lib/routes/test.rb', line 40 def run_cucumber App::Terminal::info("Running #{App::Terminal::format_action('Cucumber Tests')} on VM \xe2\x80\x94 #{App::Terminal::format_highlight("#{App::Config.param(ConfigUnique::VM_IP)}")}") App::Terminal::info('Not yet implemented') end |
#run_fitnesse ⇒ Object
47 48 49 50 51 |
# File 'lib/routes/test.rb', line 47 def run_fitnesse App::Terminal::info('Not yet implemented') end |
#run_php ⇒ Object
53 54 55 56 57 58 |
# File 'lib/routes/test.rb', line 53 def run_php App::Terminal::info("Running #{App::Terminal::format_action('PHPUnit Tests')} on VM \xe2\x80\x94 #{App::Terminal::format_highlight("#{App::Config.param(ConfigUnique::VM_IP)}")}") App::SSH::run_script_on_remote('vm', 'run-phpunit-tests.sh', @args) end |