module Capybara::Screenshot

Public Class Methods

active?() click to toggle source
# File lib/capybara_screenshot_diff.rb, line 36
def active?
  enabled || (enabled.nil? && Diff.enabled)
end
root=(path) click to toggle source
# File lib/capybara_screenshot_diff.rb, line 32
def root=(path)
  @@root = Pathname(path).expand_path
end
screenshot_area() click to toggle source
# File lib/capybara_screenshot_diff.rb, line 40
def screenshot_area
  parts = [Screenshot.save_path]
  parts << Os.name if Screenshot.add_os_path
  parts << Capybara.current_driver.to_s if Screenshot.add_driver_path
  File.join(*parts)
end
screenshot_area_abs() click to toggle source
# File lib/capybara_screenshot_diff.rb, line 47
def screenshot_area_abs
  root / screenshot_area
end