From c9b2eff36728266052ccfff54d3ac0a0624fd0f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 14 Feb 2013 11:50:41 +0100 Subject: [PATCH] Use File.join insteado of manual path creation. This prevents issues, when File.join in #new_default_spec removes superfluous slashes while they are kept in expected paths. E.g. the test would fail if ruby configuration specifies --with-ruby-version=''. --- test/rubygems/test_gem_commands_contents_command.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/rubygems/test_gem_commands_contents_command.rb b/test/rubygems/test_gem_commands_contents_command.rb index 60df53f..35c9631 100644 --- a/test/rubygems/test_gem_commands_contents_command.rb +++ b/test/rubygems/test_gem_commands_contents_command.rb @@ -140,10 +140,10 @@ lib/foo.rb @cmd.execute end - expected = %W[ - #{Gem::ConfigMap[:bindir]}/default_command - #{Gem::ConfigMap[:rubylibdir]}/default/gem.rb - #{Gem::ConfigMap[:archdir]}/default_gem.so + expected = [ + File.join(Gem::ConfigMap[:bindir], 'default_command'), + File.join(Gem::ConfigMap[:rubylibdir], 'default/gem.rb'), + File.join(Gem::ConfigMap[:archdir], 'default_gem.so') ].sort.join "\n" assert_equal expected, @ui.output.chomp -- 1.8.1.2