lib/joyce/application.rb in joyce-0.2.0 vs lib/joyce/application.rb in joyce-0.2.1
- old
+ new
@@ -5,11 +5,11 @@
def initialize(headless: false)
@headless = headless
end
- def setup
+ def setup(*)
# ...
end
def tick
# ...
@@ -17,13 +17,13 @@
def click
# ...
end
- def launch
+ def launch(*setup_args)
sim.conduct!
- setup
+ setup(*setup_args)
window.show
self
end
def fire(cmd)
@@ -64,12 +64,12 @@
def viewed_with(view_class)
@view_class ||= view_class
self
end
- def kickstart!(headless: false)
+ def kickstart!(headless: false, setup: {})
app = new(headless: headless)
- app.launch
+ app.launch(setup)
app
end
end
end
end