Class: RoboTest::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/robotest.rb

Instance Method Summary collapse

Instance Method Details

#invoke(argv) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/robotest.rb', line 22

def invoke(argv)
  `gem cleanup`
  
  welcome_message
  if argv.empty?
    help_text
    puts "Add a path to an yaml file to start running your suite\n"
    puts "Enter a path to your yaml file:\n"
    argv = STDIN.gets
    if !argv.include? ".yml"
      puts "Need to enter the path for a configured yml file !!!"
      exit_message
      exit!
    end
  end
  at_exit {
    delete_temp_files
  }
  example if argv.include?('example')
  options, rspec_args = parse_options(argv)
  $conf = load_config_file(argv[0], options)
  modified_argv = setup_args(argv, $conf, rspec_args)
  yaml_dump('_robotest.yml', $conf)
  run(modified_argv)
end