dispatcher: Really merge it, verify that install is called
This commit is contained in:
parent
c5f53b7d64
commit
4ff8679b49
|
@ -23,7 +23,7 @@ Object subclass: Dispatcher [
|
|||
|
||||
Dispatcher class >> instance [
|
||||
<category: 'singleton'>
|
||||
^ Smalltalk at: #OsmoDispatcher ifAbsentPut: [Dispatcher new].
|
||||
^ Smalltalk at: #OsmoDispatcher ifAbsent: [self install].
|
||||
]
|
||||
|
||||
Dispatcher class >> new [
|
||||
|
|
4
Tests.st
4
Tests.st
|
@ -30,6 +30,10 @@ TestCase subclass: DispatcherTest [
|
|||
OsmoDispatcher dispatchBlock: [sem signal].
|
||||
self assert: sem signals = 1.
|
||||
]
|
||||
|
||||
testSameDispatcher[
|
||||
self assert: Dispatcher instance == Dispatcher instance
|
||||
]
|
||||
]
|
||||
|
||||
TestCase subclass: TimerSchedulerTest [
|
||||
|
|
|
@ -49,6 +49,6 @@ TimerScheduler extend [
|
|||
|
||||
Dispatcher class extend [
|
||||
initialize [
|
||||
^ self instance
|
||||
self instance
|
||||
]
|
||||
]
|
||||
|
|
Reference in New Issue