diff options
Diffstat (limited to 'test/rubygems/test_gem_commands_which_command.rb')
-rw-r--r-- | test/rubygems/test_gem_commands_which_command.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/rubygems/test_gem_commands_which_command.rb b/test/rubygems/test_gem_commands_which_command.rb index 8f9a2926db..7a21f7cc05 100644 --- a/test/rubygems/test_gem_commands_which_command.rb +++ b/test/rubygems/test_gem_commands_which_command.rb @@ -11,6 +11,7 @@ class TestGemCommandsWhichCommand < Gem::TestCase def setup super + Gem::Specification.reset @cmd = Gem::Commands::WhichCommand.new end @@ -28,6 +29,8 @@ class TestGemCommandsWhichCommand < Gem::TestCase end def test_execute_one_missing + # TODO: this test fails in isolation + util_foo_bar @cmd.handle_options %w[foo_bar missing] @@ -37,7 +40,7 @@ class TestGemCommandsWhichCommand < Gem::TestCase end assert_equal "#{@foo_bar.full_gem_path}/lib/foo_bar.rb\n", @ui.output - assert_match %r%Can't find ruby library file or shared library missing\n%, + assert_match %r%Can.t find ruby library file or shared library missing\n%, @ui.error end @@ -51,7 +54,7 @@ class TestGemCommandsWhichCommand < Gem::TestCase end assert_equal '', @ui.output - assert_match %r%Can't find ruby library file or shared library missing\n%, + assert_match %r%Can.t find ruby library file or shared library missing\n%, @ui.error end @@ -62,8 +65,8 @@ class TestGemCommandsWhichCommand < Gem::TestCase end files.each do |file| - filename = @foo_bar.full_gem_path + "/#{file}" - FileUtils.mkdir_p File.dirname(filename) + filename = File.join(@foo_bar.full_gem_path, file) + FileUtils.mkdir_p File.dirname filename FileUtils.touch filename end end |