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