Class: JLDrill::Fakes::App

Inherits:
Context::Context show all
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

Attributes inherited from Context::Context

#mainView, #parent, #viewBridge

Instance Method Summary collapse

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

#mainContextObject (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

#enterObject



24
25
26
27
# File 'lib/jldrill/spec/Fakes.rb', line 24

def enter
    super(nil)
    @mainContext.enter(self)
end