Class: TestHarness
- Inherits:
-
Object
show all
- Defined in:
- lib/given.rb,
lib/ui_view.rb,
lib/ui_driver.rb,
lib/ui_helper.rb,
lib/utilities.rb,
lib/form_struct.rb,
lib/test_helper.rb,
lib/mental_model.rb,
lib/test_harness.rb,
lib/ui_component.rb,
lib/configuration.rb,
lib/ui_component_helper.rb
Defined Under Namespace
Modules: TestHelper, UIComponentHelper, Utilities
Classes: Configuration, FormStruct, Given, MentalModel, UIComponent, UIDriver, UIHelper, UIView
Class Method Summary
collapse
Class Method Details
.autoload_path ⇒ Object
41
42
43
|
# File 'lib/test_harness.rb', line 41
def autoload_path
@path ||= configuration.autoload_path || 'test_harness'
end
|
.configuration ⇒ Object
6
7
8
|
# File 'lib/test_harness.rb', line 6
def configuration
@configuration ||= Configuration.new
end
|
16
17
18
|
# File 'lib/test_harness.rb', line 16
def configure(&block)
yield configuration
end
|
.given ⇒ Object
25
26
27
|
# File 'lib/test_harness.rb', line 25
def given
@given ||= TestHarness::Given.new
end
|
.namespace ⇒ Object
45
46
47
|
# File 'lib/test_harness.rb', line 45
def namespace
@namespace ||= configuration.namespace || 'TestHarness'
end
|
.register_instance_option(scope, option_name, instance) ⇒ Object
53
54
55
56
57
58
59
|
# File 'lib/test_harness.rb', line 53
def register_instance_option(scope, option_name, instance)
return if registered_components.any? { |c| c.is_a? instance.class }
registered_components << instance
scope.send(:define_method, option_name.gsub('/', '_')) do
instance
end
end
|
.registered_components ⇒ Object
49
50
51
|
# File 'lib/test_harness.rb', line 49
def registered_components
@components ||= []
end
|
.reset ⇒ Object
20
21
22
23
|
# File 'lib/test_harness.rb', line 20
def reset
@mm = nil
registered_components.each(&:reset)
end
|
.uiv ⇒ Object
29
30
31
|
# File 'lib/test_harness.rb', line 29
def uiv
@uiv ||= TestHarness::UIView.new
end
|