Class: JLDrill::Fakes::App
- Inherits:
-
Context::Context
- Object
- Context::Context
- JLDrill::Fakes::App
- Defined in:
- lib/jldrill/spec/Fakes.rb
Overview
This is a fake App that doesn’t start up the GTK initialization. That way the main run loop doesn’t get started.
Instance Attribute Summary collapse
-
#mainContext ⇒ Object
readonly
Returns the value of attribute mainContext.
Attributes inherited from Context::Context
#mainView, #parent, #viewBridge
Instance Method Summary collapse
- #enter ⇒ Object
-
#initialize(bridgeClass, mainContextClass) ⇒ App
constructor
A new instance of App.
Methods inherited from Context::Context
#addView, #createViews, #destroyViews, #exit, #isEntered?, #onExit, #peekAtView, #setupViews
Constructor Details
#initialize(bridgeClass, mainContextClass) ⇒ App
Returns a new instance of App.
17 18 19 20 21 22 |
# File 'lib/jldrill/spec/Fakes.rb', line 17 def initialize(bridgeClass, mainContextClass) bridge = Context::Bridge.new(bridgeClass) super(bridge) @mainContext = mainContextClass.new(bridge) @mainContext.inTests = true end |
Instance Attribute Details
#mainContext ⇒ Object (readonly)
Returns the value of attribute mainContext.
15 16 17 |
# File 'lib/jldrill/spec/Fakes.rb', line 15 def mainContext @mainContext end |
Instance Method Details
#enter ⇒ Object
24 25 26 27 |
# File 'lib/jldrill/spec/Fakes.rb', line 24 def enter super(nil) @mainContext.enter(self) end |