File tree Expand file tree Collapse file tree 2 files changed +20
-5
lines changed
Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -144,16 +144,14 @@ MicBlogCreatorTest >> testCreateAllHtmlFile [
144144{ #category : ' tests' }
145145MicBlogCreatorTest >> testCreateFromTo [
146146
147- | allFile nbMonthFile |
147+ | allFile |
148148 MicBlogCreator
149149 createFrom: fileSystem / ' source'
150150 to: fileSystem / ' html' .
151151
152152 allFile := (fileSystem / ' html' ) allFiles.
153-
154- nbMonthFile := (Date today year - 2014 ) * 12 + Date today month index.
155153
156- self assert: allFile size equals: 5 + nbMonthFile
154+ self assert: allFile size equals: 7
157155]
158156
159157{ #category : ' tests' }
@@ -220,6 +218,22 @@ MicBlogCreatorTest >> testCreateHtmlSummarize [
220218 self assert: (fileSystem / ' html/index.html' ) exists
221219]
222220
221+ { #category : ' tests' }
222+ MicBlogCreatorTest >> testInitializeMonthList [
223+
224+ | listSingleSummarizer |
225+
226+ listSingleSummarizer := Array new : 3 .
227+
228+ listSingleSummarizer at: 1 put: (MicSingleSummarizer new summarizeFile: fileSystem / ' source/anExample1.md' ).
229+ listSingleSummarizer at: 2 put: (MicSingleSummarizer new summarizeFile: fileSystem / ' source/anExample2.md' ).
230+ listSingleSummarizer at: 3 put: (MicSingleSummarizer new summarizeFile: fileSystem / ' source/test/anExample3.md' ).
231+
232+ blog initializeMonthList: listSingleSummarizer.
233+
234+ self assert: (fileSystem / ' html/_monthBlog' ) allFiles size equals: 2 .
235+ ]
236+
223237{ #category : ' tests' }
224238MicBlogCreatorTest >> testRenameMarkdownIntoHtmlFile [
225239
Original file line number Diff line number Diff line change @@ -151,8 +151,9 @@ MicBlogCreator >> initializeMonthList: listOfSingleSummarize [
151151 sum targetDirectory: targetDirectory.
152152
153153 dateList := MicMonthListCreator new generateDateListSince2014.
154+ date := dateList copy.
154155
155- dateList do: [ :each |
156+ date do: [ :each |
156157 summar := sum group: listOfSingleSummarize byDate: each.
157158 summar isEmpty ifTrue: [ dateList := dateList copyWithout: each ] ].
158159
You can’t perform that action at this time.
0 commit comments