Method: Guard::Motion::Runner#run

Defined in:
lib/guard/motion/runner.rb

#run(paths = nil, options = {}) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/guard/motion/runner.rb', line 15

def run(paths = nil, options = {})
  if paths.nil?
    paths = all_spec_paths
    message = options[:message] || "Running all specs"
  else
    message = options[:message] || "Running: #{paths.join(' ')}"
  end

  return false if paths.empty?

  UI.info(message, :reset => true)

  output = run_via_pty rake_command(paths)

  if @options[:notification]
    notify(output)
  end
end