Sha256: 9c15bd4071bd00fd984d32cddeb50867ad36e20772e3a357032de814870f3582
Contents?: true
Size: 1.08 KB
Versions: 3
Compression:
Stored size: 1.08 KB
Contents
require 'capybara/screenshot/diff/version' require 'capybara/screenshot/diff/image_compare' require 'capybara/screenshot/diff/test_methods' module Capybara module Screenshot extend Os mattr_accessor :add_driver_path mattr_accessor :add_os_path mattr_accessor :blur_active_element mattr_accessor :enabled mattr_accessor(:screenshot_root) { (defined?(Rails.root) && Rails.root) || File.expand_path('.') } mattr_accessor :stability_time_limit mattr_accessor :window_size class << self def active? enabled || (enabled.nil? && Diff.enabled) end def screenshot_area parts = ['doc/screenshots'] parts << Capybara.default_driver.to_s if Capybara::Screenshot.add_driver_path parts << os_name if Capybara::Screenshot.add_os_path File.join parts end def screenshot_area_abs "#{screenshot_root}/#{screenshot_area}".freeze end end # Module to track screen shot changes module Diff mattr_accessor :color_distance_limit mattr_accessor(:enabled) { true } end end end
Version data entries
3 entries across 3 versions & 1 rubygems