Class: Kontrast::Spec
- Inherits:
-
Object
- Object
- Kontrast::Spec
- Defined in:
- lib/kontrast/spec.rb
Instance Attribute Summary collapse
-
#_after_screenshot ⇒ Object
Returns the value of attribute _after_screenshot.
-
#_before_screenshot ⇒ Object
Returns the value of attribute _before_screenshot.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #after_screenshot(test_driver, production_driver, current_test) ⇒ Object
- #before_screenshot(test_driver, production_driver, current_test) ⇒ Object
-
#initialize(name) ⇒ Spec
constructor
A new instance of Spec.
Constructor Details
#initialize(name) ⇒ Spec
Returns a new instance of Spec.
5 6 7 |
# File 'lib/kontrast/spec.rb', line 5 def initialize(name) @name = name end |
Instance Attribute Details
#_after_screenshot ⇒ Object
Returns the value of attribute _after_screenshot.
3 4 5 |
# File 'lib/kontrast/spec.rb', line 3 def _after_screenshot @_after_screenshot end |
#_before_screenshot ⇒ Object
Returns the value of attribute _before_screenshot.
3 4 5 |
# File 'lib/kontrast/spec.rb', line 3 def _before_screenshot @_before_screenshot end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/kontrast/spec.rb', line 3 def name @name end |
Instance Method Details
#after_screenshot(test_driver, production_driver, current_test) ⇒ Object
15 16 17 18 19 |
# File 'lib/kontrast/spec.rb', line 15 def after_screenshot(test_driver, production_driver, current_test) if @_after_screenshot @_after_screenshot.call(test_driver, production_driver, current_test) end end |
#before_screenshot(test_driver, production_driver, current_test) ⇒ Object
9 10 11 12 13 |
# File 'lib/kontrast/spec.rb', line 9 def before_screenshot(test_driver, production_driver, current_test) if @_before_screenshot @_before_screenshot.call(test_driver, production_driver, current_test) end end |