Class: MockGosuWindow
Constant Summary
Constants included from GosuWindowAPI
GosuWindowAPI::MAX_UPDATE_SIZE_IN_MILLIS
Instance Attribute Summary
Attributes included from GosuWindowAPI
Instance Method Summary collapse
- #caption=(new_caption) ⇒ Object
-
#initialize ⇒ MockGosuWindow
constructor
A new instance of MockGosuWindow.
- #rotate(*args) ⇒ Object
- #update(millis) ⇒ Object
Methods included from GosuWindowAPI
#button_down, #button_up, #draw
Constructor Details
#initialize ⇒ MockGosuWindow
Returns a new instance of MockGosuWindow.
219 220 221 |
# File 'lib/gamebox/spec/helper.rb', line 219 def initialize @total_millis = 0 end |
Instance Method Details
#caption=(new_caption) ⇒ Object
235 236 |
# File 'lib/gamebox/spec/helper.rb', line 235 def () end |
#rotate(*args) ⇒ Object
238 239 240 |
# File 'lib/gamebox/spec/helper.rb', line 238 def rotate(*args) yield end |
#update(millis) ⇒ Object
223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/gamebox/spec/helper.rb', line 223 def update(millis) if @total_millis == 0 Gosu.stubs(:milliseconds).returns 0 super() end @total_millis += millis Gosu.stubs(:milliseconds).returns @total_millis @first_update = false super() end |