Class: Geordi::Cucumber

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

Instance Method Summary collapse

Instance Method Details

#run(arguments, options = {}) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/geordi/cucumber.rb', line 11

def run(arguments, options = {})
  split_arguments = arguments.map { |arg| arg.split('=') }.flatten

  self.argv = split_arguments.map do |arg|
    # Ensure arguments containing white space are kept together
    arg.match?(/\S\s\S/) ? %('#{arg}') : arg
  end

  self.settings = Geordi::Settings.new

  consolidate_rerun_txt_files
  show_features_to_run

  command = use_parallel_tests?(options) ? parallel_execution_command : serial_execution_command
  Interaction.note_cmd(command) if options[:verbose]

  puts # Make newline
  system command
end