Class: Kookaburra::Configuration
- Inherits:
-
Object
- Object
- Kookaburra::Configuration
- Defined in:
- lib/kookaburra/configuration.rb
Overview
Provides access to the configuration data used throughout Kookaburra
Instance Attribute Summary collapse
-
#api_driver_class ⇒ Object
The class to use as your APIDriver.
-
#app_host ⇒ Object
This is the root URL of your running application, including the port number if necessary.
-
#browser ⇒ Object
This object is used by UIDriver::UIComponent to interface with the web browser.
-
#logger ⇒ Object
This is the logger to which Kookaburra will send various messages about its operation.
-
#mental_model ⇒ Object
This is the MentalModel that is shared between your APIDriver and your UIDriver.
-
#ui_driver_class ⇒ Object
The class to use as your UIDriver.
Instance Method Summary collapse
-
#app_host_uri ⇒ URI
The parsed version of the #app_host.
-
#server_error_detection { ... } ⇒ Object
Specify a function that can be used to determine if a server error has occured within your application.
Instance Attribute Details
#api_driver_class ⇒ Object
The class to use as your APIDriver
15 |
# File 'lib/kookaburra/configuration.rb', line 15 dependency_accessor :api_driver_class |
#app_host ⇒ Object
This is the root URL of your running application, including the port number if necessary. (e.g. "http://my.example.com:12345")
39 |
# File 'lib/kookaburra/configuration.rb', line 39 dependency_accessor :app_host |
#browser ⇒ Object
This object is used by UIDriver::UIComponent to interface with the web browser. Typically it should be an instance of Capybara::Session
31 |
# File 'lib/kookaburra/configuration.rb', line 31 dependency_accessor :browser |
#logger ⇒ Object
This is the logger to which Kookaburra will send various messages about its operation. This would generally be used to allow UIDriver subclasses to provide detailed failure information.
55 |
# File 'lib/kookaburra/configuration.rb', line 55 dependency_accessor :logger |
#mental_model ⇒ Object
This is the MentalModel that is shared between your APIDriver and your UIDriver. This attribute is managed by Kookaburra, so you shouldn't need to change it yourself.
48 |
# File 'lib/kookaburra/configuration.rb', line 48 dependency_accessor :mental_model |
#ui_driver_class ⇒ Object
The class to use as your UIDriver
22 |
# File 'lib/kookaburra/configuration.rb', line 22 dependency_accessor :ui_driver_class |
Instance Method Details
#app_host_uri ⇒ URI
The parsed version of the #app_host
This is useful if, for example, you are testing a multi-host application and need to change the hostname that will be accessed but want to keep the originally-specified port
84 85 86 |
# File 'lib/kookaburra/configuration.rb', line 84 def app_host_uri URI.parse(app_host) end |
#server_error_detection { ... } ⇒ Object
Specify a function that can be used to determine if a server error has occured within your application.
If the function returns true, then Kookaburra will assume that the
application has responded with an error.
69 70 71 72 73 74 75 |
# File 'lib/kookaburra/configuration.rb', line 69 def server_error_detection(&blk) if block_given? @server_error_detection = blk else @server_error_detection end end |