Skip to content

Commit

Permalink
Merge pull request #30 from JanBliznicenko/pharo9
Browse files Browse the repository at this point in the history
Thanks Jan.
It's me who responsible for breaking changes in TestEnvironment :).
I am going to avoid this process hook in next iteration as there is now a designed place to extend environment suitable for  mocketry logic
  • Loading branch information
dionisiydk authored Sep 10, 2020
2 parents ea0e14b + f44524e commit ff1c572
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions Mocketry-Domain/MockCleaningProcessHook.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,18 @@ MockCleaningProcessHook class >> instance [
MockCleaningProcessHook >> terminate [
MockCurrentBehaviour value: nil
]

{ #category : #testing }
MockCleaningProcessHook >> isSuspended [
^false
]

{ #category : #testing }
MockCleaningProcessHook >> isTerminated [
^MockCurrentBehaviour value isNil
]

{ #category : #accessing }
MockCleaningProcessHook >> priority [
^Processor activePriority
]
2 changes: 1 addition & 1 deletion Mocketry-Domain/TestExecutionEnvironment.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ TestExecutionEnvironment >> allowsForkedProcessInheritMocks [
{ #category : #'*Mocketry-Domain' }
TestExecutionEnvironment >> createMockBehaviour [
| behaviour |
forkedProcesses add: MockCleaningProcessHook instance.
self forkedProcesses add: MockCleaningProcessHook instance.

behaviour := super createMockBehaviour.
behaviour ownerTestCase: testCase.
Expand Down

0 comments on commit ff1c572

Please sign in to comment.