module Motion::Screenspecs
Constants
- DIFF_TIMEOUT_ENV
- PORT
- SCREENSHOT_TIMEOUT_ENV
- TOLERANCE_ENV
Public Class Methods
failures()
click to toggle source
# File lib/motion-screenspecs.rb, line 79 def self.failures @failures ||= [] end
open_failures_at_exit=(open)
click to toggle source
# File lib/motion-screenspecs.rb, line 75 def self.open_failures_at_exit=(open) @open_failures_at_exit = open end
open_failures_at_exit?()
click to toggle source
# File lib/motion-screenspecs.rb, line 71 def self.open_failures_at_exit? !!@open_failures_at_exit end
screenshots_root(screenshot_class)
click to toggle source
# File lib/motion-screenspecs.rb, line 83 def self.screenshots_root(screenshot_class) "spec/screenshots/#{screenshot_class}" end
set_diff_timeout(timeout, config)
click to toggle source
# File lib/motion-screenspecs.rb, line 67 def self.set_diff_timeout(timeout, config) config.env[DIFF_TIMEOUT_ENV] = timeout end
set_screenshot_timeout(timeout, config)
click to toggle source
# File lib/motion-screenspecs.rb, line 63 def self.set_screenshot_timeout(timeout, config) config.env[SCREENSHOT_TIMEOUT_ENV] = timeout end
set_tolerance(tolerance, config)
click to toggle source
# File lib/motion-screenspecs.rb, line 57 def self.set_tolerance(tolerance, config) @tolerance = tolerance config.env[TOLERANCE_ENV] = tolerance tolerance end
start_server!()
click to toggle source
# File lib/motion-screenspecs.rb, line 87 def self.start_server! # Start a web server to bounce file paths to-and-from the # RubyMotion-CRuby barrier @web_server ||= begin server = WEBrick::HTTPServer.new(:Port => Motion::Screenspecs::PORT, :Logger => WEBrick::Log.new("/dev/null"), :AccessLog => []) server.mount '/', Motion::Screenspecs::Servlet at_exit { server.shutdown } Thread.start do server.start end server end end
tolerance()
click to toggle source
# File lib/motion-screenspecs.rb, line 53 def self.tolerance @tolerance end