Skip to content

Commit

Permalink
Use default method template for setUp tab in browser when there is on…
Browse files Browse the repository at this point in the history
…ly TestCase implementation
  • Loading branch information
dionisiydk committed Jun 27, 2020
1 parent 04d040c commit f927288
Showing 1 changed file with 24 additions and 0 deletions.
Expand Up @@ -51,6 +51,23 @@ ClyTestSetUpEditorTool >> belongsToCurrentBrowserContext [
^browser isClassSelected: testClass
]

{ #category : #building }
ClyTestSetUpEditorTool >> buildTextMorph [
super buildTextMorph.

editingMethod == (TestCase >> #setUp) ifTrue: [
self setUpDefaultTemplate ].
]

{ #category : #initialization }
ClyTestSetUpEditorTool >> defaultTemplateForNewSetUp [

^'setUp
super setUp.
"Put here a common initializiation logic for tests"'
]

{ #category : #initialization }
ClyTestSetUpEditorTool >> defaultTitle [
^'setUp'
Expand All @@ -67,6 +84,13 @@ ClyTestSetUpEditorTool >> isSimilarTo: anotherBrowserTool [
and: [ testClass == anotherBrowserTool testClass ]
]

{ #category : #initialization }
ClyTestSetUpEditorTool >> setUpDefaultTemplate [

textModel setInitialText: self defaultTemplateForNewSetUp.
targetClasses := { testClass }
]

{ #category : #initialization }
ClyTestSetUpEditorTool >> setUpModelFromContext [

Expand Down

0 comments on commit f927288

Please sign in to comment.