Class: Omnitest::RunAction::Worker

Inherits:
Object
  • Object
show all
Includes:
Celluloid
Defined in:
lib/omnitest/run_action.rb

Instance Method Summary collapse

Instance Method Details

#work(item, action, test_env_number, *args) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/omnitest/run_action.rb', line 9

def work(item, action, test_env_number, *args)
  item.vars['TEST_ENV_NUMBER'] = test_env_number if item.respond_to? :vars
  item.public_send(action, *args)
rescue => e
  # Stop the error from propagating, return the error as a result.
  # This also prevents Celluloid actors from crashing.
  return e
end