@@ -224,10 +224,7 @@ mod tests {
224
224
let problem = Directives :: from_directives ( HashMap :: from ( [ ( "build" , vec ! [ "a" , "b" ] ) ] ) )
225
225
. unwrap_err ( ) ;
226
226
227
- assert_eq ! (
228
- String :: from( "I got multiple `build` directives, and I don't know which to use. Remove all but one and try again!" ) ,
229
- problem. to_string( ) ,
230
- )
227
+ assert ! ( problem. to_string( ) . contains( "multiple `build` directives" ) , )
231
228
}
232
229
233
230
#[ test]
@@ -252,10 +249,9 @@ mod tests {
252
249
Directives :: from_directives ( HashMap :: from ( [ ( "interpreter" , vec ! [ "a" , "b" ] ) ] ) )
253
250
. unwrap_err ( ) ;
254
251
255
- assert_eq ! (
256
- String :: from( "I got multiple `interpreter` directives, and I don't know which to use. Remove all but one and try again!" ) ,
257
- problem. to_string( ) ,
258
- )
252
+ assert ! ( problem
253
+ . to_string( )
254
+ . contains( "multiple `interpreter` directives" ) )
259
255
}
260
256
261
257
#[ test]
@@ -280,10 +276,9 @@ mod tests {
280
276
Directives :: from_directives ( HashMap :: from ( [ ( "buildRoot" , vec ! [ "a" , "b" ] ) ] ) )
281
277
. unwrap_err ( ) ;
282
278
283
- assert_eq ! (
284
- String :: from( "I got multiple `buildRoot` directives, and I don't know which to use. Remove all but one and try again!" ) ,
285
- problem. to_string( ) ,
286
- )
279
+ assert ! ( problem
280
+ . to_string( )
281
+ . contains( "multiple `buildRoot` directives" ) )
287
282
}
288
283
289
284
#[ test]
@@ -327,10 +322,9 @@ mod tests {
327
322
Directives :: from_directives ( HashMap :: from ( [ ( "nixpkgsConfig" , vec ! [ "{}" , "{}" ] ) ] ) )
328
323
. unwrap_err ( ) ;
329
324
330
- assert_eq ! (
331
- String :: from( "I got multiple `nixpkgsConfig` directives, and I don't know which to use. Remove all but one and try again!" ) ,
332
- problem. to_string( ) ,
333
- )
325
+ assert ! ( problem
326
+ . to_string( )
327
+ . contains( "multiple `nixpkgsConfig` directives" ) )
334
328
}
335
329
336
330
#[ test]
@@ -339,10 +333,7 @@ mod tests {
339
333
Directives :: from_directives ( HashMap :: from ( [ ( "nixpkgsConfig" , vec ! [ "1" ] ) ] ) )
340
334
. unwrap_err ( ) ;
341
335
342
- assert_eq ! (
343
- String :: from( "I expected the `nixpkgsConfig` directive to be a Nix record, but it was a `NODE_LITERAL`" ) ,
344
- problem. to_string( ) ,
345
- )
336
+ assert ! ( problem. to_string( ) . contains( "`nixpkgsConfig` directive" ) , )
346
337
}
347
338
348
339
#[ test]
0 commit comments