Class: Parabot::Commands::Test

Inherits:
Base
  • Object
show all
Defined in:
lib/parabot/commands/test.rb

Instance Method Summary collapse

Instance Method Details

#call(files: [], **options) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/parabot/commands/test.rb', line 10

def call(files: [], **options)
  init(**options)

  test_args = files || []
  dry_run_log("Would run tests with args: #{test_args.join(' ')}")

  test_results = execute_tests(test_args)
  message = build_message(test_results)
  send_message(message)

rescue TestExecutionError => e
  logger.error("Test execution failed: #{e.message}")
  raise
rescue StandardError => e
  handle_unexpected_error(e)
  raise
end