File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -426,7 +426,12 @@ mod tests {
426426 Box :: new ( MockCommandExecutor :: new ( ) ) ,
427427 ) ;
428428 let path = gemset. gem_bin_path ( "ruby-lsp" ) . unwrap ( ) ;
429- assert_eq ! ( path, "/test/gem_home/bin/ruby-lsp" ) ;
429+ let expected = Path :: new ( TEST_GEM_HOME )
430+ . join ( "bin" )
431+ . join ( "ruby-lsp" )
432+ . to_string_lossy ( )
433+ . into_owned ( ) ;
434+ assert_eq ! ( path, expected) ;
430435 }
431436
432437 #[ test]
@@ -438,12 +443,15 @@ mod tests {
438443 ) ;
439444 let env: std:: collections:: HashMap < String , String > = gemset. env ( ) . iter ( ) . cloned ( ) . collect ( ) ;
440445
446+ let gem_home = Path :: new ( TEST_GEM_HOME ) . display ( ) . to_string ( ) ;
447+ let gem_bin = Path :: new ( TEST_GEM_HOME ) . join ( "bin" ) . display ( ) . to_string ( ) ;
448+
441449 assert_eq ! ( env. len( ) , 2 ) ;
442450 assert_eq ! (
443451 env. get( "GEM_PATH" ) . unwrap( ) ,
444- "/test/ gem_home:/test/gem_path"
452+ & format! ( "{ gem_home}:{TEST_GEM_PATH}" )
445453 ) ;
446- assert_eq ! ( env. get( "PATH" ) . unwrap( ) , "/usr/bin:/test/gem_home/bin" ) ;
454+ assert_eq ! ( env. get( "PATH" ) . unwrap( ) , & format! ( "/usr/bin:{gem_bin}" ) ) ;
447455 }
448456
449457 #[ test]
You can’t perform that action at this time.
0 commit comments