Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dsspy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
PROJECT_NAME: ${{ matrix.smalltalk }}-DebuggingSpy
strategy:
matrix:
smalltalk: [ Pharo64-12 ]
smalltalk: [ Pharo64-9.0 ]
name: ${{ matrix.smalltalk }}
steps:
- uses: actions/checkout@v2
Expand Down
9 changes: 4 additions & 5 deletions DebuggingSpy-Tests/DSFakeTextEditor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ I am a fake text editor that inherits from RubTextEditor.
My purpose is to ease testing of instrumented methods from RubTextEditor without triggering a full behavior of the text editor that is in an incomplete state for the tests.
"
Class {
#name : 'DSFakeTextEditor',
#superclass : 'RubSmalltalkEditor',
#category : 'DebuggingSpy-Tests',
#package : 'DebuggingSpy-Tests'
#name : #DSFakeTextEditor,
#superclass : #RubSmalltalkEditor,
#category : #'DebuggingSpy-Tests'
}

{ #category : 'accessing' }
{ #category : #accessing }
DSFakeTextEditor >> contents: anObject [
]
11 changes: 5 additions & 6 deletions DebuggingSpy-Tests/DSNoDebuggerSelectionStrategy.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@
I am a debugger opening strategy that eat all debugger opening requests to avoid opening debuggers during testing.
"
Class {
#name : 'DSNoDebuggerSelectionStrategy',
#superclass : 'OupsDebuggerSelectionStrategy',
#category : 'DebuggingSpy-Tests',
#package : 'DebuggingSpy-Tests'
#name : #DSNoDebuggerSelectionStrategy,
#superclass : #OupsDebuggerSelectionStrategy,
#category : #'DebuggingSpy-Tests'
}

{ #category : 'iterating' }
{ #category : #iterating }
DSNoDebuggerSelectionStrategy >> nextDebugger [
^ self
]

{ #category : 'debuggers' }
{ #category : #debuggers }
DSNoDebuggerSelectionStrategy >> openDebuggerForSession: aDebugSession [
^self
]
13 changes: 6 additions & 7 deletions DebuggingSpy-Tests/DSRecordRegistryTest.class.st
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
Class {
#name : 'DSRecordRegistryTest',
#superclass : 'TestCase',
#name : #DSRecordRegistryTest,
#superclass : #TestCase,
#instVars : [
'record'
],
#category : 'DebuggingSpy-Tests',
#package : 'DebuggingSpy-Tests'
#category : #'DebuggingSpy-Tests'
}

{ #category : 'running' }
{ #category : #running }
DSRecordRegistryTest >> tearDown [

DSRecordRegistry autoSerialize: nil.
super tearDown
]

{ #category : 'tests' }
{ #category : #tests }
DSRecordRegistryTest >> testAutoSerialize [
self deny: DSRecordRegistry autoSerialize
]

{ #category : 'tests' }
{ #category : #tests }
DSRecordRegistryTest >> testAutoSerializeRecord [
|materializedRecord|
DSSpy logger loggingFileReference ensureDelete.
Expand Down
9 changes: 4 additions & 5 deletions DebuggingSpy-Tests/DSRecordTest.class.st
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
Class {
#name : 'DSRecordTest',
#superclass : 'TestCase',
#name : #DSRecordTest,
#superclass : #TestCase,
#instVars : [
'record'
],
#category : 'DebuggingSpy-Tests',
#package : 'DebuggingSpy-Tests'
#category : #'DebuggingSpy-Tests'
}

{ #category : 'tests' }
{ #category : #tests }
DSRecordTest >> testRecordPrinting [

| str |
Expand Down
39 changes: 19 additions & 20 deletions DebuggingSpy-Tests/DSSTONFileLoggerTest.class.st
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
Class {
#name : 'DSSTONFileLoggerTest',
#superclass : 'TestCase',
#name : #DSSTONFileLoggerTest,
#superclass : #TestCase,
#instVars : [
'logger',
'survey',
'task',
'oldLogger'
],
#category : 'DebuggingSpy-Tests',
#package : 'DebuggingSpy-Tests'
#category : #'DebuggingSpy-Tests'
}

{ #category : 'running' }
{ #category : #running }
DSSTONFileLoggerTest >> setUp [
super setUp.
oldLogger := DSSpy logger.
Expand All @@ -21,27 +20,27 @@ DSSTONFileLoggerTest >> setUp [
task := DSTask new
]

{ #category : 'running' }
{ #category : #running }
DSSTONFileLoggerTest >> tearDown [

DSSpy logger: oldLogger.
super tearDown
]

{ #category : 'tests - file handling' }
{ #category : #'tests - file handling' }
DSSTONFileLoggerTest >> testDefaultLoggingDirectoryName [

self
assert: logger defaultLoggingDirectoryName
equals: 'ds-spy'
]

{ #category : 'tests - file handling' }
{ #category : #'tests - file handling' }
DSSTONFileLoggerTest >> testDefaultLoggingFileName [
self assert: logger defaultLoggingFileName equals: SessionManager default currentSession id asString
]

{ #category : 'tests - file handling' }
{ #category : #'tests - file handling' }
DSSTONFileLoggerTest >> testEnsureCreateLoggingFileReference [

| fileReference |
Expand All @@ -52,7 +51,7 @@ DSSTONFileLoggerTest >> testEnsureCreateLoggingFileReference [
self assert: fileReference exists
]

{ #category : 'tests - task management' }
{ #category : #'tests - task management' }
DSSTONFileLoggerTest >> testFilenameForSurvey [
|fnameStream|
fnameStream := (logger filenameForSurvey: survey) readStream.
Expand All @@ -61,7 +60,7 @@ DSSTONFileLoggerTest >> testFilenameForSurvey [
self assert: (fnameStream readStream upToEnd) equals: logger surveyFileExtension
]

{ #category : 'tests - task management' }
{ #category : #'tests - task management' }
DSSTONFileLoggerTest >> testForceLoggingFileNameFor [
logger reset.
logger forceLoggingFileNameFor: task.
Expand All @@ -70,7 +69,7 @@ DSSTONFileLoggerTest >> testForceLoggingFileNameFor [
self assert: logger loggingFileReference exists
]

{ #category : 'tests - task management' }
{ #category : #'tests - task management' }
DSSTONFileLoggerTest >> testForceRunningTask [

DSSpy resetSpy.
Expand All @@ -81,23 +80,23 @@ DSSTONFileLoggerTest >> testForceRunningTask [
task title , '-' , SessionManager default currentSession id asString
]

{ #category : 'tests - file handling' }
{ #category : #'tests - file handling' }
DSSTONFileLoggerTest >> testLoggingDirectory [

self
assert: logger loggingDirectory
equals: logger defaultLoggingDirectoryName asFileReference
]

{ #category : 'tests - file handling' }
{ #category : #'tests - file handling' }
DSSTONFileLoggerTest >> testLoggingFileName [

self
assert: logger loggingFileName
equals: logger defaultLoggingFileName
]

{ #category : 'tests - file handling' }
{ #category : #'tests - file handling' }
DSSTONFileLoggerTest >> testLoggingFileNameAfterTaskEnded [

DSSpy startTask: task.
Expand All @@ -107,7 +106,7 @@ DSSTONFileLoggerTest >> testLoggingFileNameAfterTaskEnded [
equals: logger defaultLoggingFileName
]

{ #category : 'tests - file handling' }
{ #category : #'tests - file handling' }
DSSTONFileLoggerTest >> testLoggingFileNameAfterTaskStarted [

DSSpy startTask: task.
Expand All @@ -117,7 +116,7 @@ DSSTONFileLoggerTest >> testLoggingFileNameAfterTaskStarted [
equals: (task title, '-', logger defaultLoggingFileName)
]

{ #category : 'tests - file handling' }
{ #category : #'tests - file handling' }
DSSTONFileLoggerTest >> testLoggingFileReference [

| fileReference |
Expand All @@ -128,7 +127,7 @@ DSSTONFileLoggerTest >> testLoggingFileReference [
self assert: fileReference exists
]

{ #category : 'tests' }
{ #category : #tests }
DSSTONFileLoggerTest >> testReset [
logger forceLoggingFileNameFor: task.
logger reset.
Expand All @@ -137,12 +136,12 @@ DSSTONFileLoggerTest >> testReset [
equals: logger defaultLoggingFileName
]

{ #category : 'tests - task management' }
{ #category : #'tests - task management' }
DSSTONFileLoggerTest >> testSurveyFileExtension [
self assert: logger surveyFileExtension equals: 'survey'
]

{ #category : 'tests - logging' }
{ #category : #'tests - logging' }
DSSTONFileLoggerTest >> testWriteToFile [

| str |
Expand Down
Loading
Loading