@@ -266,30 +266,29 @@ VERSION = v1`))
266
266
assert .Equal (t , "v1" , f .Section ("" ).Key ("version" ).String ())
267
267
})
268
268
269
- Convey ( "Get section after deletion" , t , func () {
270
- f , err := ini . Load ([]byte (`
269
+ t . Run ( "get sections after deletion" , func (t * testing. T ) {
270
+ f , err := Load ([]byte (`
271
271
[RANDOM]
272
272
` ))
273
- So (f , ShouldNotBeNil )
274
- So (err , ShouldBeNil )
273
+ require .NoError (t , err )
274
+ require .NotNil (t , f )
275
+
275
276
sectionNames := f .SectionStrings ()
276
277
sort .Strings (sectionNames )
277
- So ( sectionNames , ShouldResemble , []string {ini . DefaultSection , "RANDOM" })
278
+ assert . Equal ( t , []string {DefaultSection , "RANDOM" }, sectionNames )
278
279
279
280
for _ , currentSection := range sectionNames {
280
281
f .DeleteSection (currentSection )
281
282
}
282
- Convey ("Section recreated" , func () {
283
- for sectionParam , expectedSectionName := range map [string ]string {
284
- "" : ini .DefaultSection ,
285
- "RANDOM" : "RANDOM" ,
286
- } {
287
- sec := f .Section (sectionParam )
288
- So (sec , ShouldNotBeNil )
289
- So (sec .Name (), ShouldEqual , expectedSectionName )
290
- }
291
- })
292
283
284
+ for sectionParam , expectedSectionName := range map [string ]string {
285
+ "" : DefaultSection ,
286
+ "RANDOM" : "RANDOM" ,
287
+ } {
288
+ sec := f .Section (sectionParam )
289
+ require .NotNil (t , sec )
290
+ assert .Equal (t , expectedSectionName , sec .Name ())
291
+ }
293
292
})
294
293
295
294
}
0 commit comments