Class: Easytest::CLI

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

Constant Summary collapse

SUCCESS =
0
FAILURE =
1
FATAL =
2

Instance Method Summary collapse

Instance Method Details

#runObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/easytest/cli.rb', line 10

def run
  exit_code = parse_argv
  return exit_code if exit_code

  if watch?
    watch_files
    return SUCCESS
  end

  Easytest.start
  setup
  successful = Easytest.run
  successful ? SUCCESS : FAILURE
end