Class: Shoes::SpecProxy

Inherits:
Object
  • Object
show all
Defined in:
lacci/lib/shoes-spec.rb

Overview

ShoesSpec instances support finder methods like button() that return a proxy to the corresponding drawable. Those proxies should support standard Shoes::Drawable methods, including the ones appropriate to the same drawable object. They should also support certain other testing-specific methods like "trigger_click" that are used to simulate display-side events during testing.

Keep in mind that a proxy will often be in a different process from the Shoes app. So the proxy can't portably return the object or display object, though it could possibly return another proxy for such a thing.

Instance Method Summary collapse

Instance Method Details

#trigger_change(value) ⇒ Object

Trigger a change in value for a drawable like a list_box with multiple values.



89
90
91
# File 'lacci/lib/shoes-spec.rb', line 89

def trigger_change(value)
  raise "Child class should override this!"
end

#trigger_clickObject

Trigger a click on a button or button-like drawable. Not every drawable will support this operation.



69
70
71
# File 'lacci/lib/shoes-spec.rb', line 69

def trigger_click()
  raise "Child class should override this!"
end

#trigger_hoverObject

Trigger a hover over a hoverable drawable. Not every drawable will support this operation. A drawable that supports hover should support leave and vice-versa.



76
77
78
# File 'lacci/lib/shoes-spec.rb', line 76

def trigger_hover()
  raise "Child class should override this!"
end

#trigger_leaveObject

Trigger ending hover over a hoverable drawable. Not every drawable will support this operation. A drawable that supports hover should support leave and vice-versa.



83
84
85
# File 'lacci/lib/shoes-spec.rb', line 83

def trigger_leave()
  raise "Child class should override this!"
end