Module: Cyperful::SystemTestHelper
- Defined in:
- lib/cyperful/framework_injections.rb
Overview
The Minitest test helper. TODO: support other test frameworks like RSpec
Instance Method Summary collapse
- #setup ⇒ Object
-
#take_failed_screenshot ⇒ Object
Disable default screenshot on failure b/c we handle them ourselves.
- #teardown ⇒ Object
Instance Method Details
#setup ⇒ Object
6 7 8 9 |
# File 'lib/cyperful/framework_injections.rb', line 6 def setup Cyperful.setup(self.class, self.method_name) super end |
#take_failed_screenshot ⇒ Object
Disable default screenshot on failure b/c we handle them ourselves. github.com/rails/rails/blob/main/actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#L156
22 23 24 |
# File 'lib/cyperful/framework_injections.rb', line 22 def take_failed_screenshot nil end |
#teardown ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/cyperful/framework_injections.rb', line 11 def teardown error = passed? ? nil : failure error = error.error if error.is_a?(Minitest::UnexpectedError) Cyperful.teardown(error) super end |