Module: Kookaburra::Assertion
- Included in:
- UIDriver, UIDriver::UIComponent
- Defined in:
- lib/kookaburra/assertion.rb
Overview
Include this module wherever you need to be able to make a quick, low-ceremony assertion.
Instance Method Summary collapse
-
#assert(test, message = "You might want to provide a better message, eh?") ⇒ Object
protected
Provides a mechanism to make assertions about the state of your UIComponent without relying on a specific testing framework.
Instance Method Details
#assert(test, message = "You might want to provide a better message, eh?") ⇒ Object (protected)
Provides a mechanism to make assertions about the state of your UIComponent without relying on a specific testing framework. A good reason to use this would be to provide a more informative error message when a pre-condition is not met, rather than waiting on an operation further down the line to fail.
20 21 22 |
# File 'lib/kookaburra/assertion.rb', line 20 def assert(test, = "You might want to provide a better message, eh?") test or raise AssertionFailed, end |