Skip to content

Commit a4f6c03

Browse files
committed
Reconciled existing tests with those that would be generated.
Queries being discussed at exercism#377
1 parent 19e2cde commit a4f6c03

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

dev/src/Exercise@TwoFer/TwoFerTest.class.st

+3-3
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,17 @@ TwoFerTest >> setUp [
7575
]
7676

7777
{ #category : #tests }
78-
TwoFerTest >> testANameGiven [
78+
TwoFerTest >> test01_ANameGiven [
7979
self assert: (twoFer who: 'Alice') equals: 'One for Alice, one for me.'
8080
]
8181

8282
{ #category : #tests }
83-
TwoFerTest >> testAnotherNameGiven [
83+
TwoFerTest >> test02_AnotherNameGiven [
8484
self assert: (twoFer who: 'Bob') equals: 'One for Bob, one for me.'
8585
]
8686

8787
{ #category : #tests }
88-
TwoFerTest >> testNoNameGiven [
88+
TwoFerTest >> test03_NoNameGiven [
8989
self assert: twoFer who equals: 'One for you, one for me.'
9090

9191
]

dev/src/ExercismDev/ExercismLabeledTest.class.st

+6-2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ ExercismLabeledTest >> description: aString [
2828
description := aString
2929
]
3030

31+
{ #category : #'as yet unclassified' }
32+
ExercismLabeledTest >> exercise [
33+
^ exercise
34+
]
35+
3136
{ #category : #'as yet unclassified' }
3237
ExercismLabeledTest >> exercise: aString [
3338
exercise := aString
@@ -79,8 +84,7 @@ ExercismLabeledTest >> methodNameSegment [
7984
methodNameSegment := groupPath isEmpty
8085
ifFalse: [ groupPath last key asCamelCase asValidKeyword ]
8186
ifTrue: [ '' ].
82-
83-
^ methodNameSegment , description asCamelCase asValidKeyword
87+
^ (methodNameSegment , description asCamelCase asValidKeyword) withoutPrefix: 'and'
8488
]
8589

8690
{ #category : #'as yet unclassified' }

dev/src/ExercismDev/String.extension.st

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ String >> asValidKeyword [
2020
validName := validName select: [ :c | c isAlphaNumeric or: [ c == $_ ] ].
2121

2222
^(validName first isDigit
23-
ifTrue: [ (self isAllDigits ifTrue: ['at' ] ifFalse: ['and']) , validName ]
23+
ifTrue: [ (self isAllDigits ifTrue: ['At' ] ifFalse: ['and']) , validName ]
2424
ifFalse: [ validName ]) asSymbol
2525
]

0 commit comments

Comments
 (0)