Class: TestLauncher::Rubymine::Launcher
- Inherits:
-
Object
- Object
- TestLauncher::Rubymine::Launcher
- Defined in:
- lib/test_launcher/rubymine/launcher.rb
Instance Method Summary collapse
-
#initialize(args:, shell:, request:) ⇒ Launcher
constructor
A new instance of Launcher.
- #launch ⇒ Object
Constructor Details
#initialize(args:, shell:, request:) ⇒ Launcher
Returns a new instance of Launcher.
7 8 9 10 11 |
# File 'lib/test_launcher/rubymine/launcher.rb', line 7 def initialize(args:, shell:, request:) @args = args @shell = shell @request = request end |
Instance Method Details
#launch ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/test_launcher/rubymine/launcher.rb', line 13 def launch if args.any? {|a| a.match("ruby-debug-ide")} shell.puts "test_launcher: hijacking and debugging" debug_command = "cd #{test_case.app_root} && bundle exec ruby -I test #{args.join(" ")}" shell.puts debug_command shell.exec debug_command else shell.puts "test_launcher: hijacking and running:" shell.puts command shell.exec command end end |