Module: CapybaraScreenshotDiff::Minitest::Assertions
- Includes:
- DSL
- Defined in:
- lib/capybara_screenshot_diff/minitest.rb
Instance Attribute Summary
#test_screenshots
Instance Method Summary
collapse
Methods included from DSL
#_screenshot
#build_full_name, #group_parts, #initialize, #schedule_match_job, #screenshot_dir, #screenshot_group, #screenshot_section
Instance Method Details
#before_teardown ⇒ Object
#screenshot(*args, skip_stack_frames: 0, **opts) ⇒ Object
Also known as:
assert_matches_screenshot
22
23
24
25
26
27
28
|
# File 'lib/capybara_screenshot_diff/minitest.rb', line 22
def screenshot(*args, skip_stack_frames: 0, **opts)
self.assertions += 1
super(*args, skip_stack_frames: skip_stack_frames + 3, **opts)
rescue ::CapybaraScreenshotDiff::ExpectationNotMet => e
raise ::Minitest::Assertion, e.message
end
|