Class: Awetestlib::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/awetestlib/runner.rb

Overview

TODO replace this with regression/runner. Only one script type. Parent class. Each script type will have a Runner that inherits from this class.

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Runner

Returns a new instance of Runner.



6
7
8
9
# File 'lib/awetestlib/runner.rb', line 6

def initialize(options = {})
  build_class = "Awetestlib::#{check_script_type(options[:script_type])}::Runner".constantize
  build_class.new(options).start
end

Instance Method Details

#check_script_type(script_type) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/awetestlib/runner.rb', line 11

def check_script_type(script_type)
  case script_type
    when 'Regression', 'Awetest', 'AwetestDSL', 'Awetestlib'
      'Regression'
    else
      script_type
  end
end